*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.75; color: var(--text-body); background: var(--bg-light); }
.mof-page { min-height: 100vh; padding: 40px 28px 64px; }
.mof-wrap { max-width: 780px; margin: 0 auto; }
.mof-loading { text-align: center; color: var(--text-light); }
.mof-logo { display: block; height: 44px; width: auto; margin: 0 auto 28px; mix-blend-mode: multiply; }
.mof-card { background: var(--bg-white); border: 1px solid var(--border-soft); border-top: 3px solid var(--purple); border-radius: var(--radius-card); box-shadow: var(--shadow-soft); padding: 40px 40px 32px; }
.mof-title { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; line-height: 1.15; color: var(--text-dark); margin: 0 0 8px; }
.mof-progress { height: 4px; background: var(--bg-soft); border-radius: 2px; margin: 0 0 28px; overflow: hidden; }
.mof-progress > i { display: block; height: 100%; width: 0; background: var(--purple); transition: width .3s; }

.mof-block { margin: 0 0 26px; }
.mof-block[hidden] { display: none; }
.mof-h { font-weight: 700; color: var(--text-dark); margin: 8px 0 0; line-height: 1.2; }
.mof-h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; }
.mof-h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.mof-h3 { font-size: 1.4rem; }
.mof-p p, .mof-desc p { margin: 0; }
.mof-gap { height: .7em; }
.mof-p a, .mof-desc a { color: var(--purple); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.mof-p a:hover, .mof-desc a:hover { color: var(--purple-hover); }
.mof-ul { list-style: none; margin: 4px 0; padding: 0; }
.mof-ul li { position: relative; padding-left: 22px; margin: 2px 0; }
.mof-ul li::before { content: ''; position: absolute; left: 0; top: .8em; width: 12px; height: 3px; border-radius: 2px; background: var(--gradient); }
.mof-q { font-size: 1.4rem; font-weight: 700; line-height: 1.3; color: var(--text-dark); margin: 0 0 6px; }
.mof-q label { display: block; font: inherit; color: inherit; cursor: pointer; }
.mof-hr { border: 0; height: 3px; width: 60px; background: var(--gradient); border-radius: 2px; margin: 8px 0; }
.mof-label { display: block; font-size: 1.05rem; font-weight: 600; color: var(--text-dark); margin: 0 0 4px; }
.mof-req { color: var(--orange); margin-left: 3px; }
.mof-desc { margin: 0 0 10px; font-size: inherit; color: var(--text-body); }
.mof-input, .mof-select, .mof-textarea {
  width: 100%; font: inherit; color: var(--text-body); background: var(--bg-white);
  border: 1.5px solid var(--border-soft); border-radius: var(--radius-input); padding: 10px 14px; transition: border-color .15s, box-shadow .15s;
}
.mof-textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.mof-input:focus, .mof-select:focus, .mof-textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(131, 0, 233, .14); }
.mof-input::placeholder, .mof-textarea::placeholder { color: #B6AED6; }
.mof-choices { display: grid; gap: 8px; }
.mof-choice { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border: 1.5px solid var(--border-soft); border-radius: var(--radius-input); cursor: pointer; background: var(--bg-white); transition: border-color .15s, background .15s; }
.mof-choice:hover { border-color: var(--purple); }
.mof-choice input { accent-color: var(--purple); width: 18px; height: 18px; margin: 0; flex: none; }
.mof-choice:has(input:checked) { border-color: var(--purple); background: var(--bg-light); }
.mof-choice small { margin-left: auto; color: var(--text-light); }
.mof-stars { display: flex; gap: 6px; }
.mof-star { font-size: 2rem; line-height: 1; background: none; border: 0; padding: 2px; cursor: pointer; color: var(--border-soft); transition: color .1s, transform .1s; font-family: inherit; }
.mof-star.on { color: var(--purple); }
.mof-star:hover { transform: scale(1.12); }
.mof-scale { display: flex; flex-wrap: wrap; gap: 6px; }
.mof-scale button { min-width: 44px; height: 44px; border: 1.5px solid var(--border-soft); background: var(--bg-white); border-radius: 12px; font: inherit; font-weight: 600; color: var(--text-body); cursor: pointer; }
.mof-scale button.on { background: var(--purple); border-color: var(--purple); color: #fff; }
.mof-scale-lbl { display: flex; justify-content: space-between; font-size: .85rem; color: var(--text-light); margin-top: 4px; }
.mof-sig { border: 1.5px dashed var(--border-soft); border-radius: var(--radius-input); background: var(--bg-white); position: relative; }
.mof-sig canvas { display: block; width: 100%; height: 160px; touch-action: none; cursor: crosshair; }
.mof-sig .mof-link { position: absolute; right: 10px; top: 8px; }
.mof-link { background: none; border: 0; padding: 0; font: inherit; font-size: .9rem; color: var(--purple); cursor: pointer; text-decoration: underline; }
.mof-calc { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 16px; background: var(--bg-light); border: 1px solid var(--border-soft); border-left: 4px solid var(--purple); border-radius: 0 8px 8px 0; }
.mof-calc strong { font-size: 1.3rem; color: var(--text-dark); }
.mof-err { display: none; color: var(--error); font-size: .9rem; margin-top: 6px; }
.mof-block.has-err .mof-err { display: block; }
.mof-block.has-err .mof-input, .mof-block.has-err .mof-select, .mof-block.has-err .mof-textarea, .mof-block.has-err .mof-choice { border-color: var(--error); }
.mof-alert { margin: 0 0 20px; padding: 12px 16px; border-radius: 10px; background: #FBEAE9; color: var(--error); border: 1px solid #F0C4C1; }
.mof-alert.ok { background: #E8F4EE; color: var(--success); border-color: #BFDFCE; }

.mof-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 30px; }
.mof-btn { font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; border-radius: var(--radius-btn); padding: 12px 32px; border: 1.5px solid transparent; transition: box-shadow .15s, transform .1s, filter .15s; }
.mof-btn:disabled { opacity: .6; cursor: default; }
.mof-btn-primary { background: var(--gradient); color: #fff; }
.mof-btn-primary:hover:not(:disabled) { box-shadow: var(--shadow-hover); filter: brightness(1.05); }
.mof-btn-ghost { background: var(--bg-white); color: var(--text-body); border-color: var(--border-soft); }
.mof-btn-ghost:hover { border-color: var(--purple); color: var(--purple); }
.mof-thanks { text-align: center; padding: 24px 0; }
.mof-thanks .mof-hr { margin: 14px auto; }
.mof-badge { text-align: center; font-size: .85rem; color: var(--text-light); margin-top: 22px; }

body.mof-embed { background: transparent; }
body.mof-embed .mof-page { padding: 0; min-height: 0; }
body.mof-embed .mof-card { box-shadow: none; }
@media (max-width: 600px) {
  .mof-page { padding: 24px 14px 48px; }
  .mof-card { padding: 28px 20px 24px; }
  .mof-actions { flex-direction: column-reverse; align-items: stretch; }
  .mof-btn { width: 100%; }
}
