/* Production animals (decision 0155). One sheet for the farm window, its dialogs and the visit window: their pieces
   share classes. Colours follow the user's theme (decision 0051); fixed colours only where they mean something
   (withdrawal, overdue, alarm scores). */

.fm { display: grid; grid-template-columns: 19rem minmax(0, 1fr); gap: 1rem; height: 100%; min-height: 0; }
.fm-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; padding: 3rem 1rem; text-align: center;
    color: var(--vcp-text-3); height: 100%; }
.fm-empty p { max-width: 34rem; line-height: 1.5; }
.fm-big { font-size: 2.6rem; letter-spacing: 0.3rem; }
.fm-hint { padding: 1rem; color: var(--vcp-text-3); font-size: 0.88rem; text-align: center; }
.fm-side { display: flex; flex-direction: column; gap: 0.5rem; min-height: 0; overflow: auto; background: var(--vcp-tint-1); border-radius: 14px; padding: 0.6rem; }
.fm-search { display: flex; align-items: center; gap: 0.4rem; background: #fff; border-radius: 10px; padding: 0.35rem 0.6rem; border: 1px solid var(--vcp-tint-2); }
.fm-search input { flex: 1; border: 0; outline: none; font: inherit; font-size: 0.92rem; background: transparent; min-width: 0; }
.fm-search .rzi { color: var(--vcp-text-3); }
.fm-new { width: 100%; }
.fm-herds { display: flex; flex-direction: column; gap: 0.25rem; }
.fm-herd { display: flex; align-items: center; gap: 0.6rem; border: 0; background: #fff; border-radius: 10px; padding: 0.5rem 0.6rem; text-align: left; font: inherit;
    cursor: pointer; transition: background 0.12s; }
.fm-herd:hover { background: var(--vcp-tint-2); }
.fm-herd.on { background: var(--vcp-accent-dark); color: #fff; }
.fm-emoji { font-size: 1.5rem; line-height: 1; }
.fm-herd-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.fm-herd-name { font-weight: 600; font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-herd-sub { font-size: 0.76rem; opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-tag { display: inline-flex; align-items: center; gap: 0.2rem; border-radius: 999px; padding: 0.05rem 0.45rem; font-size: 0.72rem; font-weight: 600;
    background: var(--vcp-tint-2); color: var(--vcp-text-2); white-space: nowrap; }
.fm-tag .rzi { font-size: 0.9rem; }
.fm-tag.warn { background: #fdecec; color: #c62828; }
.fm-tag.due { background: #fff3e0; color: #b45f06; }
.fm-tag.ok { background: #e5f4e4; color: #2e7d32; }
.fm-tag.off { background: #eee; color: #777; }
.fm-box { background: #fff; border-radius: 10px; padding: 0.4rem 0.5rem; }
.fm-box summary { cursor: pointer; display: flex; align-items: center; gap: 0.35rem; font-size: 0.84rem; font-weight: 600; color: var(--vcp-text-2); }
.fm-box summary b { margin-left: auto; background: var(--vcp-accent); color: #fff; border-radius: 999px; padding: 0 0.45rem; font-size: 0.72rem; }
.fm-due { display: flex; align-items: flex-start; gap: 0.5rem; width: 100%; border: 0; background: transparent; text-align: left; font: inherit; font-size: 0.82rem;
    padding: 0.35rem 0.2rem; border-radius: 8px; cursor: pointer; }
.fm-due:hover { background: var(--vcp-tint-1); }
.fm-due small { color: var(--vcp-text-3); }
.fm-dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; margin-top: 0.3rem; flex: none; background: var(--vcp-accent); }
.fm-dot.overdue { background: #c62828; }
.fm-dot.duenow { background: #ef8f00; }
.fm-students { align-self: flex-start; display: inline-flex; align-items: center; gap: 0.3rem; }
.fm-main { min-height: 0; overflow: hidden; display: flex; flex-direction: column; }

/* Herd view */
.hv { display: flex; flex-direction: column; gap: 0.7rem; height: 100%; min-height: 0; }
.hv-head { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.hv-emoji { font-size: 2.3rem; line-height: 1; }
.hv-title { flex: 1; min-width: 14rem; }
.hv-title h2 { margin: 0; font-size: 1.3rem; }
.hv-sub { font-size: 0.85rem; color: var(--vcp-text-3); }
.hv-sub a { color: inherit; }
.hv-chips { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.hv-chip { display: inline-flex; align-items: center; gap: 0.3rem; border: 0; border-radius: 999px; padding: 0.3rem 0.75rem; background: var(--vcp-tint-1); font: inherit;
    font-size: 0.82rem; color: var(--vcp-text-2); }
.hv-chip b { font-size: 0.95rem; color: var(--vcp-accent-dark); }
.hv-chip.warn { background: #fdecec; color: #c62828; cursor: pointer; }
.hv-chip.warn b { color: #c62828; }
.hv-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 0.5rem; }
.hv-action { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; border: 1px solid var(--vcp-tint-2); background: #fff; border-radius: 12px;
    padding: 0.7rem 0.4rem; font: inherit; font-size: 0.82rem; font-weight: 600; color: var(--vcp-text-2); cursor: pointer; transition: all 0.12s; }
.hv-action .rzi { font-size: 1.6rem; color: var(--vcp-accent); }
.hv-action:hover { border-color: var(--vcp-accent); background: var(--vcp-tint-1); transform: translateY(-1px); }
.hv-tabs { display: flex; gap: 0.2rem; border-bottom: 1px solid var(--vcp-tint-2); flex-wrap: wrap; }
.hv-tabs button { border: 0; background: transparent; padding: 0.45rem 0.8rem; font: inherit; font-size: 0.88rem; color: var(--vcp-text-3); cursor: pointer;
    border-bottom: 2px solid transparent; margin-bottom: -1px; }
.hv-tabs button b { margin-left: 0.35rem; font-size: 0.72rem; background: var(--vcp-tint-2); color: var(--vcp-text-2); border-radius: 999px; padding: 0 0.4rem; }
.hv-tabs button.on { color: var(--vcp-accent-dark); border-bottom-color: var(--vcp-accent); font-weight: 600; }
.hv-body, .vw-body { flex: 1; min-height: 0; overflow: auto; }
.hv-tools { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.hv-scan { flex: 0 1 22rem; }
.hv-filter { display: flex; gap: 0.3rem; flex-wrap: wrap; align-items: center; flex: 1; }
.hv-filter button, .ft-groups button, .vw-modes button { border: 1px solid var(--vcp-tint-2); background: #fff; border-radius: 999px; padding: 0.2rem 0.65rem; font: inherit;
    font-size: 0.8rem; cursor: pointer; color: var(--vcp-text-2); }
.hv-filter button b, .ft-groups button b { font-size: 0.72rem; opacity: 0.75; margin-left: 0.2rem; }
.hv-filter button.on, .ft-groups button.on, .vw-modes button.on { background: var(--vcp-accent-dark); border-color: var(--vcp-accent-dark); color: #fff; }
.hv-filter button.add { padding: 0.1rem 0.4rem; }
.hv-check { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.8rem; color: var(--vcp-text-3); font-weight: 400; }
.hv-buttons { display: flex; gap: 0.4rem; }
.hv-grow { flex: 1; color: var(--vcp-text-3); font-size: 0.82rem; }
.hv-selbar { display: flex; align-items: center; gap: 0.6rem; background: var(--vcp-tint-1); border-radius: 10px; padding: 0.4rem 0.7rem; margin-bottom: 0.4rem; flex-wrap: wrap; }
.hv-grid { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.hv-grid th { text-align: left; font-size: 0.74rem; font-weight: 600; color: var(--vcp-text-3); padding: 0.35rem 0.4rem; border-bottom: 1px solid var(--vcp-tint-2);
    position: sticky; top: 0; background: #fff; z-index: 1; }
.hv-grid td { padding: 0.3rem 0.4rem; border-bottom: 1px solid #f0f2f3; }
.hv-grid tr:hover td { background: var(--vcp-tint-1); }
.hv-grid tr.out td { color: #999; }
.hv-grid td.warn { color: #c62828; font-weight: 600; }
.hv-grid .sel { width: 2rem; }
.hv-acts { white-space: nowrap; text-align: right; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: 0.02em; }
.hv-list { display: flex; flex-direction: column; gap: 0.25rem; }
.hv-row { display: flex; align-items: center; gap: 0.7rem; border: 1px solid var(--vcp-tint-2); background: #fff; border-radius: 10px; padding: 0.5rem 0.7rem; font: inherit;
    text-align: left; cursor: pointer; }
.hv-row:hover { border-color: var(--vcp-accent); }
.hv-date { font-weight: 600; font-size: 0.82rem; white-space: nowrap; color: var(--vcp-text-2); }
.hv-type { font-size: 0.8rem; background: var(--vcp-tint-1); border-radius: 999px; padding: 0.05rem 0.5rem; white-space: nowrap; }
.hv-text { flex: 1; font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hv-meta { font-size: 0.76rem; color: var(--vcp-text-3); white-space: nowrap; }

/* Dialogs */
.fd { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem 0.9rem; align-content: start; }
.fd-wide { grid-column: 1 / -1; }
.fd-field { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.78rem; font-weight: 600; color: var(--vcp-text-2); }
.fd-field em { color: #c62828; font-style: normal; }
.fd-field.fd-check { flex-direction: row; align-items: center; gap: 0.4rem; font-weight: 400; }
.fd-in { width: 100%; font-weight: 400; }
.fd-intro { color: var(--vcp-text-3); font-size: 0.86rem; margin: 0; line-height: 1.45; }
.fd-error { color: #b42318; font-size: 0.85rem; }
.fd-foot { display: flex; align-items: center; justify-content: flex-end; gap: 0.5rem; margin-top: 0.4rem; flex-wrap: wrap; }
.fd-owner { display: flex; align-items: center; gap: 0.4rem; background: var(--vcp-tint-1); border-radius: 8px; padding: 0.4rem 0.6rem; font-weight: 400; }
.fd-hits { display: flex; flex-direction: column; }
.fd-hits button { border: 0; background: transparent; text-align: left; font: inherit; padding: 0.35rem 0.5rem; border-radius: 6px; cursor: pointer; font-weight: 400; }
.fd-hits button:hover { background: var(--vcp-tint-1); }
.fd-hits small { color: var(--vcp-text-3); margin-left: 0.4rem; }
.fd-kinds { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.35rem; }
.fd-kinds button { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; border: 1px solid var(--vcp-tint-2); background: #fff; border-radius: 10px;
    padding: 0.4rem 0.2rem; font: inherit; font-size: 0.76rem; font-weight: 400; cursor: pointer; }
.fd-kinds button span { font-size: 1.5rem; }
.fd-kinds button.on { border-color: var(--vcp-accent); background: var(--vcp-tint-1); font-weight: 600; box-shadow: 0 0 0 2px var(--vcp-accent) inset; }
.fd-paste { font-family: ui-monospace, Consolas, monospace; font-size: 0.82rem; }
.fd-preview { font-size: 0.84rem; }
.fd-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; margin-top: 0.3rem; }
.fd-table th { text-align: left; color: var(--vcp-text-3); font-weight: 600; border-bottom: 1px solid var(--vcp-tint-2); padding: 0.2rem 0.3rem; }
.fd-table td { padding: 0.2rem 0.3rem; border-bottom: 1px solid #f0f2f3; }
.fd-table tr.bad td { color: #b42318; }
.fd-list { display: flex; flex-direction: column; gap: 0.25rem; }
.fd-line { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.4rem; background: var(--vcp-tint-1); border-radius: 8px; font-size: 0.86rem; }
.fd-grow { flex: 1; color: var(--vcp-text-3); font-size: 0.8rem; }
.fd-section { border-top: 1px solid var(--vcp-tint-2); padding-top: 0.5rem; }
.fd-section h4 { margin: 0 0 0.35rem; font-size: 0.86rem; color: var(--vcp-text-2); }
.fd-history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.82rem; max-height: 11rem; overflow: auto; }
.fd-history li { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.fd-exit { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

/* Treatment */
.ft { display: flex; flex-direction: column; gap: 0.8rem; }
.ft-step { border: 1px solid var(--vcp-tint-2); border-radius: 12px; padding: 0.7rem 0.8rem; display: flex; flex-direction: column; gap: 0.5rem; }
.ft-step h4 { margin: 0; display: flex; align-items: center; gap: 0.6rem; font-size: 0.92rem; color: var(--vcp-text-2); flex-wrap: wrap; }
.ft-step h4 > span { display: inline-flex; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--vcp-accent); color: #fff; align-items: center;
    justify-content: center; font-size: 0.8rem; }
.ft-groups { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.ft-scan { display: flex; align-items: center; gap: 0.6rem; }
.ft-scan .fm-search { flex: 0 1 24rem; }
.ft-chips { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.ft-chip { display: inline-flex; align-items: center; gap: 0.2rem; background: var(--vcp-tint-1); border-radius: 999px; padding: 0.15rem 0.3rem 0.15rem 0.6rem;
    font-family: ui-monospace, Consolas, monospace; font-size: 0.8rem; }
.ft-chip button { border: 0; background: transparent; cursor: pointer; font-size: 1rem; line-height: 1; color: var(--vcp-text-3); }
.ft-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.55rem 0.8rem; }
.ft-wide { grid-column: span 2; }
.ft-note { font-size: 0.8rem; color: var(--vcp-text-3); display: flex; align-items: center; gap: 0.3rem; }
.ft-note.warn { color: #b45f06; }
.ft-wd { background: #fffaf3; border-color: #f3dfc1; }
.ft-clear { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.ft-clear div { display: flex; flex-direction: column; background: #fff; border-radius: 10px; padding: 0.45rem 0.9rem; border: 1px solid #f3dfc1; }
.ft-clear small { font-size: 0.72rem; color: var(--vcp-text-3); }
.ft-clear b { font-size: 1.25rem; color: #b45f06; }

/* Plan */
.pl-year { font-size: 1.05rem; }
.pl { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.5rem; }
.pl-month { background: var(--vcp-tint-1); border-radius: 10px; padding: 0.4rem; min-height: 6rem; display: flex; flex-direction: column; gap: 0.25rem; }
.pl-month.now { box-shadow: 0 0 0 2px var(--vcp-accent) inset; }
.pl-head { display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 0.8rem; text-transform: capitalize; color: var(--vcp-text-2); }
.pl-add { border: 0; background: transparent; cursor: pointer; font-size: 1rem; color: var(--vcp-accent); line-height: 1; }
.pl-line { display: flex; align-items: flex-start; gap: 0.25rem; background: #fff; border-radius: 8px; padding: 0.25rem 0.3rem; font-size: 0.78rem; border-left: 3px solid var(--vcp-accent); }
.pl-line.done { border-left-color: #2e7d32; opacity: 0.7; }
.pl-line.done .pl-text { text-decoration: line-through; }
.pl-line.overdue { border-left-color: #c62828; }
.pl-line.duenow { border-left-color: #ef8f00; }
.pl-text { flex: 1; border: 0; background: transparent; text-align: left; font: inherit; cursor: pointer; padding: 0; }
.pl-text small { display: block; color: var(--vcp-text-3); }
.pl-bell { border: 0; background: transparent; cursor: pointer; color: var(--vcp-accent); padding: 0; }
.pl-total { margin-top: 0.6rem; text-align: right; font-size: 0.88rem; }

/* Figures */
.kp { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.6rem; }
.kp-tile { display: flex; flex-direction: column; gap: 0.15rem; background: #fff; border: 1px solid var(--vcp-tint-2); border-radius: 12px; padding: 0.7rem 0.9rem; }
.kp-tile small { font-size: 0.74rem; color: var(--vcp-text-3); }
.kp-tile b { font-size: 1.6rem; color: var(--vcp-accent-dark); }
.kp-tile span { font-size: 0.76rem; color: var(--vcp-text-3); }
.kp-tile.bad { border-color: #f3c3c3; background: #fff7f7; }
.kp-tile.bad b { color: #c62828; }
.kp-bars { display: flex; flex-direction: column; gap: 0.35rem; max-width: 40rem; }
.kp-bar { display: grid; grid-template-columns: 10rem 1fr 3rem 3rem; align-items: center; gap: 0.5rem; font-size: 0.84rem; }
.kp-bar div { height: 0.6rem; background: var(--vcp-tint-1); border-radius: 999px; overflow: hidden; }
.kp-bar i { display: block; height: 100%; background: var(--vcp-accent); border-radius: 999px; }
.kp-bar small { color: var(--vcp-text-3); }

/* Quick entry */
.qe { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: 1rem; min-height: 22rem; }
.qe-left { display: flex; flex-direction: column; gap: 0.7rem; }
.qe-bar { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.qe-scan { flex: 1; min-width: 16rem; padding: 0.55rem 0.8rem; border-width: 2px; border-color: var(--vcp-accent); }
.qe-scan input { font-size: 1.1rem; }
.qe-missing { display: flex; align-items: center; gap: 0.5rem; background: #fff3e0; color: #8a4b00; border-radius: 10px; padding: 0.5rem 0.7rem; flex-wrap: wrap; }
.qe-card { border: 1px solid var(--vcp-tint-2); border-radius: 14px; padding: 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.7rem; background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04); }
.qe-id { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.qe-tag { font-family: ui-monospace, Consolas, monospace; font-size: 1.5rem; font-weight: 700; color: var(--vcp-accent-dark); }
.qe-sub { color: var(--vcp-text-3); font-size: 0.88rem; }
.qe-prev { font-size: 0.8rem; color: var(--vcp-text-3); background: var(--vcp-tint-1); border-radius: 999px; padding: 0.05rem 0.55rem; }
.qe-keys { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.qe-key { min-width: 3.6rem; height: 3.4rem; border: 2px solid var(--vcp-tint-2); background: #fff; border-radius: 12px; font: inherit; font-size: 1.25rem; font-weight: 700;
    cursor: pointer; color: var(--vcp-text-2); transition: all 0.1s; }
.qe-key:hover:not(:disabled) { border-color: var(--vcp-accent); background: var(--vcp-tint-1); transform: translateY(-1px); }
.qe-key.wide { min-width: 9rem; font-size: 1rem; }
.qe-key.on { background: var(--vcp-accent-dark); border-color: var(--vcp-accent-dark); color: #fff; }
.qe-key.alarm { color: #c62828; }
.qe-row { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; font-size: 0.86rem; }
.qe-part { min-width: 6.5rem; font-weight: 600; color: var(--vcp-text-2); }
.qe-small { min-width: 2.6rem; height: 2.3rem; border: 1px solid var(--vcp-tint-2); background: #fff; border-radius: 8px; font: inherit; font-weight: 700; cursor: pointer; }
.qe-small.on { background: var(--vcp-accent-dark); color: #fff; border-color: var(--vcp-accent-dark); }
.qe-small.on.alarm { background: #c62828; border-color: #c62828; }
.qe-due { font-weight: 600; color: var(--vcp-accent-dark); }
.qe-skip { display: flex; justify-content: flex-end; }
.qe-finished { display: flex; align-items: center; gap: 0.5rem; font-size: 1.05rem; color: #2e7d32; padding: 1.2rem; background: #e5f4e4; border-radius: 12px; }
.qe-right { background: var(--vcp-tint-1); border-radius: 12px; padding: 0.6rem; display: flex; flex-direction: column; gap: 0.5rem; min-height: 0; max-height: 34rem; }
.qe-summary { display: flex; flex-direction: column; font-size: 0.86rem; }
.qe-summary span { color: var(--vcp-text-3); font-size: 0.8rem; }
.qe-done { overflow: auto; display: flex; flex-direction: column; gap: 0.2rem; }
.qe-line { display: flex; align-items: center; gap: 0.5rem; background: #fff; border-radius: 8px; padding: 0.25rem 0.45rem; font-size: 0.82rem; }
.qe-line b { margin-left: auto; }
.qe-line b.alarm { color: #c62828; }
.qe-x { border: 0; background: transparent; cursor: pointer; color: var(--vcp-text-3); font-size: 1rem; line-height: 1; }

/* Visit window */
.vw { display: flex; flex-direction: column; gap: 0.6rem; height: 100%; min-height: 0; }
.vw-banner { display: flex; align-items: center; gap: 0.5rem; background: #fff3e0; color: #8a4b00; border-radius: 10px; padding: 0.45rem 0.7rem; font-size: 0.88rem; }
.vw-banner.ok { background: #e5f4e4; color: #2e7d32; }
.vw-head { display: flex; align-items: flex-end; gap: 0.7rem; flex-wrap: wrap; }
.vw-grow { flex: 1; min-width: 14rem; }
.vw-findings { display: flex; flex-direction: column; gap: 0.6rem; max-width: 60rem; }
.vw-small { max-width: 14rem; }
.vw-inv { display: flex; align-items: flex-end; gap: 0.7rem; flex-wrap: wrap; }
.vw-rate { font-size: 0.86rem; color: #b45f06; font-weight: 600; padding-bottom: 0.4rem; }
.vw-systems { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.vw-modes { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 0.6rem; }

@media (max-width: 900px) {
    .fm { grid-template-columns: 1fr; }
    .fm-side { max-height: 16rem; }
    .qe { grid-template-columns: 1fr; }
    .pl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ft-grid { grid-template-columns: 1fr 1fr; }
    .fd { grid-template-columns: 1fr; }
    .fd-kinds { grid-template-columns: repeat(3, 1fr); }
}
.fm-page { height: calc(100vh - 7rem); padding: 0.5rem; }
.qe-key.on:hover:not(:disabled) { background: var(--vcp-accent-dark); color: #fff; }

/* Help popover of each farm form */
.fm-help { position: relative; display: inline-flex; vertical-align: middle; }
.fm-help-btn { width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 1.5px solid var(--vcp-accent); background: #fff; color: var(--vcp-accent); font: inherit;
    font-weight: 700; font-size: 0.95rem; cursor: pointer; line-height: 1; padding: 0; flex: none; }
.fm-help-btn:hover, .fm-help-btn.on { background: var(--vcp-accent); color: #fff; }
.fm-help-pop { position: absolute; top: calc(100% + 0.4rem); right: 0; z-index: 50; width: min(27rem, 85vw); max-height: 65vh; overflow: auto; display: flex;
    flex-direction: column; gap: 0.45rem; background: #fff; border: 1px solid var(--vcp-tint-2); border-radius: 12px; padding: 0.8rem 0.9rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16); text-align: left; font-size: 0.86rem; font-weight: 400; color: var(--vcp-text-2); line-height: 1.45;
    white-space: normal; }
.fm-help-pop.left { right: auto; left: 0; }
.fm-help-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.95rem; color: var(--vcp-accent-dark); }
.fm-help-x { border: 0; background: transparent; font-size: 1.2rem; cursor: pointer; color: var(--vcp-text-3); line-height: 1; }
.fm-help-h { font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--vcp-text-3); margin-top: 0.2rem; }
.fm-help-p { display: block; }
.fm-help-pop ul { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.2rem; }
.fm-help-row { display: flex; justify-content: flex-end; align-items: center; gap: 0.5rem; }

/* ---- Photos (a wound, a lesion…) ---- */
.fp-tools { flex-wrap: wrap; gap: .5rem; }
.fp-add { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .75rem; border-radius: 6px; cursor: pointer;
    background: var(--vcp-accent); color: #fff; font-size: .85rem; font-weight: 600; position: relative; overflow: hidden; }
.fp-add input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.fp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; padding: .25rem 0; }
.fp-thumb { display: flex; flex-direction: column; padding: 0; border: 1px solid var(--vcp-tint-2); border-radius: 8px; overflow: hidden;
    background: var(--vcp-tint-1); cursor: zoom-in; text-align: left; }
.fp-thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.fp-file { aspect-ratio: 4 / 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem;
    color: var(--vcp-text-3); font-size: .8rem; }
.fp-cap { padding: .3rem .45rem; font-size: .78rem; color: var(--vcp-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-large { position: fixed; inset: 0; z-index: 2000; background: rgba(0, 0, 0, .78); display: flex; align-items: center; justify-content: center;
    padding: 2rem; cursor: zoom-out; }
.fp-large figure { margin: 0; max-width: 92vw; max-height: 92vh; display: flex; flex-direction: column; background: var(--rz-base-background-color, #fff);
    border-radius: 10px; overflow: hidden; cursor: default; }
.fp-large img { max-width: 92vw; max-height: calc(92vh - 3.2rem); object-fit: contain; background: #111; }
.fp-large figcaption { display: flex; align-items: center; gap: .6rem; padding: .5rem .75rem; font-size: .85rem; }
.fp-large figcaption span:first-child { color: var(--vcp-text-3); }
