/* Shared OptemEra identity. Scoped rules leave each tool's layout and imagery intact. */
a[data-optemera-logo]{display:inline-flex!important;align-items:center;flex-shrink:0;max-width:100%;vertical-align:middle;text-decoration:none;line-height:1!important}
a[data-optemera-logo]::before,a[data-optemera-logo]::after{content:none!important}
a[data-optemera-logo] .optemera-logo-pair{display:block!important;position:relative;line-height:0!important;color:inherit!important}
a[data-optemera-logo] img{display:block!important;width:160px!important;height:32px!important;max-width:100%!important;object-fit:contain;border:0!important;border-radius:0!important;box-shadow:none!important}
a[data-optemera-logo] img.optemera-logo-dark{display:none!important}
a[data-optemera-logo][data-logo-tone=dark] img.optemera-logo-light{display:none!important}
a[data-optemera-logo][data-logo-tone=dark] img.optemera-logo-dark{display:block!important}
a.optemera-heading-home{color:inherit!important;display:flex!important;width:160px;margin:0 0 14px!important;font-size:16px!important;font-weight:400!important;letter-spacing:0!important}
a.optemera-plain-home{margin-bottom:8px}
a.optemera-game-home{position:fixed;left:max(12px,env(safe-area-inset-left));top:max(12px,env(safe-area-inset-top));width:44px;height:44px;z-index:1000;border-radius:11px;overflow:hidden;touch-action:manipulation}
a.optemera-game-home img{width:44px!important;height:44px!important}
@media(max-width:380px){a[data-optemera-logo] img{width:140px!important;height:28px!important}a.optemera-game-home img{width:44px!important;height:44px!important}}
@media print{a[data-optemera-logo],.optemera-lang-switch,.optemera-fb-btn,.optemera-fb-backdrop{display:none!important}}

/* Global language switcher */
.optemera-lang-switch{display:inline-flex;align-items:center;gap:2px;padding:2px;border-radius:7px;border:1px solid rgba(128,138,133,.32);background:rgba(255,255,255,.88);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);font-family:-apple-system,BlinkMacSystemFont,"Inter","Segoe UI",Roboto,Arial,sans-serif;z-index:1100;margin-left:8px;flex-shrink:0}
.optemera-lang-switch.is-floating{position:fixed;right:max(12px,env(safe-area-inset-right));top:max(12px,env(safe-area-inset-top));margin-left:0;box-shadow:0 2px 8px rgba(0,0,0,.14)}
.optemera-lang-switch button{border:0;background:transparent;color:#334155;font-size:11.5px;font-weight:700;letter-spacing:.03em;padding:5px 8px;border-radius:5px;cursor:pointer;line-height:1}
.optemera-lang-switch button[aria-pressed=true]{background:#0d6e53;color:#ffffff}

/* Top Feedback Button for authenticated users */
.optemera-fb-btn{display:inline-flex!important;align-items:center;gap:5px;min-height:30px;height:30px;padding:0 10px!important;border-radius:7px!important;border:1px solid rgba(13,110,83,.38)!important;background:rgba(13,110,83,.10)!important;color:#0d6e53!important;font-family:-apple-system,BlinkMacSystemFont,"Inter","Segoe UI",Roboto,Arial,sans-serif!important;font-size:12px!important;font-weight:700!important;line-height:1!important;letter-spacing:.01em;cursor:pointer;pointer-events:auto!important;text-decoration:none!important;white-space:nowrap;flex-shrink:0;transition:background .15s ease,border-color .15s ease;z-index:2500}
.optemera-fb-btn:hover{background:#0d6e53!important;color:#ffffff!important;border-color:#0d6e53!important}
.optemera-fb-btn svg{width:13px!important;height:13px!important;min-width:13px!important;max-width:13px!important;max-height:13px!important;flex-shrink:0;stroke:currentColor;display:inline-block}
.optemera-fb-btn.is-floating{position:fixed;right:max(88px,calc(env(safe-area-inset-right) + 80px));top:max(12px,env(safe-area-inset-top));background:rgba(255,255,255,.94)!important;box-shadow:0 2px 8px rgba(0,0,0,.15);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.optemera-fb-btn.is-floating:hover{background:#0d6e53!important;color:#ffffff!important}
html[data-home-theme=dark] .optemera-fb-btn,html[data-theme=dark] .optemera-fb-btn,body.dark .optemera-fb-btn,.workspace-header .optemera-fb-btn,.global-nav .optemera-fb-btn{border-color:rgba(52,211,153,.48)!important;background:rgba(16,185,129,.18)!important;color:#34d399!important}
html[data-home-theme=dark] .optemera-fb-btn:hover,html[data-theme=dark] .optemera-fb-btn:hover,body.dark .optemera-fb-btn:hover,.workspace-header .optemera-fb-btn:hover,.global-nav .optemera-fb-btn:hover{background:#10b981!important;color:#06231b!important;border-color:#10b981!important}
@media(max-width:640px){.optemera-fb-btn{padding:0 9px!important;font-size:12px!important;min-height:30px}}

/* Feedback Modal */
.optemera-fb-backdrop{position:fixed;inset:0;z-index:99999;background:rgba(15,23,42,.58);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);display:none;align-items:center;justify-content:center;padding:16px;font-family:-apple-system,BlinkMacSystemFont,"Inter","Segoe UI",Roboto,Arial,sans-serif}
.optemera-fb-backdrop.is-open{display:flex}
.optemera-fb-modal{width:100%;max-width:480px;background:#ffffff;color:#111827;border-radius:14px;border:1px solid rgba(15,23,42,.12);box-shadow:0 22px 50px rgba(0,0,0,.28);overflow:hidden;animation:optemeraFbIn .16s ease-out}
html[data-home-theme=dark] .optemera-fb-modal,html[data-theme=dark] .optemera-fb-modal,body.dark .optemera-fb-modal{background:#161b18;color:#ecf2ee;border-color:#26302a}
@keyframes optemeraFbIn{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
.optemera-fb-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:18px 20px 14px;border-bottom:1px solid rgba(128,138,133,.2)}
.optemera-fb-head h3{margin:0;font-size:17px;font-weight:750;line-height:1.25}
.optemera-fb-head p{margin:4px 0 0;font-size:12.5px;opacity:.75;line-height:1.4}
.optemera-fb-close{border:1px solid rgba(128,138,133,.28);background:transparent;color:inherit;width:32px;height:32px;border-radius:8px;cursor:pointer;font-size:16px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
.optemera-fb-close:hover{background:rgba(128,138,133,.12)}
.optemera-fb-body{padding:16px 20px 20px}
.optemera-fb-context{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 11px;border-radius:8px;background:rgba(13,110,83,.08);border:1px solid rgba(13,110,83,.2);font-size:12px;margin-bottom:14px}
.optemera-fb-context strong{color:#0d6e53;font-weight:700}
html[data-home-theme=dark] .optemera-fb-context strong,html[data-theme=dark] .optemera-fb-context strong{color:#34d399}
.optemera-fb-field{margin-bottom:14px}
.optemera-fb-label{display:block;font-size:12.5px;font-weight:650;margin-bottom:6px}
.optemera-fb-cats{display:grid;grid-template-columns:repeat(2,1fr);gap:7px}
.optemera-fb-cat{border:1px solid rgba(128,138,133,.32);background:transparent;color:inherit;padding:8px 10px;border-radius:8px;font-size:12.5px;font-weight:600;cursor:pointer;text-align:left;transition:all .12s ease}
.optemera-fb-cat[aria-pressed=true]{border-color:#0d6e53;background:rgba(13,110,83,.12);color:#0d6e53;font-weight:700}
html[data-home-theme=dark] .optemera-fb-cat[aria-pressed=true],html[data-theme=dark] .optemera-fb-cat[aria-pressed=true]{border-color:#34d399;background:rgba(52,211,153,.15);color:#34d399}
.optemera-fb-stars{display:inline-flex;gap:4px}
.optemera-fb-star{border:0;background:transparent;font-size:22px;line-height:1;padding:2px 4px;cursor:pointer;color:rgba(128,138,133,.4);transition:transform .1s ease,color .1s ease}
.optemera-fb-star.is-active{color:#f59e0b}
.optemera-fb-star:hover{transform:scale(1.12)}
.optemera-fb-textarea{width:100%;min-height:96px;padding:10px 12px;border-radius:8px;border:1px solid rgba(128,138,133,.38);background:transparent;color:inherit;font:inherit;font-size:13.5px;line-height:1.45;resize:vertical;box-sizing:border-box}
.optemera-fb-textarea:focus{outline:2px solid #0d6e53;border-color:transparent}
.optemera-fb-msg{padding:9px 12px;border-radius:8px;font-size:12.5px;font-weight:600;margin-bottom:12px;display:none}
.optemera-fb-msg.is-err{display:block;background:rgba(220,38,38,.1);color:#dc2626;border:1px solid rgba(220,38,38,.28)}
.optemera-fb-msg.is-ok{display:block;background:rgba(13,110,83,.12);color:#0d6e53;border:1px solid rgba(13,110,83,.3)}
html[data-home-theme=dark] .optemera-fb-msg.is-ok,html[data-theme=dark] .optemera-fb-msg.is-ok{color:#34d399}
.optemera-fb-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:6px}
.optemera-fb-cancel{border:1px solid rgba(128,138,133,.32);background:transparent;color:inherit;min-height:36px;padding:0 14px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer}
.optemera-fb-submit{border:1px solid #0d6e53;background:#0d6e53;color:#ffffff;min-height:36px;padding:0 16px;border-radius:8px;font-size:13px;font-weight:700;cursor:pointer}
.optemera-fb-submit:hover{background:#09523d}
.optemera-fb-submit:disabled{opacity:.6;cursor:not-allowed}
