/* ═══ HELP + CONTACT sheet, and the page footer ═══ */
#help-sheet { position: fixed; inset: 0; z-index: 10010; display: none; align-items: center; justify-content: center; }
#help-sheet.open { display: flex; }
@media (max-width: 640px) { #help-sheet { align-items: flex-end; } }
.hp-body { padding-top: 12px; }
.hp-search { position: relative; margin-bottom: 14px; }
.hp-search span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #6B7A6E; display: flex; font-size: 16px; pointer-events: none; }
.hp-search input { width: 100%; box-sizing: border-box; padding: 12px 14px 12px 40px; border: 1.5px solid #DCE3D8; border-radius: 12px; font: inherit; font-size: 16px; background: var(--surface); color: #1B2C1A; }
.hp-search input:focus { outline: none; border-color: #2F7D3A; }
.hp-group { margin-bottom: 18px; }
.hp-group h3 { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: #6B7A6E; margin: 0 0 8px; }
.hp-item { border: 1px solid #E2E8DE; border-radius: 12px; margin-bottom: 8px; background: var(--surface); overflow: hidden; }
.hp-item[hidden] { display: none; }
.hp-item summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; min-height: 48px; box-sizing: border-box; cursor: pointer; list-style: none; font-size: 14px; font-weight: 700; color: #14261A; line-height: 1.35; }
.hp-item summary::-webkit-details-marker { display: none; }
.hp-item summary:focus-visible { outline: 2px solid #2F7D3A; outline-offset: -2px; }
.hp-chev { display: flex; color: #6B7A6E; font-size: 18px; flex-shrink: 0; transition: transform .2s; }
.hp-item[open] .hp-chev { transform: rotate(180deg); }
.hp-item[open] { border-color: #BFD8BA; }
.hp-ans { padding: 0 16px 14px; }
.hp-ans p { margin: 0 0 10px; font-size: 14px; line-height: 1.6; color: #34453A; }
.hp-go { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: var(--sprout-lt); color: #2F7D3A; font: inherit; font-size: 13px; font-weight: 700; border: 0; cursor: pointer; min-height: 36px; }
.hp-go:hover, .hp-go:focus-visible { background: #D6ECD1; outline: none; }
.hp-empty { text-align: center; padding: 28px 0; color: #6B7A6E; font-size: 14px; }
.hp-empty[hidden] { display: none; }
.hp-still { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 16px; border-radius: 14px; background: var(--sprout-lt); border: 1px solid #DCE9D8; }
.hp-still b { font-size: 15px; color: #14261A; } .hp-still p { margin: 2px 0 0; font-size: 13px; color: #5B6B5E; }
.hp-cards { display: grid; gap: 10px; margin-bottom: 8px; }
.hp-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid #DCE9D8; background: var(--sprout-lt); text-decoration: none; color: inherit; min-height: 60px; box-sizing: border-box; }
.hp-card:hover, .hp-card:focus-visible { background: var(--sprout-lt); outline: none; }
.hp-card > span { width: 42px; height: 42px; border-radius: 12px; background: #2F7D3A; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.hp-card small { display: block; font-size: 12px; color: #6B7A6E; } .hp-card b { font-size: 15px; color: #14261A; word-break: break-all; }
.hp-h { font-size: 15px; font-weight: 800; margin: 20px 0 10px; color: #14261A; }
.hp-form { display: grid; gap: 6px; }
.hp-form label { font-size: 12px; font-weight: 700; color: #44544A; margin-top: 6px; }
.hp-form input, .hp-form select, .hp-form textarea { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1.5px solid #DCE3D8; border-radius: 12px; font: inherit; font-size: 16px; background: var(--surface); color: #1B2C1A; }
.hp-form textarea { resize: vertical; min-height: 110px; }
.hp-form input:focus, .hp-form select:focus, .hp-form textarea:focus { outline: none; border-color: #2F7D3A; }
.hp-err { min-height: 18px; margin: 4px 0 0; font-size: 13px; font-weight: 600; color: #B91C1C; }
.hp-form .lg-btn { width: 100%; }
.hp-note { margin: 4px 0 0; font-size: 12px; color: #6B7A6E; text-align: center; }
.hp-back { margin: 18px 0 0; }

/* ── footer at the bottom of every page: slim and compact ── */
#app-footer { order: 99; flex-shrink: 0; margin-top: auto; padding: 12px var(--s4) calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border); background: var(--bg-app); }
.af-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.af-settings { display: none; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
@media (max-width: 768px) { .af-settings { display: flex; } }
.af-pill { display: flex; align-items: center; min-height: 40px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-sizing: border-box; }
.af-lang { flex: 1 1 140px; gap: 6px; padding: 0 4px 0 12px; position: relative; }
.af-lang .ico { font-size: 16px; color: var(--leaf); flex-shrink: 0; }
#app-footer .af-lang select { flex: 1; width: 100%; min-width: 0; min-height: 38px; padding: 0 28px 0 4px; border: 0; background-color: transparent; box-shadow: none; font-size: 16px; font-weight: 600; color: var(--gray-900); }
#app-footer .af-lang select:focus { outline: none; }
.af-lang:focus-within { border-color: var(--sprout); }
.af-chev { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 16px; color: var(--text-tertiary); pointer-events: none; }
.af-chan { flex: 1 1 150px; gap: 2px; padding: 3px; background: var(--gray-100); }
#app-footer .ch-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 0 10px; min-height: 32px; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--text-secondary); cursor: pointer; white-space: nowrap; }
#app-footer .ch-btn .ico { font-size: 15px; }
#app-footer .ch-btn.active { background: var(--sprout); color: #fff; }
.af-links { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--border); padding-top: 6px; }
.af-links button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 48px; padding: 4px 2px; border-radius: var(--r-md); background: transparent; border: 0; font: inherit; font-size: 12px; font-weight: 600; color: var(--text-secondary); cursor: pointer; }
.af-links button .ico { font-size: 18px; color: var(--text-tertiary); }
.af-links button:hover, .af-links button:focus-visible { background: var(--gray-100); color: var(--leaf); outline: none; }
.af-links button:hover .ico, .af-links button:focus-visible .ico { color: var(--leaf); }
.af-copy { text-align: center; font-size: 12px; color: var(--text-tertiary); margin: 4px 0 0; }
@media (min-width: 769px) {
  #app-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s2) var(--s5); padding: 10px var(--s6); }
  .af-links { display: flex; gap: 2px; border: 0; padding: 0; order: 1; }
  .af-links button { flex-direction: row; gap: 6px; min-height: 36px; padding: 0 12px; font-size: 12px; }
  .af-links button .ico { font-size: 16px; }
  .af-copy { margin: 0; order: 2; text-align: right; }
}

/* pages are as tall as their content (never shrink), so the footer always follows the last line */
#main > .page { flex: 1 0 auto; }
