/* あなただけのサイン（/sign/・2026-11-04）: 色は葡萄（--sg）。ナカミドの共通の部品（.btn・.section・.eyebrow・.lead）の上に足す */
.sg { --sg: #7d3a6c; --sg-t: #f5e8f1; padding-top: 22px; }
.sg-screen { display: grid; gap: 14px; animation: sg-in .22s ease; }
@keyframes sg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sg-screen { animation: none; } }

/* はじめの画面 */
.sg-eb { color: var(--sg); }
.sg h1 { font-size: clamp(26px, 7.6vw, 32px); }
.sg-modes { display: grid; gap: 10px; }
.sg-mode { position: relative; display: grid; gap: 3px; width: 100%; padding: 14px 40px 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: border-color .15s, transform .08s; }
.sg-mode::after { content: "›"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 24px; color: var(--sg); }
.sg-mode b { font-family: var(--f-round); font-size: 17px; color: var(--sg); }
.sg-mode span { font-size: 13px; color: var(--ink2); line-height: 1.5; }
.sg-mode:active { transform: translateY(1px); }
@media (hover: hover) { .sg-mode:hover { border-color: var(--sg); } }
.sg-hero { margin: 4px 0 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.sg-hero img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
.sg-hero figcaption { font-size: 12px; color: var(--muted); text-align: center; }
.sg-h2 { font-size: 17px; margin-top: 12px; }
.sg-steps { list-style: none; margin: 4px 0; padding: 0; counter-reset: sg; display: grid; gap: 2px; }
.sg-steps li { counter-increment: sg; display: grid; grid-template-columns: 28px 1fr; column-gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sg-steps li:last-child { border-bottom: 0; }
.sg-steps li::before { content: counter(sg); grid-row: span 2; width: 28px; height: 28px; border-radius: 50%; background: var(--sg-t); color: var(--sg); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.sg-steps b { font-size: 15.5px; }
.sg-steps span { font-size: 13px; color: var(--ink2); }
.sg-note { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.sg-center { text-align: center; }
.sg-faq details { border-bottom: 1px solid var(--line); }
.sg-faq summary { padding: 12px 0; font-weight: 700; cursor: pointer; }
.sg-faq details p { margin: 0 0 14px; font-size: 14px; color: var(--ink2); line-height: 1.8; }

/* 名前を打つ */
.sg-back { font-size: 14px; text-decoration: none; padding: 4px 0; }
.sg-h { font-size: 22px; }
.sg-sub { margin: -6px 0 2px; font-size: 14px; color: var(--muted); }
.sg-form { display: grid; gap: 10px; }
.sg-field { display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); }
.sg-field:focus-within { border-color: var(--sg); box-shadow: 0 0 0 3px var(--sg-t); }
.sg-field input { flex: 1; min-width: 0; height: 56px; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 20px; font-weight: 700; }
.sg-field-sm input { height: 48px; font-size: 18px; }
.sg-count { flex: none; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sg-roma { display: grid; gap: 8px; }
.sg-label { display: block; margin: 0 2px -2px; font-size: 13px; font-weight: 700; color: var(--ink2); }
.sg-label small { font-weight: 400; color: var(--muted); }
.sg-cands-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.sg-cands-head > span { font-weight: 700; font-size: 15px; }
.sg-reroll { width: auto; padding: 0 14px; min-height: 38px; font-size: 13.5px; }
.sg-cands { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 640px) { .sg-cands { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sg-cand { display: grid; grid-template-rows: 1fr auto; gap: 4px; min-height: 104px; padding: 8px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: border-color .15s, transform .08s; }
.sg-cand:active { transform: translateY(1px); }
@media (hover: hover) { .sg-cand:hover { border-color: var(--sg); } }
.sg-cand-art { display: grid; place-items: center; min-height: 70px; overflow: hidden; }
.sg-cand-canvas { display: block; max-width: 100%; max-height: 76px; height: auto; object-fit: contain; }
.sg-cand-t { font-size: 11.5px; color: var(--muted); text-align: center; }
.sg-cand.is-loading .sg-cand-art::after { content: ""; width: 60%; height: 16px; border-radius: 8px; background: linear-gradient(90deg, #f0f0f3, #e4e4ea, #f0f0f3); background-size: 200% 100%; animation: sg-shine 1.2s linear infinite; }
@keyframes sg-shine { to { background-position: -200% 0; } }

/* 指で書く: 板は横長（スマホの縦では 2:1・横向きは画面の高さに合わせる） */
.sg-pad-wrap { position: relative; }
.sg-pad { display: block; width: 100%; aspect-ratio: 2 / 1; max-height: 62vh; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; cursor: crosshair; }
.sg-pad-hint { position: absolute; left: 0; right: 0; top: 38%; text-align: center; font-size: 15px; color: #b9bcc6; pointer-events: none; }
.sg-pad-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.sg-pad-btns { display: flex; gap: 8px; }
.sg-pad-btns .btn { width: auto; padding: 0 14px; min-height: 40px; font-size: 14px; }
.sg-pad-btns .btn:disabled { opacity: .45; cursor: default; }
.sg-seg { display: inline-flex; padding: 3px; border-radius: 12px; background: #f0f0f3; }
.sg-seg button { min-height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--ink2); font: inherit; font-size: 13.5px; cursor: pointer; }
.sg-seg button[aria-checked="true"] { background: #fff; color: var(--sg); font-weight: 700; box-shadow: 0 1px 3px rgba(20, 20, 30, .15); }
#sg-hand-next:disabled { opacity: .45; cursor: default; }

/* 加工: 見本は上に貼りつけて、下の操作をしながら見られるように */
.sg-stage-box { position: sticky; top: 0; z-index: 3; margin: 0 -16px; padding: 8px 16px; background: var(--bg, #fafaf8); }
.sg-stage { display: grid; place-items: center; height: clamp(150px, 30vh, 260px); padding: 12px; border-radius: 14px; border: 1px solid var(--line); overflow: hidden; }
.sg-stage[data-bg="checker"] { background-color: #fff; background-image: linear-gradient(45deg, #e9e9ee 25%, transparent 25%, transparent 75%, #e9e9ee 75%), linear-gradient(45deg, #e9e9ee 25%, transparent 25%, transparent 75%, #e9e9ee 75%); background-size: 16px 16px; background-position: 0 0, 8px 8px; }
.sg-stage[data-bg="white"] { background: #fff; }
.sg-stage[data-bg="black"] { background: #15161b; border-color: #15161b; }
.sg-stage-canvas { display: block; max-width: 100%; max-height: 100%; height: auto; object-fit: contain; }
.sg-bg { position: absolute; right: 24px; bottom: 14px; display: inline-flex; padding: 2px; border-radius: 9px; background: rgba(255, 255, 255, .92); box-shadow: 0 1px 4px rgba(20, 20, 30, .18); }
.sg-bg button { min-height: 28px; padding: 0 9px; border: 0; border-radius: 7px; background: transparent; color: var(--ink2); font: inherit; font-size: 12px; cursor: pointer; }
.sg-bg button[aria-checked="true"] { background: var(--sg); color: #fff; font-weight: 700; }
.sg-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 3px; border-radius: 12px; background: #f0f0f3; }
.sg-tabs button { min-height: 40px; padding: 0 2px; border: 0; border-radius: 9px; background: transparent; color: var(--ink2); font: inherit; font-size: 13.5px; white-space: nowrap; cursor: pointer; }
.sg-tabs button[aria-selected="true"] { background: #fff; color: var(--sg); font-weight: 700; box-shadow: 0 1px 3px rgba(20, 20, 30, .15); }
.sg-panel { display: grid; gap: 14px; min-height: 120px; }
.sg-group { display: grid; gap: 8px; }
.sg-group-h { font-size: 13px; font-weight: 700; color: var(--ink2); }
.sg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sg-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-size: 13.5px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sg-chip[aria-checked="true"] { border-color: var(--sg); background: var(--sg-t); color: var(--sg); font-weight: 700; }
.sg-sw { flex: none; width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(20, 20, 30, .18); }
.sg-chips-wide .sg-chip { padding: 0 12px 0 8px; }
.sg-chips-color .sg-chip { padding: 0 10px 0 6px; }
.sg-slider { display: grid; gap: 4px; }
.sg-slider-row { display: flex; align-items: center; gap: 10px; }
.sg-slider-row small { flex: none; font-size: 12px; color: var(--muted); }
.sg-slider input { flex: 1; min-width: 0; accent-color: var(--sg); }
.sg-sub-input { height: 46px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: inherit; font-size: 16px; }
.sg-sub-input:focus { outline: 0; border-color: var(--sg); box-shadow: 0 0 0 3px var(--sg-t); }
.sg-panel > .btn { justify-self: start; width: auto; padding: 0 16px; }
.sg-save { display: grid; gap: 8px; margin-top: 4px; }
.sg-save .btn:disabled { opacity: .6; }
.sg-status { min-height: 1.5em; margin: 0; font-size: 13px; color: var(--muted); text-align: center; }
.sg-restart { justify-self: center; }
