/* Simulador de dobramento HP */
.hp-head h1 { margin-bottom: 4px; }
.hp-sub { margin: 0 0 18px; color: var(--muted); }
.hp-layout { display: grid; gap: 24px; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); align-items: start; }
.hp-toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: end; justify-content: space-between; margin-bottom: 12px; }
.hp-select { display: grid; gap: 4px; font-size: .875rem; font-weight: 600; color: var(--teal-text); }
.hp-select select { min-height: var(--tap); border: 2px solid var(--border); border-radius: 10px; padding: 6px 10px; font: 500 1rem var(--font-body); background: #fff; color: var(--ink); max-width: 100%; }
.hp-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.hp-svg { display: block; width: 100%; max-width: 640px; height: auto; background: #F7FAF9; border-radius: 12px; border: 1px solid var(--border); touch-action: none; user-select: none; }
.hp-gridline { stroke: #D3E2DA; stroke-width: 1; }
.hp-chainline { stroke: var(--muted-2); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.hp-contact { stroke: var(--lime); stroke-width: 6; stroke-dasharray: 3 7; stroke-linecap: round; }
.hp-res { cursor: pointer; outline: none; }
.hp-res:hover .hp-res__c { stroke-width: 4; }
.hp-res__hit { fill: transparent; stroke: none; }
.hp-res__ring { fill: none; stroke: #E8A100; stroke-width: 3; }
.hp-svg.is-selecting .hp-res:not(.is-selected) { opacity: .5; }
.hp-res--hint .hp-res__ring, .hp-res--hint.is-selected .hp-res__ring { stroke: #B45F06; stroke-dasharray: 5 3; }
.hp-res__c { stroke-width: 3; }
.hp-res--h .hp-res__c { fill: var(--navy); stroke: var(--navy); }
.hp-res--p .hp-res__c { fill: #fff; stroke: var(--navy); }
.hp-res--h .hp-res__t { fill: #fff; font-weight: 600; }
.hp-res--p .hp-res__t { fill: var(--navy); font-weight: 600; }
.hp-res:focus-visible .hp-res__c { stroke: #E8A100; stroke-width: 5; }
.hp-res.is-drag { opacity: .35; }
.hp-res.is-drag { cursor: grabbing; }
.hp-ghost { fill: var(--lime); fill-opacity: .8; stroke: var(--navy); stroke-width: 3; pointer-events: none; }
.hp-target { fill: rgba(140, 198, 63, .25); stroke: var(--lime); stroke-width: 2; pointer-events: none; }
.hp-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 12px 0 8px; padding: 0; font-size: .9375rem; }
.hp-legend li { display: inline-flex; align-items: center; gap: 8px; }
.hp-dot { display: inline-block; width: 16px; height: 16px; border-radius: 50%; box-sizing: border-box; }
.hp-dot--h { background: var(--navy); }
.hp-dot--p { background: #fff; border: 3px solid var(--navy); }
.hp-dot--c { width: 24px; height: 0; border-radius: 0; border-top: 4px dotted var(--lime-text); }
.hp-msg { min-height: 1.6em; margin: 4px 0 0; font-weight: 500; }
.hp-side { display: grid; gap: 16px; }
.hp-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 20px; }
.hp-card__title { margin: 0 0 8px; font-size: 1rem; color: var(--teal-text); text-transform: uppercase; letter-spacing: .06em; }
.hp-energy { margin: 0; font: 700 3.25rem/1 var(--font-display); color: var(--navy); }
.hp-energy-text, .hp-tip { margin: 6px 0 0; }
.hp-best { margin: 8px 0 0; font-weight: 600; color: var(--ok-text); }
.hp-best[hidden], .hp-result[hidden], .hp-progress[hidden] { display: none; }
.hp-seq { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; padding: 0; }
.hp-cell { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; border: 2px solid var(--navy); font-weight: 600; box-sizing: border-box; }
.hp-cell--h { background: var(--navy); color: #fff; }
.hp-cell--p { background: #fff; color: var(--navy); }
.hp-vs { margin: 0 0 6px; font: 700 1.25rem var(--font-display); color: var(--navy); }
.hp-seed { display: grid; gap: 4px; font-size: .875rem; font-weight: 600; }
.hp-seed input { min-height: var(--tap); border: 2px solid var(--border); border-radius: 10px; padding: 6px 10px; font: 500 1rem var(--font-mono); max-width: 14ch; }
.hp-progress .tr-bar { background: var(--border); }
.hp-progress .tr-bar__fill { background: var(--green-500); }
@media (max-width: 860px) { .hp-layout { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .tr-bar__fill { transition: none; } }

/* Casas verdes, prévia, dica e tutorial */
.hp-tcell { cursor: pointer; }
.hp-tcell__bg { fill: rgba(46, 160, 100, .22); stroke: #1F8A57; stroke-width: 2; }
.hp-tcell__dot { fill: #1F8A57; }
.hp-tcell:hover .hp-tcell__bg, .hp-tcell.is-hover .hp-tcell__bg { fill: rgba(46, 160, 100, .5); stroke-width: 3; }
.hp-tcell--hint .hp-tcell__bg { fill: rgba(232, 161, 0, .3); stroke: #B45F06; stroke-width: 3; }
.hp-tcell__star { fill: #7A3F00; pointer-events: none; }
.hp-previewline { stroke: #1F8A57; stroke-width: 4; stroke-dasharray: 2 8; stroke-linecap: round; stroke-linejoin: round; opacity: .85; pointer-events: none; }
.hp-preview { min-height: 1.6em; margin: 8px 0 0; font-weight: 600; color: var(--teal-text); }
.hp-green { display: inline-block; padding: 0 8px; border-radius: 6px; background: rgba(46, 160, 100, .22); border: 2px solid #1F8A57; font-weight: 600; }
.hp-howto { margin: 0 0 12px; padding: 10px 14px; background: var(--info-bg); border-radius: 10px; }
.hp-dot--g { background: rgba(46, 160, 100, .3); border: 2px solid #1F8A57; border-radius: 4px; }
.hp-options { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin: 8px 0; }
.hp-check { display: inline-flex; gap: 8px; align-items: center; min-height: var(--tap); }
.hp-check input { width: 20px; height: 20px; }
.hp-goal { margin: 0 0 8px; }
.hp-bar { height: 12px; border-radius: 12px; background: var(--border); overflow: hidden; margin: 6px 0 8px; }
.hp-bar[hidden] { display: none; }
.hp-bar__fill { display: block; height: 100%; width: 0; background: var(--green-500); border-radius: 12px; transition: width .3s; }
.hp-stats { margin: 0; font-size: .9375rem; color: var(--muted); }
.hp-guide { background: var(--navy); color: #fff; border-radius: 14px; padding: 16px 22px; margin: 0 0 18px; display: grid; gap: 4px; }
.hp-guide[hidden] { display: none; }
.hp-guide__step { margin: 0; font-size: .8125rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--mint); }
.hp-guide__title { margin: 0; color: #fff; font-size: 1.125rem; }
.hp-guide__text { margin: 0 0 6px; max-width: 70ch; color: #E3F4E8; }
.hp-guide__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hp-guide :focus-visible { outline-color: var(--lime); }
.hp-buttons .btn { min-height: var(--tap); }
@media (prefers-reduced-motion: reduce) { .hp-bar__fill { transition: none; } }