.gear-icon{position:relative;display:inline-flex;width:34px;height:34px;align-items:center;justify-content:center;border:1px solid #708ba8;border-radius:7px;background:linear-gradient(145deg,#324864,#101c32);box-shadow:inset 0 1px #ffffff35;flex-shrink:0}.gear-icon .item-art{width:26px;height:26px;object-fit:contain;image-rendering:pixelated;pointer-events:none}.gear-icon.tier-3{border-color:#b598f0;box-shadow:inset 0 1px #eee5ff66,0 0 5px #926ad536}.gear-icon.tier-4{border-color:#ffe197;background:linear-gradient(145deg,#574220,#191e37);box-shadow:inset 0 1px #fff4c4,0 0 7px #ffcb5355}.gear-icon small{position:absolute;bottom:-3px;right:-3px;font-size:10px;color:#fff2c6;background:#151e35;border-radius:4px;padding:0 3px}.item-slot{touch-action:none!important}.item-slot>small{display:none}.item-slot .gear-icon{width:100%;height:100%;min-width:25px;min-height:25px}.item-slot .item-art{width:80%;height:80%}.equipped-item{padding:0;background:none;border:0;touch-action:none}.equipped-item .gear-icon{width:30px;height:30px}.gear-lifted{opacity:.3!important;transform:translateY(-3px)}.gear-compatible{outline:2px solid #7cdbba;box-shadow:0 0 12px #62eac458!important}.gear-hover{outline-color:#fff1a1!important;filter:brightness(1.3)}#gear-drag-ghost,.gear-flight{position:fixed;left:0;top:0;pointer-events:none;z-index:2000;width:50px;height:50px;filter:drop-shadow(0 7px 5px #0009)}#gear-drag-ghost .gear-icon{width:50px;height:50px}#gear-drag-ghost .item-art{width:38px;height:38px}#gear-drag-ghost>.gear-drag-caption{display:block;position:absolute;top:55px;left:50%;transform:translateX(-50%);white-space:nowrap;background:#15243bea;border:1px solid #859eb9;border-radius:7px;padding:5px 8px;font-size:12px;color:#fff}#gear-drag-ghost[data-valid=true]>.gear-drag-caption{color:#b7ffcc;border-color:#82ebbd}.gear-dragging,.gear-dragging *{cursor:grabbing!important;user-select:none!important}#gear-drop-target{position:fixed;z-index:1900;pointer-events:none;transform:translate(-50%,-50%);border:2px solid;border-radius:50%;width:56px;height:38px;text-align:center;font-size:26px;background:#07223766}#gear-drop-target.valid{color:#a7ffba;box-shadow:0 0 18px #7effa7}#gear-drop-target.invalid{color:#ff8181}.gear-flight .gear-icon{width:44px;height:44px}#gear-workshop{position:fixed;inset:0;background:#071021a8;z-index:1800;display:flex;align-items:center;justify-content:center;padding:10px;backdrop-filter:blur(2px)}#gear-workshop[hidden]{display:none}.gear-panel{width:min(580px,96vw);max-height:94dvh;overflow:auto;background:linear-gradient(145deg,#27375c,#101b33);color:#f5f4ed;border:2px solid #91a4c8;border-radius:17px;box-shadow:0 12px 70px #000c,inset 0 2px #d8e1f551;padding:16px}.gear-panel header,.gear-panel footer{display:flex;align-items:center;justify-content:space-between;gap:12px}.gear-panel header{font-size:21px;font-weight:900}.gear-panel button{border:1px solid #657caa;border-radius:8px;background:#253659;color:#f5f4ed;padding:7px;cursor:pointer}.gear-panel button:disabled{opacity:.4;cursor:default}.gear-note{font-size:12px;color:#b8c9df;margin:9px 0}.gear-materials{display:flex;gap:10px;justify-content:center;align-items:center;margin:14px 0}.gear-material{background:#0d1830;border:1px solid #69819f;box-shadow:inset 0 3px 8px #0007;border-radius:9px;width:118px;min-height:85px;padding:9px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:7px}.gear-material span,.gear-material small{font-size:11px}.gear-material>b{font-size:28px;color:#6e85a3}.gear-choices,.gear-third{display:flex;flex-wrap:wrap;gap:7px}.gear-choices button{display:flex;align-items:center;gap:7px;flex:1 1 160px;text-align:left}.gear-choices small{display:block;color:#b9cadd;font-size:11px}.gear-choices .selected{border-color:#ffe393;background:#50452d}.gear-third{margin-top:9px}.gear-third button{display:flex;align-items:center;gap:6px}.gear-third span{font-size:11px}.gear-result{display:flex;align-items:center;gap:13px;padding:14px;margin:13px 0;background:#07152ba0;border:1px solid #6f819a;border-radius:9px}.gear-result p{font-size:13px;line-height:1.6;margin:4px 0 0}.gear-panel .event-gold-button{color:#33291a;background:linear-gradient(#ffe79d,#dcae43);border-color:#ffe8a7}.gear-forged{position:fixed;top:50%;left:50%;z-index:2100;pointer-events:none;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:10px;text-shadow:0 2px 4px #000;color:#fff1ab}.gear-forged .gear-icon{width:84px;height:84px;box-shadow:0 0 50px #ffe28c}.gear-forged .item-art{width:60px;height:60px}.gear-forged b{font-size:24px}.gear-catalog{display:grid;gap:7px}.gear-catalog button{display:flex;gap:8px;align-items:center;background:#15223b;border:1px solid #536781;border-radius:8px;padding:8px;color:#eff2ff;text-align:left}.gear-catalog button>span{flex:1}.gear-catalog b,.gear-catalog small,.gear-catalog em{display:block}.gear-catalog small{color:#a1b3ca;font-size:10px;margin:3px 0}.gear-catalog em{font-size:11px;font-style:normal;color:#cbdcc4}.gear-catalog i{font-style:normal;border:1px solid #8d9db3;border-radius:4px;padding:2px 5px}.gear-catalog .gear-icon{flex:0 0 34px}
@media(max-height:480px){.gear-panel{padding:10px;width:min(650px,92vw)}.gear-panel header{font-size:17px}.gear-materials{margin:6px 0;gap:7px}.gear-material{min-height:62px;padding:5px;gap:3px}.gear-result{margin:7px 0;padding:8px}.gear-note{margin:5px 0;font-size:10px}.gear-panel .gear-icon{width:28px;height:28px}.gear-panel .item-art{width:23px;height:23px}.gear-panel button{padding:5px}.gear-panel .gear-choices small{font-size:10px}}
@media(prefers-reduced-motion:reduce){.gear-lifted{transform:none}}

.bench-gear{position:absolute;display:flex;gap:2px;left:50%;top:-17px;transform:translateX(-50%);z-index:3}.bench-gear button{padding:0;border:0;background:none;touch-action:none}.bench-gear .gear-icon{width:15px;height:15px;border-radius:3px}.bench-gear .item-art{width:12px;height:12px}.bench-gear small{display:none}

.gear-stat-preview{position:absolute;top:84px;left:30px;width:210px;background:#14213bea;border:1px solid #829fbd;border-radius:8px;padding:8px;color:#eef7ff;font-size:11px}.gear-stat-preview .equip-preview{margin:0;padding:0;background:none}.gear-stat-preview p{margin:3px 0}.gear-stat-preview small{display:block;font-size:10px}.gear-stat-preview [hidden]{display:none}@media(max-height:480px){.gear-stat-preview{top:-120px;left:52px;width:190px;font-size:10px;max-height:150px;overflow:hidden}}

/* Same codex, inventory icons and workshop; only recipe presentation changes. */
#detail-popover[data-view="gear-codex"]{width:min(620px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto;padding:14px;scrollbar-gutter:stable}
[data-view="gear-codex"] .detail-close{position:sticky;float:right;top:0;z-index:4;background:#1d2d4b}
[data-view="gear-codex"] h2{margin-right:30px}
.gear-codex-toolbar{position:sticky;top:-14px;z-index:3;background:#192842;padding:8px 0;box-shadow:0 5px 8px #10192c55}
.gear-codex-tabs{display:flex;gap:7px}.gear-codex-tabs button{flex:1;border:1px solid #667e9d;background:#122039;color:#c4d2e4;border-radius:7px;padding:8px;font-size:13px;font-weight:800}
.gear-codex-tabs button[aria-pressed="true"]{color:#ffe8a4;border-color:#ddc181;box-shadow:inset 0 1px #fff4ba44;background:#39413d}.gear-codex-tabs b{margin-left:4px}
.gear-codex-toolbar>p{font-size:10px;line-height:1.5;color:#b9c8dc;margin:6px 0}
#gear-codex-detail{font-size:11px;line-height:1.45;min-height:43px;padding:6px 8px;background:#101c32;border:1px solid #465d7b;border-radius:6px;color:#dbe4ec}
#gear-codex-detail strong{color:#ffe8af}#gear-codex-detail small{display:block;color:#aabbd1;font-size:10px}
[data-view="gear-codex"] .gear-catalog{gap:9px;margin-top:8px}
.gear-recipe{border:1px solid #4c627e;border-radius:9px;padding:9px;background:#111f35}
.gear-recipe.craftable{border-color:#bba566;box-shadow:inset 0 0 0 1px #ffe5a026,0 0 9px #dfcb5626}
.gear-recipe header,.gear-recipe footer{display:flex;align-items:center;justify-content:space-between;gap:8px}
.gear-recipe header strong{font-size:13px;color:#f4eac8}.gear-recipe header>span{font-size:10px;color:#b8c8de}.gear-recipe.craftable header>span{color:#ffe28c;font-weight:800}
.gear-recipe-formula{display:flex;align-items:center;justify-content:center;gap:7px;margin:7px 0}
.gear-recipe-formula>i{padding:0;border:0;font-size:17px;color:#8aa3bd}
.gear-recipe .gear-ingredient,.gear-recipe .gear-product{display:flex;flex-direction:column;gap:3px;padding:5px 7px;min-width:78px;text-align:center;border:1px solid #546984;background:#182b41}
.gear-recipe .gear-icon{width:34px;height:34px;flex:0 0 34px}.gear-recipe .item-art{width:26px;height:26px}
.gear-recipe .gear-ingredient b{font-size:10px;font-weight:650}.gear-recipe .gear-ingredient>small,.gear-recipe .gear-product>small{font-size:10px;margin:0;color:#c6d7d8}
.gear-recipe .gear-ingredient.missing{background:#111b2d;border-color:#475466}.gear-recipe .missing .gear-icon{filter:brightness(.48) saturate(.5)}.gear-recipe .missing>small{color:#e3a99f}
.gear-recipe .gear-ingredient.enough{border-color:#739c8a}.gear-recipe .enough>small{color:#c5ead0}
.gear-recipe>p{margin:4px 0 8px;font-size:11px;line-height:1.45;color:#bbced2}.gear-recipe footer>small{font-size:10px;color:#b9c8dc}
.gear-recipe footer>button{font-size:11px;white-space:nowrap;padding:6px 10px}.gear-recipe.craftable footer>button{border-color:#c8ae6f;color:#ffe4a0;background:#3c3d35}
.gear-codex-empty{padding:24px 10px;text-align:center;color:#becee1;font-size:13px;line-height:1.8}

/* Compact equipment rail sits beside, never above, the existing bench. */
body.playing #hud-items.gear-rail,body.playing #hud-items.gear-rail[open]{position:fixed;bottom:auto;max-height:var(--rail-height);overflow:hidden;padding:3px;border-radius:9px;background:#162741ed;z-index:14;box-shadow:0 2px 6px #0005;pointer-events:auto}
body.playing #hud-items.gear-rail summary{display:flex;align-items:center;gap:3px;padding:0 3px;font-size:10px;min-height:22px;list-style:none}
body.playing #hud-items.gear-rail summary::-webkit-details-marker{display:none}
.gear-rail summary>span{flex:1;white-space:nowrap}.gear-rail summary b{color:#ffe7a2}
.gear-rail summary button,.gear-rail #item-codex{flex:0 0 22px;margin:0;padding:1px;width:22px;height:21px;min-height:0;border:1px solid #6c839e;border-radius:5px;font-size:14px;line-height:16px}
body.playing .gear-rail .item-card{background:none;border:0;padding:0!important;margin:0}
.gear-rail .item-card>.card-heading{display:none}
body.playing #hud-items.gear-rail #item-inventory{display:flex;flex-wrap:nowrap;gap:3px;padding:2px;max-height:36px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;touch-action:none}
body.playing #hud-items.gear-rail .item-slot{flex:0 0 28px;width:28px;height:28px;min-height:0;padding:2px;border-radius:50%;border:1px solid #93adc5;background:radial-gradient(#38516a,#142235);touch-action:none!important}
body.playing #hud-items.gear-rail .item-slot:disabled{display:none}
.gear-rail .item-slot .gear-icon{min-width:0;min-height:0;border:0;background:none;border-radius:50%;box-shadow:none}.gear-rail .item-slot .item-art{width:22px;height:22px;image-rendering:pixelated}
body.playing #hud-items.gear-rail.gear-expanded #item-inventory{display:grid;grid-auto-flow:column;grid-template-rows:repeat(2,28px);grid-auto-columns:28px;max-height:70px}
#gear-tap-hint{position:relative;padding:3px 17px 2px 3px;font-size:9px;line-height:1.35;max-height:55px;overflow:auto;color:#ffe4a0}#gear-tap-hint b,#gear-tap-hint span,#gear-tap-hint small{display:block;font-size:9px}#gear-tap-hint button{position:absolute;top:1px;right:0;padding:1px 3px;font-size:10px}
body.gear-tap-selected .bench-slot.occupied{outline:1px solid #cce5a1}
body.unit-dragging #hud-items.gear-rail{opacity:.4;pointer-events:none}
@media(max-height:480px){body.playing #hud-items.gear-rail summary{font-size:9px}.gear-rail .item-slot .item-art{width:20px;height:20px}}
.eevee-member-list>div{display:flex;gap:8px;align-items:center;padding:5px;opacity:.5}.eevee-member-list>div.active{opacity:1;background:#314241}.eevee-member-list img{width:44px;height:36px;object-fit:contain;image-rendering:pixelated}.eevee-member-list small{display:block}
.eevee-anchor{display:flex;align-items:center;justify-content:center;gap:15px}.eevee-anchor img{width:70px;height:65px;object-fit:contain;image-rendering:pixelated}.eevee-anchor p{font-size:12px}
.eevee-mix-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(115px,1fr));gap:7px;max-height:32vh;overflow:auto}.eevee-mix-grid button{display:flex;flex-direction:column;align-items:center;padding:8px;border:1px solid #657e9f;background:#192b43}.eevee-mix-grid button[aria-pressed=true]{border-color:#f2d38b;background:#454337;box-shadow:inset 0 0 0 2px #e4c888}.eevee-mix-grid img{width:60px;height:52px;object-fit:contain;image-rendering:pixelated}.eevee-mix-grid small{font-size:10px}.eevee-mix-actions{display:flex;justify-content:space-between;gap:8px;margin-top:8px}.eevee-mix-actions button{padding:8px}
@media(max-height:480px){#detail-popover[data-view="gear-codex"]{padding:10px;width:min(650px,calc(100vw - 24px))}.gear-codex-toolbar{top:-10px;padding:4px 0}.gear-codex-tabs button{padding:5px;font-size:11px}.gear-codex-toolbar>p{margin:4px 0;font-size:9px}#gear-codex-detail{min-height:35px;padding:4px 7px;font-size:10px}.gear-recipe{padding:7px}.gear-recipe-formula{margin:5px 0}.gear-recipe .gear-ingredient,.gear-recipe .gear-product{padding:4px 6px}}

/* Keep the original bench and sale panel in their original footer rectangles. */
body.playing.unit-dragging .game-footer>.footer-head{opacity:1!important;z-index:13;pointer-events:none!important}
body.playing.unit-dragging .game-footer .footer-head>:not(#bench){visibility:hidden}
body.playing.unit-dragging .game-footer .footer-head #bench,body.playing.unit-dragging .game-footer .footer-head #bench *{pointer-events:auto!important}
body.playing.unit-dragging .game-footer #sell-drop{padding-top:calc(var(--bench-clearance,48px) + 8px);padding-bottom:8px}
.bench-slot.bench-drop-ready{outline:2px solid #c8f0d0;box-shadow:0 0 10px #95e7bc55!important;background:linear-gradient(#3c5c55,#203d3b)!important}
#bench.bench-drop-full .bench-slot{outline:1px solid #d38d87}
@media(max-height:480px){body.playing.unit-dragging .game-footer #sell-drop{gap:16px;padding-top:calc(var(--bench-clearance,31px) + 5px);padding-bottom:5px}.sale-emblem{width:43px;height:43px}.sale-emblem svg{width:29px;height:29px}.sale-copy{gap:1px;min-width:210px}.sale-copy strong{font-size:24px}.sale-copy b{font-size:13px}.sale-copy small,.sale-copy span{font-size:9px}.sale-copy span{margin-top:2px}}

[data-synergy="eeveeFamily"] .syn-top{flex-direction:column;gap:0}[data-synergy="eeveeFamily"] .syn-top>span{white-space:nowrap;font-size:10px}
