/* Four illustrated entries, with the existing category gestures retained. */
.manual-card .manual-categories{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-top:22px}
.manual-card .manual-category,.manual-card .manual-category+.manual-category{display:contents}
.manual-card .category-toggle{box-sizing:border-box;display:flex;flex-direction:column;justify-content:flex-start;align-items:center;gap:0;padding:18px 7px 16px;min-height:150px;border:1px solid #e5eaf0;border-radius:17px;background:#ffffffbd;text-align:center;color:#61738a;position:relative;transition:background .18s,border-color .18s,box-shadow .18s;touch-action:pan-y}
.manual-card .category-toggle:hover,.manual-card .category-toggle[aria-expanded=true]{background:#fff;border-color:#b7cbd6;box-shadow:0 5px 16px #6880950a}
.manual-card .category-toggle:focus-visible{outline:2px solid #8fa9c6;outline-offset:3px}
.tool-illustration{display:block;width:62px;height:62px;margin-bottom:12px;flex:none}.tool-illustration img{display:block;width:100%;height:100%}
.manual-card .category-toggle>span:not(.tool-illustration):not(.category-tail){font-size:14px;font-weight:500;line-height:1.5;white-space:nowrap}
.manual-card .category-tail{display:block;margin-top:6px;font-size:10px;line-height:1.5;color:#96a3b2;white-space:nowrap}
.manual-card .category-chevron{position:absolute;top:9px;right:9px;width:17px;height:17px;display:grid;place-items:center;border:0;background:none;opacity:.65}.manual-card .category-chevron svg{width:12px;height:12px}
.manual-card .category-items{grid-column:1/-1;order:5;padding:16px 12px;border:1px solid #e2e9ef;background:#ffffffc9;border-radius:14px;min-width:0}
@media(max-width:700px){.manual-card .manual-categories{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:19px}.manual-card .category-toggle{padding:16px 8px 14px;min-height:150px}.tool-illustration{width:62px;height:62px;margin-bottom:10px}.manual-card .category-tail{font-size:10px}.manual-card .category-items{padding:13px 9px}}
@media(prefers-reduced-motion:reduce){.manual-card .category-toggle{transition:none}}

/* Options float inside the card region; the page and four-card grid stay in place. */
.manual-card .manual-categories{position:relative;isolation:isolate}
.tool-local-layer{position:absolute;inset:0;z-index:3;display:flex;align-items:center;padding:8px;border-radius:18px;background:#edf2f5b8;backdrop-filter:blur(5px);touch-action:pan-y}
.tool-local-layer[hidden]{display:none}
.tool-local-popup{box-sizing:border-box;width:100%;max-height:100%;overflow:auto;overscroll-behavior:contain;padding:16px;border:1px solid #dbe5ed;border-radius:17px;background:#fff;box-shadow:0 8px 24px #405a7712;touch-action:pan-y}
.tool-local-popup header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.tool-local-eyebrow{font-size:10px;color:#9ba9b8;letter-spacing:2px}.tool-local-popup h4{font-size:16px;font-weight:500;color:#60758c;margin:3px 0 0}
.tool-local-close{width:32px;height:32px;border:1px solid #e6ecf2;border-radius:50%;font:22px/1 sans-serif;color:#8b9caf;background:#f7f9fc;cursor:pointer}
.tool-local-tabs{display:flex;padding:3px;gap:5px;border-radius:10px;background:#f3f6f9;margin-bottom:14px}.tool-local-tabs button{flex:1;font:12px inherit;font-size:12px;font-family:inherit;padding:8px 4px;border:0;border-radius:8px;color:#91a0b1;background:transparent;cursor:pointer}.tool-local-tabs button[aria-pressed=true]{background:#fff;color:#607f9a;box-shadow:0 2px 5px #526d8810}
.manual-card .tool-local-body .category-items{padding:0;border:0;background:none}.manual-card .tool-local-body .sheet-options{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.manual-card .tool-local-body .sheet-options a{min-height:42px;font-size:13px;background:#f8fafc}
.manual-card .tool-local-body .conversion-pairs{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.manual-card .tool-local-body .conversion-pairs button,.manual-card .tool-local-body .conversion-pairs a{font-size:11px;gap:7px;min-height:40px}.tool-local-hint{font-size:10px;text-align:center;color:#a0adbc;margin:13px 0 0}.tool-local-popup button:focus-visible{outline:2px solid #95acc7;outline-offset:2px}
@media(min-width:701px){.manual-card .manual-categories{min-height:260px}.manual-card .category-toggle{align-self:start}.tool-local-layer{align-items:flex-start}}

/* Compact, fresh-color entry cards. Popup sizing remains independent. */
.manual-card .manual-categories{gap:10px;margin-top:16px}
.manual-card .category-toggle{min-height:122px;padding:12px 6px 11px;border-radius:15px}
.tool-illustration{width:50px;height:50px;margin-bottom:7px}
.manual-card .category-toggle>span:not(.tool-illustration):not(.category-tail){font-size:13px}
.manual-card .category-tail{margin-top:4px;font-size:9px}
.manual-card .category-chevron{width:15px;height:15px;top:7px;right:7px}
@media(max-width:700px){.manual-card{padding:14px}.manual-card .manual-categories{gap:10px;margin-top:15px}.manual-card .category-toggle{min-height:124px;padding:12px 6px}.tool-illustration{width:50px;height:50px;margin-bottom:7px}.manual-card .category-tail{font-size:9px}.tool-local-layer{padding:5px}.tool-local-popup{padding:12px}.tool-local-popup header{margin-bottom:8px}.tool-local-tabs{margin-bottom:10px}.tool-local-hint{margin-top:9px}.manual-card .tool-local-body .sheet-options a{min-height:38px}}

/* Compact single-row launcher on phones. */
@media(max-width:700px){
.manual-card .manual-categories{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:16px;position:static;min-height:0}
.manual-card{position:relative;isolation:isolate}
.manual-card .category-toggle{min-height:91px;padding:10px 2px 8px;border-radius:12px;border-color:transparent;background:transparent}
.manual-card .category-toggle:hover,.manual-card .category-toggle[aria-expanded=true]{border-color:#dae5ef;background:#fff}
.tool-illustration{width:48px;height:48px;margin-bottom:8px}
.manual-card .category-toggle>span:not(.tool-illustration):not(.category-tail){font-size:11px;letter-spacing:0;font-weight:400}
.manual-card .category-tail{display:none}
.tool-local-layer{inset:8px;padding:0;align-items:stretch;background:#f5f8fce8;border-radius:14px}
.tool-local-popup{padding:12px;max-height:100%;border-radius:14px;box-shadow:0 5px 16px #405a7710}
.tool-local-popup header{margin-bottom:7px}.tool-local-eyebrow,.tool-local-hint{display:none}.tool-local-popup h4{font-size:14px;margin:0}
.tool-local-close{width:27px;height:27px;font-size:19px}.tool-local-tabs{margin-bottom:8px}.tool-local-tabs button{padding:5px 3px;font-size:11px}
.manual-card .tool-local-body .sheet-options{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}.manual-card .tool-local-body .sheet-options a{font-size:12px;min-height:36px;padding:7px 2px}
.manual-card .tool-local-body .conversion-pairs{gap:6px}.manual-card .tool-local-body .conversion-pairs button,.manual-card .tool-local-body .conversion-pairs a{min-height:31px;padding:5px 2px;font-size:10px}
}
@media(max-width:360px){.manual-card .manual-categories{gap:3px}.tool-illustration{width:43px;height:43px}.manual-card .category-toggle>span:not(.tool-illustration):not(.category-tail){font-size:10px}.manual-card .category-toggle{min-height:86px}}

/* Each icon opens only its own options, in a translucent local panel. */
.tool-local-layer{background:rgba(233,241,248,.28);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px)}
.tool-local-popup{background:rgba(255,255,255,.76);border-color:rgba(255,255,255,.88);box-shadow:0 7px 22px #405a7712;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px)}
.tool-local-popup header{margin-bottom:16px}
.manual-card .tool-local-body .sheet-options a,.manual-card .tool-local-body .conversion-pairs button,.manual-card .tool-local-body .conversion-pairs a{background:rgba(255,255,255,.62);border-color:rgba(207,221,233,.72)}
@media(max-width:700px){.tool-local-layer{background:rgba(233,241,248,.28)}.tool-local-popup{background:rgba(255,255,255,.76)}.tool-local-popup header{margin-bottom:15px}}

/* Compact inset popover, distinct from the home surface. */
.manual-card .tool-local-layer{align-items:center;justify-content:center;padding:10px;background:rgba(64,88,82,.13);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)}
.manual-card .tool-local-popup{width:92%;max-width:370px;max-height:100%;padding:13px 14px;background:rgba(241,249,246,.94);border:1px solid rgba(161,191,177,.6);border-radius:14px;box-shadow:0 8px 24px rgba(39,70,58,.14)}
.manual-card .tool-local-popup{box-shadow:0 8px 24px rgba(39,70,58,.14)}
.tool-local-popup header{margin-bottom:11px}.tool-local-popup h4{font-size:14px;color:#426b59;font-weight:500}.tool-local-close{width:26px;height:26px;font-size:19px;color:#6a887a;background:rgba(255,255,255,.65);border-color:#d3e3da}
.manual-card .tool-local-body .conversion-pairs{gap:7px}.manual-card .tool-local-body .conversion-pairs button,.manual-card .tool-local-body .conversion-pairs a{min-height:32px;padding:6px 3px;background:rgba(255,255,255,.85);border-color:#d3e2da;border-radius:8px}
.manual-card .tool-local-body .sheet-options{gap:6px}.manual-card .tool-local-body .sheet-options a{background:rgba(255,255,255,.85);border-color:#d3e2da}
@media(max-width:700px){.manual-card .tool-local-layer{inset:6px;padding:8px}.manual-card .tool-local-popup{width:94%;padding:11px 12px;flex:none}.tool-local-popup header{margin-bottom:10px}.manual-card .tool-local-body .conversion-pairs button,.manual-card .tool-local-body .conversion-pairs a{font-size:10px;gap:5px}.manual-card .tool-local-body .sheet-options a{font-size:11px;min-height:33px}}

/* Direction selection floats over the choices, without adding a row below. */
.tool-local-popup{position:relative}
.tool-local-popup.direction-open{overflow:hidden}
.tool-local-popup.direction-open>header,.tool-local-popup.direction-open .conversion-pairs{visibility:hidden}
.manual-card .tool-local-popup .conversion-directions{position:absolute;inset:7px;z-index:5;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:center;gap:12px 9px;margin:0;padding:18px 12px 14px;background:rgba(247,253,250,.97);border:1px solid #c2d9cc;border-radius:11px;box-shadow:0 3px 12px #375c4812}
.tool-local-popup .conversion-directions .direction-label{grid-column:1/-1;width:auto;font-size:12px;color:#537661;padding-right:23px;margin-bottom:2px;white-space:normal}
.tool-local-popup .conversion-directions a{display:flex;align-items:center;justify-content:center;min-height:39px;padding:7px 4px;font-size:11px;background:white;border:1px solid #cddfd3;color:#527361;border-radius:8px;white-space:nowrap}
.direction-close{position:absolute;top:6px;right:6px;display:grid;place-items:center;width:25px;height:25px;padding:0;border:0;border-radius:50%;background:#e8f1ec;color:#6b8978;font:19px/1 sans-serif;cursor:pointer}

/* One-line direction chooser, with its accessible title retained. */
.manual-card .tool-local-popup .conversion-directions{inset:50% 8px auto;transform:translateY(-50%);grid-template-columns:minmax(0,1fr) minmax(0,1fr) 24px;align-items:center;align-content:normal;gap:7px;padding:10px;margin:0;border-radius:11px}
.tool-local-popup .conversion-directions .direction-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.tool-local-popup .conversion-directions a{min-height:34px;padding:7px 3px;font-size:11px}
.tool-local-popup .conversion-directions .direction-close{position:static;width:24px;height:24px;font-size:18px}
.tool-local-popup.direction-open{background:transparent;border-color:transparent;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
@media(max-width:360px){.manual-card .tool-local-popup .conversion-directions{inset-inline:2px;padding:9px 7px;gap:5px}.tool-local-popup .conversion-directions a{font-size:10px}}

/* Label and compact direction buttons share one row. */
.manual-card .tool-local-popup .conversion-directions{grid-template-columns:auto minmax(0,1fr) minmax(0,1fr) 22px;gap:6px;padding:10px 8px;inset-inline:3px}
.tool-local-popup .conversion-directions .direction-label{position:static;grid-column:auto;width:auto;height:auto;clip-path:none;overflow:visible;margin:0;padding:0;font-size:10px;white-space:nowrap;color:#648172}
.tool-local-popup .conversion-directions a{font-size:10px;padding:7px 2px;min-height:32px}
.tool-local-popup .conversion-directions .direction-close{width:22px;height:22px}
@media(max-width:360px){.manual-card .tool-local-popup .conversion-directions{gap:4px;padding:9px 6px;inset-inline:0;grid-template-columns:auto minmax(0,1fr) minmax(0,1fr) 20px}.tool-local-popup .conversion-directions a{font-size:9px}.tool-local-popup .conversion-directions .direction-label{font-size:9px}.tool-local-popup .conversion-directions .direction-close{width:20px;height:20px}}

.tool-local-popup .conversion-directions .direction-label{font-size:12px;font-weight:500}
@media(max-width:360px){.tool-local-popup .conversion-directions .direction-label{font-size:11px}.manual-card .tool-local-popup .conversion-directions{gap:4px;padding-inline:5px}}

/* The desktop launcher also sizes to its content, without a reserved empty row. */
@media(min-width:701px){.manual-card{position:relative;isolation:isolate}.manual-card .manual-categories{min-height:0;position:static}.manual-card .tool-local-layer{inset:8px}}
