:root {
  --ink: #342a24;
  --muted: #786a60;
  --cream: #f8f1e7;
  --paper: #fffdf9;
  --line: #dfd0c1;
  --brown: #7a4d32;
  --brown-dark: #56321f;
  --yellow: #f1c75b;
  --green: #1fa463;
  --shadow: 0 14px 35px rgba(73, 47, 31, .12);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 50% 0, #fffaf2 0, var(--cream) 34rem); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.shell { width: min(100%, 720px); margin: 0 auto; padding: 0 16px 92px; }
.event-bar { margin: 0 -16px; padding: 10px 16px; text-align: center; color: #fff; background: var(--brown-dark); font-size: 13px; font-weight: 800; letter-spacing: .05em; }
.hero { position: relative; min-height: 450px; padding: 30px 6px 20px; text-align: center; overflow: hidden; }
.eyebrow { color: var(--brown); font-size: 13px; font-weight: 900; letter-spacing: .12em; }
h1 { margin: 8px auto 8px; max-width: 12em; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(30px, 9vw, 48px); line-height: 1.25; }
.lead { margin: 0 auto; color: var(--muted); line-height: 1.75; }
.hero-cat-wrap { position: relative; width: min(62vw, 320px); margin: 2px auto -8px; }
.hero-cat { display: block; width: 100%; filter: drop-shadow(0 16px 16px rgba(73,47,31,.13)); }
.hero-neck-plate { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.trust-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 4px 0 18px; }
.trust { padding: 10px 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.72); font-size: 12px; font-weight: 800; }
.privacy-note { display: flex; gap: 9px; align-items: flex-start; margin: 0 0 16px; padding: 12px 14px; border-radius: 13px; color: #43604f; background: #edf7f0; font-size: 13px; line-height: 1.55; text-align: left; }
.privacy-note span:first-child { font-size: 20px; }
.primary, .secondary, .line-button { display: flex; width: 100%; min-height: 54px; align-items: center; justify-content: center; gap: 8px; padding: 13px 18px; border-radius: 999px; font-weight: 900; text-decoration: none; }
.primary { border: 0; color: #fff; background: var(--brown); box-shadow: 0 8px 20px rgba(122,77,50,.22); }
.primary:disabled { opacity: .45; cursor: not-allowed; }
.secondary { border: 2px solid var(--brown); color: var(--brown); background: #fff; }
.line-button { border: 0; color: #fff; background: var(--green); }
.microcopy { margin: 10px 4px 0; color: var(--muted); font-size: 12px; line-height: 1.55; text-align: center; }
.progress-wrap { position: sticky; top: 0; z-index: 5; margin: 0 -16px 16px; padding: 10px 16px; background: rgba(248,241,231,.94); backdrop-filter: blur(10px); }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 6px; font-size: 12px; font-weight: 800; }
.progress { height: 7px; overflow: hidden; border-radius: 999px; background: #e5d8ca; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--brown); transition: width .25s ease; }
.panel { padding: 22px 18px; border: 1px solid rgba(223,208,193,.8); border-radius: 22px; background: var(--paper); box-shadow: var(--shadow); }
.panel + .panel, .panel + .faq { margin-top: 16px; }
.step-title { margin: 0 0 7px; font-size: 23px; line-height: 1.4; }
.step-note { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.photo-warning { margin: -4px 0 16px; padding: 13px 14px; border: 1px solid #e7cbbd; border-radius: 14px; color: #68473a; background: #fff4ee; font-size: 12px; line-height: 1.55; }
.photo-warning b { display: block; margin-bottom: 5px; font-size: 13px; }
.photo-warning ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 18px; margin: 0 0 7px; padding-left: 18px; }
.photo-warning small { display: block; color: var(--muted); line-height: 1.55; }
.upload { display: block; padding: 18px; border: 2px dashed #c9ad98; border-radius: 18px; background: #fffaf3; text-align: center; }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-preview { display: none; width: 100%; max-height: 330px; margin-bottom: 12px; object-fit: contain; border-radius: 12px; background: #eee6dc; }
.upload-preview.visible { display: block; }
.upload-icon { font-size: 34px; }
.upload strong, .upload small { display: block; }
.upload small { margin-top: 6px; color: var(--muted); line-height: 1.55; }
.processing { display: grid; justify-items: center; gap: 7px; margin-top: 14px; padding: 15px; border-radius: 14px; color: #4f463f; background: #fff4d7; text-align: center; }
.processing small { color: var(--muted); font-size: 11px; }
.spinner { width: 28px; height: 28px; border: 4px solid #ead7a3; border-top-color: var(--brown); border-radius: 50%; animation: spin .8s linear infinite; }
.processing.done { color: #43604f; background: #edf7f0; }
.processing.done .spinner { display: grid; border: 0; color: #fff; background: var(--green); animation: none; place-items: center; }
.processing.done .spinner::before { content: '✓'; font-size: 18px; font-weight: 900; line-height: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
.field { margin: 18px 0; }
.field > label, .legend { display: block; margin-bottom: 8px; font-weight: 900; }
.field-note { display: block; margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.field-note b { color: var(--ink); }
.required { margin-left: 5px; padding: 2px 6px; border-radius: 5px; color: #fff; background: #b85043; font-size: 10px; vertical-align: 2px; }
.input { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #bca998; border-radius: 11px; color: var(--ink); background: #fff; }
textarea.input { min-height: 100px; resize: vertical; }
.hardware-photo { display: block; width: 100%; margin: 0 0 12px; border-radius: 14px; }
.choices { display: grid; gap: 9px; }
.choices.two { grid-template-columns: repeat(2, 1fr); }
.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: flex; min-height: 52px; align-items: center; justify-content: center; padding: 9px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; text-align: center; font-size: 14px; font-weight: 800; transition: .15s; }
.choice input:checked + span { border-color: var(--brown); color: var(--brown-dark); background: #fff1dc; box-shadow: inset 0 0 0 1px var(--brown); }
.choice input:focus-visible + span, button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid rgba(38,118,190,.35); outline-offset: 2px; }
.pose-grid { grid-template-columns: repeat(3, 1fr); }
.pose-card span { flex-direction: column; min-height: 112px; gap: 6px; font-size: 12px; }
.pose-card img { width: 62px; height: 62px; object-fit: contain; }
.actions { display: grid; gap: 10px; margin-top: 20px; }
.usage-choices { grid-template-columns: repeat(2, 1fr); }
.auto-suggestion { display: grid; gap: 4px; margin: 16px 0 20px; padding: 15px; border: 2px solid #e8c45e; border-radius: 15px; color: var(--brown-dark); background: #fff6d8; text-align: center; }
.auto-suggestion span, .auto-suggestion small { font-size: 12px; }
.auto-suggestion b { font-size: 17px; }
.collar-options { display: grid; gap: 13px; margin: 16px 0; }
.collar-options fieldset { min-width: 0; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: #fffaf3; }
.collar-options legend { padding: 0 5px; font-weight: 900; }
.collar-options fieldset > p { margin: 0 0 10px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.collar-options .choice span { justify-content: flex-start; min-height: 48px; padding-inline: 12px; text-align: left; }
.collar-options .choices.two .choice span { justify-content: center; text-align: center; }
.collar-caution, .collar-recommend { display: block; margin-top: 10px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.collar-recommend { color: #43604f; }
.error { min-height: 20px; margin: 8px 0 0; color: #a33d34; font-size: 13px; font-weight: 700; }
.results-head { text-align: center; }
.recommend { display: inline-block; margin: 8px auto 16px; padding: 6px 12px; border-radius: 999px; color: var(--brown-dark); background: #ffe59d; font-size: 13px; font-weight: 900; }
.style-switcher { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 14px; }
.style-switch { display: grid; min-width: 0; min-height: 57px; place-content: center; gap: 1px; padding: 7px 3px; border: 1.5px solid var(--line); border-radius: 12px; color: var(--muted); background: #fff; }
.style-switch b { font-size: 13px; }
.style-switch small { font-size: 9px; }
.style-switch.selected { border-color: var(--brown); color: var(--brown-dark); background: #fff1dc; box-shadow: inset 0 0 0 1px var(--brown); }
.swipe-enabled .generated-stage { touch-action: pan-y pinch-zoom; user-select: none; -webkit-user-select: none; }
.swipe-hint { margin: 10px 0 16px; text-align: center; font-size: 12px; color: var(--brown-dark); line-height: 1.8; }
.miniature-style-note { display: grid; gap: 3px; margin-bottom: 14px; padding: 11px 13px; border: 1px solid #e8c45e; border-radius: 12px; color: var(--brown-dark); background: #fff6d8; text-align: center; }
.miniature-style-note span { color: var(--muted); font-size: 11px; }
.result-list { display: grid; gap: 14px; }
.result-list.single-result { grid-template-columns: minmax(0, 430px); justify-content: center; }
.result-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.result-card.recommended { border: 3px solid var(--yellow); }
.recommended-ribbon { position: absolute; z-index: 2; top: 10px; left: 10px; padding: 5px 9px; border-radius: 999px; background: var(--yellow); font-size: 11px; font-weight: 900; }
.generated-stage { position: relative; aspect-ratio: 640 / 540; overflow: hidden; background: #f3ece3; }
.plate-preview-svg { display: block; width: 100%; height: auto; }
.name-fit-note { color: var(--muted); font-size: 12px; }
.plate-pet { position: absolute; z-index: 2; top: 5px; right: 7%; width: 43%; height: 123px; object-fit: contain; object-position: 50% 100%; filter: drop-shadow(7px 8px 4px rgba(52,42,36,.22)); }
.generated-silhouette .plate-pet { filter: drop-shadow(5px 7px 3px rgba(52,42,36,.18)); }
.generated-plate { position: absolute; left: 50%; bottom: 18px; translate: -50% 0; width: 88%; aspect-ratio: 2 / 1; border: 4px solid #dedbd4; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 2px #f1eee8, 0 7px 16px rgba(0,0,0,.15); color: #241c18; }
.plate-hole { position: absolute; top: 1%; left: 1.5%; width: 7%; aspect-ratio: 1; border: 2px solid #dedbd4; border-radius: 50%; background: #6f6b67; box-shadow: inset 0 1px 2px rgba(0,0,0,.3); }
.plate-top b { position: absolute; top: 15%; left: 12.8%; max-width: 35%; overflow: hidden; font-size: 28px; font-weight: 500; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.plate-top strong { position: absolute; top: 9%; right: 10.5%; font-size: 38px; line-height: 1; letter-spacing: .015em; transform: scaleX(.92); transform-origin: right top; }
.paw-mark { position: absolute; top: 56%; left: 4.7%; display: block; width: 34px; height: 31px; }
.paw-mark svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.plate-bottom strong { position: absolute; right: 12%; bottom: 7%; font-size: 70px; line-height: .9; letter-spacing: .005em; transform: scaleX(.82); transform-origin: right bottom; }
.result-visual { position: relative; height: 245px; overflow: hidden; background: #eee7df; }
.result-visual > img.example { width: 100%; height: 100%; object-fit: cover; }
.result-pose { position: absolute; z-index: 1; top: 22px; left: 50%; width: 110px; height: 110px; translate: -50% 0; object-fit: contain; filter: drop-shadow(0 3px 2px rgba(255,255,255,.9)); }
.user-photo-inset { position: absolute; right: 10px; bottom: 10px; width: 84px; height: 84px; border: 3px solid #fff; border-radius: 12px; object-fit: cover; box-shadow: 0 4px 10px rgba(0,0,0,.2); }
.plate-mock { position: absolute; left: 50%; bottom: 12px; translate: -50% 0; width: 80%; min-height: 74px; padding: 8px 84px 8px 12px; border: 4px solid #ece9e1; border-radius: 8px; background: rgba(255,255,255,.94); box-shadow: 0 5px 14px rgba(0,0,0,.16); font-weight: 900; text-align: center; }
.plate-mock b { display: block; font-size: 20px; }
.plate-mock small { display: block; margin-top: 3px; }
.result-copy { padding: 15px; }
.result-copy h3 { margin: 0 0 6px; font-size: 19px; }
.result-copy p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.adjustment-note { display: flex; gap: 10px; align-items: flex-start; margin: 16px 0; padding: 13px 14px; border-radius: 14px; color: #63462f; background: #fff3d9; font-size: 13px; line-height: 1.55; }
.adjustment-note > span:first-child { font-size: 22px; font-weight: 900; }
.usage-example { overflow: hidden; margin: 16px 0; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.usage-example img { display: block; width: 100%; height: 320px; padding: 8px; object-fit: contain; object-position: center; background: #f3ece3; }
.usage-example div { padding: 14px 15px 16px; }
.usage-example span { color: #9a6a45; font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.usage-example h3 { margin: 3px 0 5px; font-size: 17px; }
.usage-example p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.consult-summary { margin: 18px 0; padding: 15px; border-radius: 15px; background: #f6efe7; font-size: 13px; line-height: 1.8; }
.share-status { min-height: 21px; margin: 8px 0; color: #43604f; font-size: 13px; font-weight: 700; text-align: center; }
.share-guide { margin-top: 14px; padding: 14px; border: 1px solid #bde1ca; border-radius: 14px; background: #effaf3; font-size: 13px; line-height: 1.7; }
.share-guide ol { margin: 6px 0 0; padding-left: 21px; }
.share-guide a { color: #087b44; font-weight: 900; }
.faq { padding: 20px 18px; border-radius: 22px; background: #fff; }
.faq h2 { margin: 0 0 12px; font-size: 20px; }
.faq-search { position: relative; margin-bottom: 12px; }
.faq-search input { padding-left: 38px; }
.faq-search span { position: absolute; top: 13px; left: 13px; }
details { border-top: 1px solid #eadfd4; }
details:last-of-type { border-bottom: 1px solid #eadfd4; }
summary { padding: 15px 3px; font-weight: 800; cursor: pointer; }
.answer { padding: 0 3px 15px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.empty-faq { display: none; padding: 14px 0; color: var(--muted); font-size: 14px; }
.footer { padding: 24px 0; color: var(--muted); font-size: 11px; line-height: 1.7; text-align: center; }
.hidden { display: none !important; }
.fade-in { animation: fade .3s ease both; }
@keyframes fade { from { opacity: 0; translate: 0 8px; } }
@media (min-width: 640px) {
  .shell { padding-inline: 24px; }
  .event-bar, .progress-wrap { margin-inline: -24px; }
  .panel { padding: 30px; }
  .result-list { grid-template-columns: repeat(3, 1fr); }
  .result-visual { height: 210px; }
  .result-copy { min-height: 154px; }
  .plate-mock { width: 90%; padding-right: 62px; }
}
@media (max-width: 390px) { .photo-warning ul { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
.cutout-help { margin: 14px 0; font-size: 13px; line-height: 1.7; }
.cutout-editor { border: 0; border-radius: 18px; padding: 20px; width: min(540px, calc(100vw - 24px)); max-height: 94dvh; overflow: auto; box-sizing: border-box; color: #35291f; }
.cutout-editor::backdrop { background: #0008; }
.cutout-editor canvas { display: block; width: 100%; height: auto; touch-action: none; background: repeating-conic-gradient(#eee 0% 25%, #fff 0% 50%) 0 / 20px 20px; border: 1px solid #ddd; margin: 12px 0; }
.cutout-editor p { font-size: 13px; line-height: 1.6; }
.cutout-editor .actions { flex-wrap: wrap; }
/* Candidates stay in memory; compact cards remain side by side on phones. */
.comparison-section { margin: 24px 0; padding: 16px; background: #f7f1e7; border-radius: 16px; }
#comparison-tray { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 12px; }
#comparison-tray article { min-width: 0; }
#comparison-tray img { display: block; width: 100%; height: auto; border-radius: 8px; }
#comparison-tray h4 { overflow-wrap: anywhere; }
#comparison-tray .secondary { display: block; box-sizing: border-box; width: 100%; margin-top: 8px; font-size: 13px; text-align: center; }
.cutout-editor [aria-pressed="true"] { background: #eed16d; border-color: #745337; }
.cutout-editor .editor-silhouette-preview { width: 76px; height: 76px; object-fit: contain; float: right; background: #fff; border: 1px solid #ddd; border-radius: 8px; }
