.folk-custom-title { align-items: flex-start; }
.folk-custom-controls { padding: 1.2rem; border: 1px solid var(--border-color); border-radius: 12px; background: var(--background-color); }
.folk-custom-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.folk-custom-field { display: grid; align-content: start; gap: .4rem; }
.folk-custom-field label { font-weight: 800; }
.folk-custom-field select { width: 100%; min-height: 46px; }
.folk-custom-field small { color: var(--text-muted); line-height: 1.55; }
.folk-custom-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin-top: 1.2rem; }
.folk-custom-actions button { min-height: 48px; }
.folk-status { min-height: 1.5em; margin: .8rem 0 0; color: var(--text-muted); font-weight: 700; }
.folk-status.is-error { color: var(--error-text); }
.folk-result { display: grid; gap: 1rem; margin-top: 1.2rem; scroll-margin-top: 5rem; }
.folk-result-heading { padding: 1.25rem; border-radius: 14px; background: linear-gradient(135deg, #4f466f, #75658f); color: #fff; }
.folk-result-heading__label { margin: 0 0 .35rem; color: rgba(255,255,255,.76); font-size: .78rem; font-weight: 800; letter-spacing: .08em; }
.folk-result-heading h2 { margin: 0; color: #fff; font-size: clamp(1.65rem, 5vw, 2.2rem); letter-spacing: .06em; }
.folk-result-heading p { margin: .55rem 0 0; color: rgba(255,255,255,.9); line-height: 1.7; }
.folk-condition-summary { display: flex; flex-wrap: wrap; gap: .45rem; }
.folk-condition-summary span { padding: .35rem .65rem; border: 1px solid var(--border-color); border-radius: 999px; background: var(--card-bg); color: var(--text-muted); font-size: .82rem; }
.folk-result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.folk-result-card { padding: 1.05rem 1.1rem; border: 1px solid var(--border-color); border-radius: 12px; background: var(--card-bg); }
.folk-result-card.is-wide { grid-column: 1 / -1; }
.folk-result-card h3 { display: flex; align-items: center; gap: .5rem; margin: 0 0 .6rem; color: var(--primary-color); font-size: 1rem; line-height: 1.5; }
.folk-result-card p { margin: 0; line-height: 1.85; }
.folk-result-card p + p { margin-top: .75rem; }
.folk-result-card.is-observation { border-top: 4px solid #55856d; }
.folk-result-card.is-history { border-top: 4px solid #8c6b4a; }
.folk-result-card.is-uncertain { background: var(--background-color); }
.folk-field-notes { border-left: 4px solid #4f7f94; }
.folk-field-notes dl { display: grid; grid-template-columns: minmax(8.5rem, .34fr) minmax(0, 1fr); margin: 0; }
.folk-field-notes dt,.folk-field-notes dd { margin: 0; padding: .7rem .8rem; line-height: 1.75; }
.folk-field-notes dt { border-top: 1px solid var(--border-color); color: var(--primary-color); font-weight: 800; }
.folk-field-notes dd { border-top: 1px solid var(--border-color); }
.folk-field-notes dt:first-of-type,.folk-field-notes dt:first-of-type + dd { border-top: 0; }
.folk-story-entrance { border-color: color-mix(in srgb, #8c6b4a 55%, var(--border-color)); background: color-mix(in srgb, #8c6b4a 5%, var(--card-bg)); }
.folk-reasoning-list { margin: 0; padding-left: 1.35rem; }
.folk-reasoning-list li { padding-left: .2rem; line-height: 1.75; }
.folk-reasoning-list li + li { margin-top: .4rem; }
.folk-output-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }
.folk-output-actions button { min-height: 44px; }
.folk-note { margin-top: 1rem; padding: .85rem 1rem; border-left: 4px solid var(--primary-color); background: var(--background-color); color: var(--text-muted); line-height: 1.75; }
.folk-guide h2 { margin: 0 0 1rem; font-size: 1.45rem; line-height: 1.45; }
.folk-guide h2:not(:first-child) { margin-top: 2rem; }
.folk-guide h3 { margin: 1.35rem 0 .45rem; font-size: 1.08rem; }
.folk-guide p { margin: 0 0 1rem; line-height: 1.85; }
@media (max-width: 720px) {
    .folk-custom-fields,.folk-result-grid,.folk-custom-actions { grid-template-columns: 1fr; }
    .folk-result-card.is-wide { grid-column: auto; }
    .folk-output-actions button { flex: 1 1 100%; }
    .folk-custom-title { font-size: clamp(1.4rem, 7vw, 1.75rem); line-height: 1.4; }
    .folk-field-notes dl { grid-template-columns: 1fr; }
    .folk-field-notes dt { padding-bottom: .25rem; }
    .folk-field-notes dd { padding-top: 0; border-top: 0; }
    .folk-field-notes dt:not(:first-of-type) { margin-top: .35rem; }
}
