@charset "UTF-8";
/* LINEスタンプ作成ツール（STAMP STUDIO） v7
   tool-place.net のテンプレートに読み込まれる前提のスタイル。
   サイト共通の styles.css（button・h2 など）と干渉しないよう、すべて #stamp-studio から指定する。 */

#stamp-studio {
	--st-text: #333;
	--st-sub: #666;
	--st-line: #d9d9d9;
	--st-line-strong: #bbb;
	--st-soft: #f5f5f5;
	--st-accent: #333;
	--st-accent-hover: #555;
	--st-focus: #2f6db2;
	--st-ok: #256b3a;
	--st-ok-bg: #e6f4ea;
	--st-ok-line: #7cc38f;
	--st-warn: #8a5a00;
	--st-warn-bg: #fff6e5;
	--st-warn-line: #f1d39b;
	--st-err: #b3261e;
	--st-guide: #b42951;
	color: var(--st-text);
	font-size: 15px;
	line-height: 1.6;
	text-align: left;
}
#stamp-studio *, #stamp-studio *::before, #stamp-studio *::after { box-sizing: border-box; }
#stamp-studio [hidden] { display: none !important; }
#stamp-studio button, #stamp-studio input, #stamp-studio select { font-family: inherit; }
#stamp-studio button { margin: 0; line-height: 1.4; cursor: pointer; -webkit-tap-highlight-color: transparent; }
#stamp-studio button:disabled { opacity: .45; cursor: default; }
#stamp-studio fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
#stamp-studio legend { padding: 0; }
#stamp-studio a { color: var(--st-focus); }
#stamp-studio :focus-visible { outline: 2px solid var(--st-focus); outline-offset: 2px; }
#stamp-studio input[type="checkbox"], #stamp-studio input[type="radio"] { flex-shrink: 0; width: 17px; height: 17px; margin: 0; accent-color: var(--st-focus); cursor: pointer; }
#stamp-studio .muted { color: var(--st-sub); font-size: 13px; }

/* ボタン（サイト共通の黒い button を、種類ごとに上書きする） */
#stamp-studio .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 40px;
	padding: 8px 16px;
	border: 1px solid transparent;
	border-radius: 5px;
	font-size: 14px;
	font-weight: bold;
	text-align: center;
	transition: background .15s, border-color .15s;
}
#stamp-studio .primary { background: var(--st-accent); color: #fff; }
#stamp-studio .outline { border-color: var(--st-line-strong); background: #fff; color: var(--st-text); font-weight: normal; }
#stamp-studio .danger { background: var(--st-err); color: #fff; }
#stamp-studio .full-width { width: 100%; }
#stamp-studio .text-button { flex: none; padding: 4px 2px; border: 0; border-radius: 3px; background: none; color: var(--st-focus); font-size: 12.5px; text-decoration: underline; text-underline-offset: 2px; }

/* 導入文 */
#stamp-studio .lead { margin: 0 0 16px; padding: 4px 12px; border-left: 3px solid #ccc; color: #555; font-size: 14px; }

/* 取り込み */
#stamp-studio .upload-bar {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 18px;
	border: 2px dashed #aaa;
	border-radius: 8px;
	background: #fafafa;
	transition: background .15s, border-color .15s;
}
#stamp-studio .upload-bar.dragging { border-color: var(--st-focus); background: #eef3f9; }
#stamp-studio .upload-symbol { flex: none; display: grid; place-items: center; width: 36px; height: 36px; }
#stamp-studio .upload-symbol svg { width: 30px; height: 30px; fill: none; stroke: #777; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#stamp-studio .upload-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#stamp-studio .upload-copy strong { font-size: 15.5px; }
#stamp-studio .upload-copy span { color: var(--st-sub); font-size: 12.5px; }

#stamp-studio .statusbar { min-height: 22px; margin: 12px 2px; color: #555; font-size: 13.5px; }
#stamp-studio .error-details { margin: 0 0 14px; padding: 9px 14px; border: 1px solid var(--st-warn-line); border-radius: 6px; background: var(--st-warn-bg); color: var(--st-warn); font-size: 13px; line-height: 1.7; }
#stamp-studio .error-details summary { cursor: pointer; }
#stamp-studio .error-details ul { max-height: 200px; margin: 6px 0 0; padding-left: 1.5em; overflow: auto; }
#stamp-studio .warning { margin: 10px 14px; padding: 8px 12px; border: 1px solid var(--st-warn-line); border-radius: 6px; background: var(--st-warn-bg); color: var(--st-warn); font-size: 13px; line-height: 1.7; }

/* 作業エリア（画像一覧／プレビュー／採用スタンプ） */
#stamp-studio .workspace { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(360px, 2fr) minmax(236px, 1.15fr); gap: 14px; align-items: stretch; }
#stamp-studio .panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 1px solid var(--st-line); border-radius: 8px; background: #fff; overflow: hidden; }
#stamp-studio .panel-heading { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 46px; padding: 8px 12px; border-bottom: 1px solid var(--st-line); background: var(--st-soft); }
#stamp-studio .panel h2 { display: flex; align-items: center; gap: 7px; min-width: 0; margin: 0; white-space: nowrap; color: var(--st-text); font-size: 15px; font-weight: bold; line-height: 1.4; }
#stamp-studio .step { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #555; color: #fff; font-size: 12px; line-height: 1; }
#stamp-studio .counter { padding: 0 7px; border-radius: 10px; background: #e6e6e6; color: #555; font-size: 12px; font-weight: normal; line-height: 1.6; }
#stamp-studio .panel-foot { flex-shrink: 0; padding: 9px 12px; border-top: 1px solid #eee; color: var(--st-sub); font-size: 12.5px; text-align: center; }

/* 一覧は欄の中でスクロールする。高さは基準値（flex-basis）から始まり、横に並ぶプレビューの高さまで伸びる。
   基準値は固定の長さなので、画像の枚数が増えても欄やプレビューの高さは変わらない */
#stamp-studio .library-scroll, #stamp-studio .selection-scroll { display: flex; flex-direction: column; flex: 1 1 400px; min-height: 0; overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable; scrollbar-width: thin; overscroll-behavior: contain; }
#stamp-studio .empty-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 150px; margin: 12px; padding: 16px 12px; border: 1px dashed #ccc; border-radius: 8px; color: var(--st-sub); text-align: center; }
#stamp-studio .empty-state strong { color: #555; font-size: 14px; }
#stamp-studio .empty-state p { margin: 0; font-size: 13px; line-height: 1.7; }
#stamp-studio .empty-state .button { margin-top: 8px; }

#stamp-studio .library-grid, #stamp-studio .selected-grid { flex: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; }
#stamp-studio .thumb-button { position: relative; display: block; width: 100%; min-width: 0; padding: 5px; border: 1px solid #ccc; border-radius: 5px; background: #fff; color: var(--st-text); text-align: left; transition: background .15s, border-color .15s; }
#stamp-studio .thumb-button.active { border-color: var(--st-accent); box-shadow: 0 0 0 1px var(--st-accent); }
#stamp-studio .thumb-image { display: block; width: 100%; aspect-ratio: 370 / 320; border-radius: 3px; object-fit: contain; }
#stamp-studio .thumb-name { display: block; margin-top: 5px; overflow: hidden; color: #555; font-size: 11.5px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
#stamp-studio .thumb-check { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 19px; height: 19px; border: 1px solid #fff; border-radius: 50%; background: var(--st-ok); color: #fff; font-size: 11px; line-height: 1; }
#stamp-studio .selected-card { position: relative; min-width: 0; }
#stamp-studio .selected-number { position: absolute; top: 4px; left: 4px; padding: 0 5px; border: 1px solid #ccc; border-radius: 3px; background: rgba(255, 255, 255, .92); color: var(--st-text); font-size: 11px; font-weight: bold; line-height: 1.5; }
#stamp-studio .selected-tools { display: flex; gap: 4px; margin-top: 4px; }
#stamp-studio .selected-tools button { min-width: 28px; min-height: 28px; padding: 0 6px 2px; border: 1px solid #ccc; border-radius: 4px; background: #fff; color: #555; font-size: 16px; line-height: 1; transition: background .15s; }
#stamp-studio .selected-tools button:last-child { margin-left: auto; }

/* プレビュー */
#stamp-studio .preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 14px; font-size: 13px; }
#stamp-studio .preview-toolbar > span { overflow: hidden; color: #555; text-overflow: ellipsis; white-space: nowrap; }
#stamp-studio .swatches { flex-shrink: 0; display: flex; align-items: center; gap: 9px; }
#stamp-studio .swatch { position: relative; width: 22px; height: 22px; padding: 0; border: 1px solid #999; border-radius: 50%; }
#stamp-studio .swatch::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; }
#stamp-studio .swatch.active { outline: 2px solid var(--st-accent); outline-offset: 2px; }
#stamp-studio .swatch:focus-visible { outline: 2px solid var(--st-focus); outline-offset: 2px; }
#stamp-studio .checker { background-color: #fff; background-image: conic-gradient(#e6e6e6 25%, transparent 0 50%, #e6e6e6 0 75%, transparent 0); background-size: 16px 16px; }
#stamp-studio .white { background: #fff; }
#stamp-studio .dark { background: #2b2b2b; }
#stamp-studio .chat { background: #a8c7dd; }
#stamp-studio .preview-stage { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; min-height: 330px; margin: 0 14px; padding: 18px 16px 36px; border: 1px solid #ddd; border-radius: 6px; overflow: hidden; }
#stamp-studio .preview-empty { max-width: 270px; padding: 14px 18px; border: 1px dashed var(--st-line-strong); border-radius: 8px; background: rgba(255, 255, 255, .94); color: var(--st-sub); text-align: center; }
#stamp-studio .preview-empty p { margin: 0; font-size: 13.5px; line-height: 1.7; }
#stamp-studio .dimension-tag { position: absolute; right: 8px; bottom: 7px; padding: 1px 7px; border: 1px solid #ddd; border-radius: 3px; background: rgba(255, 255, 255, .94); color: var(--st-sub); font-size: 11.5px; }

/* 仕上がりの枠と10px余白ガイド（ガイドは表示だけで、出力画像には入らない） */
#stamp-studio .preview-artboard, #stamp-studio .editor-board { position: relative; flex-shrink: 0; width: 370px; max-width: 100%; aspect-ratio: 370 / 320; outline: 1px solid #b5b5b5; }
#stamp-studio .preview-artboard img, #stamp-studio .editor-board canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
#stamp-studio .margin-guide { position: absolute; inset: 0; z-index: 2; display: none; background: linear-gradient(to right, #ec7d913f 0 2.7027027%, transparent 2.7027027% 97.2972973%, #ec7d913f 97.2972973%), linear-gradient(to bottom, #ec7d913f 0 3.125%, transparent 3.125% 96.875%, #ec7d913f 96.875%); pointer-events: none; }
#stamp-studio .show-guides > .margin-guide { display: block; }
#stamp-studio .safe-outline { position: absolute; top: 3.125%; right: 2.7027027%; bottom: 3.125%; left: 2.7027027%; outline: 1px dashed var(--st-guide); }

#stamp-studio .guide-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px 0; }
#stamp-studio .guide-toolbar label, #stamp-studio .editor-guide-label { display: flex; align-items: center; gap: 7px; color: #555; font-size: 13px; cursor: pointer; }
#stamp-studio .guide-toolbar .button { min-height: 36px; padding: 6px 12px; font-size: 13px; }
#stamp-studio .guide-caption { margin: 8px 12px 0; color: var(--st-sub); font-size: 12.5px; line-height: 1.7; text-align: center; }
#stamp-studio .image-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 14px; padding: 6px 12px 12px; color: var(--st-sub); font-size: 12.5px; }
#stamp-studio .preview-actions { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 14px; }
#stamp-studio .adopt-button { flex: 1; max-width: 300px; min-height: 44px; font-size: 15px; }
#stamp-studio .adopt-button.adopted { border-color: var(--st-ok-line); background: var(--st-ok-bg); color: var(--st-ok); }
#stamp-studio .icon-button { width: 44px; min-width: 44px; height: 44px; padding: 0 0 4px; border-color: var(--st-line-strong); background: #fff; color: var(--st-text); font-size: 24px; font-weight: normal; line-height: 1; }
#stamp-studio .keyboard-hint { margin: 10px 0 14px; color: var(--st-sub); font-size: 12px; text-align: center; }

/* 採用スタンプ */
#stamp-studio .selection-count { color: var(--st-sub); font-size: 13px; white-space: nowrap; }
#stamp-studio .selection-count b { margin-right: 2px; color: var(--st-text); font-size: 17px; }
#stamp-studio .selection-bottom { flex-shrink: 0; padding: 12px; border-top: 1px solid #eee; }
#stamp-studio .selection-bottom p { margin: 0 0 4px; color: var(--st-sub); font-size: 12.5px; line-height: 1.7; text-align: center; }
#stamp-studio .selection-bottom p.success { color: var(--st-ok); font-weight: bold; }
#stamp-studio .selection-bottom .button { margin-top: 8px; }

#stamp-studio .workspace-note { margin: 12px 0 0; padding-left: 1.4em; color: var(--st-sub); font-size: 12.5px; line-height: 1.8; }

/* 紹介と使い方 */
#stamp-studio .help { max-width: 760px; margin-top: 44px; font-size: 15px; }
#stamp-studio .help h2 { margin: 34px 0 10px; padding-bottom: 6px; border-bottom: 2px solid #555; color: #444; font-size: 18px; font-weight: bold; line-height: 1.4; }
#stamp-studio .help h2:first-child { margin-top: 0; }
#stamp-studio .help p { margin: 0 0 12px; line-height: 1.8; }
#stamp-studio .help ul, #stamp-studio .help ol { margin: 0 0 12px; padding-left: 1.6em; }
#stamp-studio .help li { margin-bottom: 4px; line-height: 1.75; }
#stamp-studio .help table { width: 100%; margin: 6px 0 14px; border-collapse: collapse; font-size: 14px; }
#stamp-studio .help th, #stamp-studio .help td { padding: 6px 10px; border: 1px solid #ddd; text-align: left; vertical-align: top; }
#stamp-studio .help th { background: #f6f6f6; font-weight: bold; white-space: nowrap; }

/* ダイアログ */
#stamp-studio dialog { width: min(640px, calc(100% - 24px)); max-height: 90vh; max-height: 90dvh; padding: 20px 22px; border: 1px solid var(--st-line); border-radius: 8px; background: #fff; color: var(--st-text); box-shadow: 0 8px 32px rgba(0, 0, 0, .25); }
#stamp-studio dialog::backdrop { background: rgba(0, 0, 0, .35); }
#stamp-studio #selectionDialog { width: min(860px, calc(100% - 24px)); }
#stamp-studio .editor-dialog { width: min(900px, calc(100% - 24px)); }
#stamp-studio dialog p { margin: 0 0 12px; line-height: 1.8; }
#stamp-studio .dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 2px solid #555; }
#stamp-studio .dialog-head h2 { margin: 0; padding-top: 3px; color: #444; font-size: 18px; font-weight: bold; line-height: 1.5; overflow-wrap: anywhere; }
#stamp-studio .close-button { flex: none; display: grid; place-items: center; width: 34px; height: 34px; margin: -1px -6px 0 0; padding: 0 0 3px; border: 0; border-radius: 6px; background: transparent; color: #555; font-size: 24px; line-height: 1; }
#stamp-studio .dialog-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 18px; }
#stamp-studio dialog .dialog-status { margin: 0; padding-top: 10px; color: #555; font-size: 13px; line-height: 1.7; }
#stamp-studio dialog .dialog-status:empty { padding-top: 0; }
#stamp-studio dialog .small-note { color: var(--st-sub); font-size: 12.5px; line-height: 1.75; }
#stamp-studio dialog .warning { margin: 12px 0; }
#stamp-studio .collection-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 14px; }

/* ZIP出力の設定 */
#stamp-studio .export-modes legend { margin-bottom: 8px; font-size: 14px; font-weight: bold; }
#stamp-studio .export-modes label { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; padding: 11px 14px; border: 1px solid var(--st-line); border-radius: 6px; cursor: pointer; }
#stamp-studio .export-modes label:has(input:checked) { border-color: var(--st-accent); background: var(--st-soft); box-shadow: inset 0 0 0 1px var(--st-accent); }
#stamp-studio .export-modes label:has(input:disabled) { color: #999; cursor: default; }
#stamp-studio .export-modes strong { display: block; font-size: 15px; }
#stamp-studio .export-modes small { display: block; margin-top: 1px; color: var(--st-sub); font-size: 12.5px; }
#stamp-studio .export-modes label:has(input:disabled) small { color: #999; }
#stamp-studio dialog .info-note { margin: 10px 0 16px; color: #555; font-size: 13px; line-height: 1.7; }
#stamp-studio .auxiliary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
#stamp-studio .auxiliary-grid label { min-width: 0; font-size: 14px; font-weight: bold; }
#stamp-studio .auxiliary-grid small { margin-left: 4px; color: var(--st-sub); font-size: 12.5px; font-weight: normal; }
#stamp-studio .auxiliary-grid select { display: block; width: 100%; margin-top: 6px; padding: 7px 8px; border: 1px solid var(--st-line-strong); border-radius: 5px; background: #fff; color: var(--st-text); font-size: 13.5px; font-weight: normal; }
#stamp-studio .aux-preview { display: flex; align-items: center; justify-content: center; height: 140px; margin-top: 8px; border: 1px solid #ddd; border-radius: 6px; }
#stamp-studio .aux-preview img { max-width: 100%; max-height: 124px; object-fit: contain; }
#stamp-studio #auxiliaryOptions { margin-bottom: 14px; }

/* 位置・サイズの調整 */
#stamp-studio dialog .editor-intro { margin: 0 0 16px; color: #555; font-size: 14px; line-height: 1.7; }
#stamp-studio .editor-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(245px, 1fr); gap: 24px; align-items: start; }
#stamp-studio .editor-preview { min-width: 0; }
#stamp-studio .editor-board { width: 100%; max-width: 444px; margin: auto; }
#stamp-studio .editor-board canvas { touch-action: none; cursor: grab; }
#stamp-studio .editor-board canvas:active { cursor: grabbing; }
#stamp-studio .editor-guide-label { justify-content: center; margin-top: 14px; }
#stamp-studio .editor-controls legend { margin-bottom: 12px; font-size: 14px; font-weight: bold; }
#stamp-studio .control-label { display: block; margin-bottom: 4px; font-size: 14px; }
#stamp-studio .editor-controls input[type="range"] { width: 100%; height: 28px; margin: 0; accent-color: var(--st-focus); cursor: pointer; }
#stamp-studio .editor-controls input[type="number"] { width: 100%; min-width: 0; margin: 0; padding: 7px 10px; border: 1px solid var(--st-line-strong); border-radius: 5px; background: #fff; color: var(--st-text); font-size: 15px; line-height: 1.4; }
#stamp-studio .editor-controls input[type="number"]:disabled { background: #f3f3f3; color: #888; }
#stamp-studio .size-values { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 4px 0 16px; }
#stamp-studio .size-values label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
#stamp-studio .size-values span { white-space: nowrap; }
#stamp-studio .size-values input[type="number"] { width: 80px; }
#stamp-studio .size-values output { color: var(--st-sub); font-size: 12.5px; }
#stamp-studio .position-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#stamp-studio .position-inputs label { font-size: 13px; line-height: 1.7; }
#stamp-studio .position-inputs input[type="number"] { display: block; margin-top: 3px; }
#stamp-studio .nudge-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
#stamp-studio .nudge-controls button { min-width: 36px; min-height: 36px; padding: 0; border: 1px solid var(--st-line-strong); border-radius: 5px; background: #fff; color: var(--st-text); font-size: 15px; transition: background .15s; }
#stamp-studio .nudge-controls span { margin-left: 4px; color: var(--st-sub); font-size: 12.5px; }
#stamp-studio .editor-reset { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }
#stamp-studio .editor-reset .button { min-height: 36px; padding: 6px 12px; font-size: 13px; }
#stamp-studio dialog .editor-help { margin: 12px 0 0; color: var(--st-sub); font-size: 12.5px; line-height: 1.7; }
#stamp-studio dialog .margin-readout { margin: 18px 0 6px; padding: 8px 12px; border-radius: 6px; background: var(--st-soft); font-size: 13px; line-height: 1.7; }
#stamp-studio dialog .editor-keyboard { margin: 6px 0 0; color: var(--st-sub); font-size: 12px; line-height: 1.7; }

/* 画面が狭いとき（サイトのヘッダーが切り替わる幅と同じ）：採用スタンプを下の段へ */
@media (max-width: 980px) {
	#stamp-studio .workspace { grid-template-columns: 228px minmax(0, 1fr); gap: 12px; }
	#stamp-studio .selection-panel { grid-column: 1 / -1; }
	#stamp-studio .selection-scroll { flex-basis: 280px; }
	#stamp-studio .selection-scroll .empty-state { min-height: 100px; }
	#stamp-studio .selected-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
	#stamp-studio .selection-bottom { display: flex; align-items: center; gap: 12px; }
	#stamp-studio .selection-bottom p { flex: 1; margin: 0; text-align: left; }
	#stamp-studio .selection-bottom .button { width: auto; margin: 0; }
}

@media (max-width: 650px) {
	#stamp-studio .editor-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }
	#stamp-studio .editor-board { max-width: 370px; }
	#stamp-studio dialog .editor-intro { font-size: 13px; }
	#stamp-studio dialog .editor-keyboard { display: none; }
	/* 入力欄が長くなるので、決定ボタンを下端に固定する */
	#stamp-studio .editor-dialog .dialog-footer { position: sticky; bottom: -16px; z-index: 3; margin-top: 8px; padding: 12px 0; background: #fff; }
}

/* スマホ：縦に並べる */
@media (max-width: 620px) {
	#stamp-studio .upload-bar { flex-wrap: wrap; gap: 10px 12px; padding: 14px; }
	#stamp-studio .upload-copy strong { font-size: 14.5px; }
	#stamp-studio .upload-bar .button { width: 100%; min-height: 44px; }
	#stamp-studio .workspace { grid-template-columns: minmax(0, 1fr); }
	#stamp-studio .library-scroll { flex-basis: 210px; }
	#stamp-studio .library-scroll .empty-state { min-height: 0; padding: 10px; gap: 2px; }
	#stamp-studio .library-grid, #stamp-studio .selected-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	#stamp-studio .panel-foot, #stamp-studio .keyboard-hint { display: none; }
	#stamp-studio .preview-panel { padding-bottom: 14px; }
	#stamp-studio .preview-stage { min-height: 0; margin: 0 10px; padding: 14px 12px 34px; }
	#stamp-studio .preview-empty { margin: 60px 0; }
	#stamp-studio .guide-toolbar { padding: 12px 10px 0; }
	#stamp-studio .guide-toolbar .button, #stamp-studio .editor-reset .button { min-height: 44px; }
	#stamp-studio .preview-actions { padding: 0 10px; }
	#stamp-studio .selection-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
	#stamp-studio .selection-bottom p { grid-column: 1 / -1; text-align: center; }
	#stamp-studio .selection-bottom .button { width: 100%; min-height: 44px; padding: 8px; font-size: 13px; }
	#stamp-studio .selected-tools button { min-width: 32px; min-height: 32px; }
	#stamp-studio .help { margin-top: 32px; }
	#stamp-studio dialog { padding: 16px; max-height: 92vh; max-height: 92dvh; }
	#stamp-studio .dialog-head h2 { font-size: 16.5px; }
	#stamp-studio .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	#stamp-studio .auxiliary-grid { gap: 10px; }
	#stamp-studio .aux-preview { height: 116px; }
	#stamp-studio .aux-preview img { max-height: 100px; }
	#stamp-studio .dialog-footer .button { flex: 1; min-height: 44px; }
	#stamp-studio .nudge-controls button { min-width: 44px; min-height: 44px; }
}

/* マウスを乗せたとき。タッチ操作の端末では、押したあとに色が残るので付けない
   （サイト共通の button:hover は、各ボタンの背景指定のほうが強いので効かない） */
@media (hover: hover) {
	#stamp-studio a:hover, #stamp-studio .text-button:enabled:hover { color: #1d4f85; }
	#stamp-studio .primary:enabled:hover { background: var(--st-accent-hover); }
	#stamp-studio .danger:enabled:hover { background: #8f1e18; }
	#stamp-studio .outline:enabled:hover, #stamp-studio .icon-button:enabled:hover, #stamp-studio .nudge-controls button:enabled:hover, #stamp-studio .selected-tools button:enabled:hover { background: #f1f1f1; }
	#stamp-studio .selected-tools button:last-child:enabled:hover { border-color: #e0a3a3; background: #fdf1f1; color: var(--st-err); }
	#stamp-studio .adopt-button.adopted:enabled:hover { background: #d8eede; }
	#stamp-studio .close-button:hover { background: #f2f2f2; }
	#stamp-studio .thumb-button:hover { background: var(--st-soft); }
	#stamp-studio .thumb-button:not(.active):hover { border-color: #999; }
}

@media (prefers-reduced-motion: reduce) {
	#stamp-studio * { transition: none !important; }
}
