:root {
  --bg: #f5f3f8;
  --surface: #ffffff;
  --surface-soft: #faf8fc;
  --text: #231a2c;
  --muted: #71677b;
  --border: #ded7e5;
  --primary: #7a3f8f;
  --primary-hover: #653276;
  --primary-soft: #f2e9f6;
  --accent: #a15b35;
  --accent-soft: #fff1e8;
  --focus: rgba(122, 63, 143, 0.22);
  --shadow: 0 12px 32px rgba(43, 25, 52, 0.09);
  --radius: 17px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif; line-height: 1.7; }
body.dark {
  --bg: #15111a;
  --surface: #211a28;
  --surface-soft: #1a151f;
  --text: #f6f0f8;
  --muted: #beb1c5;
  --border: #493c52;
  --primary: #d1a2e0;
  --primary-hover: #e0b9eb;
  --primary-soft: #3a2742;
  --accent: #efb48e;
  --accent-soft: #422a20;
  --focus: rgba(209, 162, 224, 0.24);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.27);
}
button, select { font: inherit; }
button { cursor: pointer; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-inner, .page-shell, .site-footer { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.header-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding: 28px 0 24px; }
.eyebrow { margin: 0 0 4px; color: var(--primary); font-weight: 800; font-size: 0.86rem; }
h1, h2, h3, p, span, strong { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: clamp(1.85rem, 4vw, 2.55rem); line-height: 1.25; }
.lead { max-width: 790px; margin: 10px 0 0; color: var(--muted); }
.page-shell { padding: 28px 0 56px; }
.tool-grid { display: grid; grid-template-columns: minmax(270px, 0.7fr) minmax(0, 1.3fr); gap: 24px; align-items: start; }
.panel, .content-section { min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel { padding: 22px; }
.panel-heading h2, .content-section h2 { margin: 0; line-height: 1.35; }
.panel-heading p { margin: 5px 0 18px; color: var(--muted); font-size: 0.92rem; }
.input-label { display: block; margin: 15px 0 7px; font-weight: 800; }
select { width: 100%; min-height: 46px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-soft); color: var(--text); padding: 9px 11px; outline: none; }
select:focus, button:focus-visible, summary:focus-visible { border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus); outline: none; }
.theme-toggle, .primary-button, .secondary-button, .ghost-button { min-height: 44px; border-radius: 10px; padding: 10px 16px; font-weight: 800; border: 1px solid transparent; }
.theme-toggle, .ghost-button { background: var(--surface-soft); color: var(--text); border-color: var(--border); }
.primary-button { background: var(--primary); color: #fff; }
body.dark .primary-button { color: #211329; }
.primary-button:hover { background: var(--primary-hover); }
.secondary-button { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }
.main-generate { width: 100%; min-height: 54px; margin-top: 20px; font-size: 1.02rem; }
.reset-button { width: 100%; margin-top: 9px; }
.difficulty-guide { display: grid; gap: 7px; margin-top: 15px; }
.difficulty-guide div { display: flex; justify-content: space-between; gap: 10px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-soft); padding: 8px 10px; font-size: 0.82rem; }
.difficulty-guide span { color: var(--muted); }
.notice-box, .important-note { margin-top: 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); padding: 14px; }
.notice-box p, .important-note p { margin: 5px 0 0; color: var(--muted); font-size: 0.9rem; }
.creative-card { min-height: 420px; border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(145deg, var(--primary-soft), var(--surface) 58%, var(--accent-soft)); padding: 24px; }
.card-header { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.card-kicker { font-size: 0.73rem; letter-spacing: 0.12em; font-weight: 900; color: var(--muted); }
.difficulty-pill { border: 1px solid var(--border); border-radius: 999px; background: var(--surface); padding: 4px 10px; font-size: 0.78rem; font-weight: 800; }
.creative-card h2 { margin: 28px 0 18px; font-size: clamp(1.5rem, 3vw, 2.15rem); line-height: 1.45; }
.card-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.card-item { border: 1px solid var(--border); border-radius: 12px; background: color-mix(in srgb, var(--surface) 88%, transparent); padding: 13px; }
.card-item.full { grid-column: 1 / -1; }
.card-item span { display: block; color: var(--muted); font-size: 0.76rem; font-weight: 800; }
.card-item strong { display: block; margin-top: 4px; font-size: 1.04rem; }
.empty-message { grid-column: 1 / -1; margin: 80px 0; text-align: center; color: var(--muted); }
.mobile-generate { display: none; width: 100%; margin-top: 14px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.status-message { min-height: 1.5em; margin: 10px 0 0; color: var(--primary); font-weight: 800; font-size: 0.9rem; }
.status-message.error { color: #b42318; }
.content-section { margin-top: 28px; padding: 26px; }
.content-section > p { margin: 10px 0 0; color: var(--muted); }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }
.info-grid article { border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); padding: 16px; }
.info-grid h3 { margin: 0; font-size: 1rem; }
.info-grid p { margin: 7px 0 0; color: var(--muted); font-size: 0.93rem; }
.faq-section details { border-top: 1px solid var(--border); padding: 14px 0; }
.faq-section details:first-of-type { margin-top: 16px; }
.faq-section summary { cursor: pointer; font-weight: 800; }
.faq-section details p { margin: 9px 0 0; color: var(--muted); }
.site-footer { padding: 0 0 28px; color: var(--muted); text-align: center; font-size: 0.86rem; }
@media (max-width: 900px) { .tool-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .header-inner { flex-direction: column; } .theme-toggle { width: 100%; } }
@media (max-width: 600px) { .header-inner, .page-shell, .site-footer { width: min(100% - 22px, 1180px); } .panel, .content-section { padding: 18px; } .tool-grid { display: flex; flex-direction: column; } .result-panel { order: 1; display: flex; flex-direction: column; } .settings-panel { order: 2; } .creative-card { order: 1; min-height: 390px; } .mobile-generate { display: block; order: 2; } .result-actions { order: 3; display: grid; grid-template-columns: 1fr; } .result-actions button { width: 100%; } .status-message { order: 4; } .main-generate { display: none; } .card-body, .info-grid { grid-template-columns: 1fr; } .card-item.full { grid-column: auto; } }
