#luck-modal { z-index:20000; }
body:has(#luck-modal.active) #item-hover-tooltip { z-index:20050!important; }
#luck-modal .luck-dialog { width:94vw!important; max-width:2400px; height:92dvh; max-height:96dvh; display:flex; flex-direction:column; overflow:hidden; padding:0; background:linear-gradient(135deg,#202a30f5,#11181df7 55%,#171c22f7); }
#luck-modal .modal-header { flex:0 0 auto; padding:12px 20px; margin:0; background:linear-gradient(100deg,#c1a56b12,transparent 65%); border-bottom:1px solid #c0a06a35; }
#luck-modal .modal-header h2 { margin:0; }
#luck-modal .modal-header p { margin:7px 0 0; color:#b6c0c7; font-size:12px; line-height:1.5; }
.luck-eyebrow { display:none; }
.luck-profile-bar { flex:0 0 auto; display:grid; grid-template-columns:minmax(200px,1.3fr) minmax(140px,.7fr) minmax(220px,1fr); gap:18px; padding:14px 24px; border-bottom:1px solid #8296a326; background:#09131a55; }
.luck-profile-bar label { display:grid; gap:7px; font-size:11px; color:#c7b587; min-width:0; }
.luck-profile-bar select { width:100%; min-width:0; height:36px; padding:6px 10px; color:#f4f1e9; background:#101b23; border:1px solid #b69c6355; border-radius:3px; }
.luck-profile-bar option,#luck-modal select option { color:#f4f1e9; background:#14212b; }
.luck-profile-bar p { align-self:center; margin:0; font-size:11px; line-height:1.7; color:#adb9c1; }
.luck-workspace { display:grid; grid-template-columns:290px minmax(520px,1.6fr) minmax(280px,.8fr); gap:18px; min-height:0; flex:1; padding:16px 20px; }
.luck-workspace h3 { color:#e7d8ad; font-size:14px; font-weight:500; margin:0 0 12px; }
.luck-workspace .luck-section-title { display:flex; align-items:center; gap:9px; min-height:25px; margin-bottom:14px; color:#f1e6cd; }
.luck-section-title>span { display:inline-grid; place-items:center; width:24px; height:24px; flex:none; color:#d6bc83; background:#b89b5820; border:1px solid #b89b5838; border-radius:3px; font-size:10px; }
.luck-inventory-pane,.luck-math-pane,.luck-results-pane { min-height:0; min-width:0; display:flex; flex-direction:column; }
.luck-inventory-pane { overflow:auto; scrollbar-gutter:stable; border-right:1px solid #9da9b329; padding-right:14px; gap:10px; }
.luck-inventory-pane>.luck-section-title { margin-bottom:0; flex-shrink:0; }
.luck-inventory-host { min-height:0; flex:0 0 auto; padding:0; overflow:visible; }
#luck-modal .inventory-workspace { position:static; top:auto; width:100%; height:auto; min-height:0; max-height:none; overflow:visible; margin:0; padding:0; }
#luck-modal .inventory-shell { display:flex; flex-direction:column; width:100%; min-width:0; height:auto; overflow:visible; }
#luck-modal .inventory-board { grid-area:auto; flex:none; margin:0 auto; overflow:visible; }
#luck-modal .special-slot-stage:not(:has(.active)) { display:none; }
#luck-modal .equipment-special-access { min-height:0; padding-bottom:0; }
#luck-modal .special-inline-panels:not(:has(.active)) { min-height:0; padding:0; border:0; background:none; }
.luck-hint { font-size:11px; line-height:1.6; color:#a8b0a0; margin:0; }
#luck-clear { font-size:12px; align-self:center; margin-top:0; flex-shrink:0; }
.luck-math-card,.luck-target-card { border:1px solid #b29d6a40; border-radius:5px; background:linear-gradient(135deg,#263139b3,#111b23e8); padding:16px; box-shadow:inset 0 1px #d6e2e90a,0 6px 20px #00000012; }
.luck-math-pane { overflow:hidden; }
.luck-math-card { flex:1; display:flex; flex-direction:column; gap:14px; overflow:auto; scrollbar-gutter:stable; padding:12px; }
.luck-math-card .luck-enchant-math { display:grid; grid-template-columns:minmax(160px,.8fr) minmax(260px,1.2fr); align-items:start; flex:none; gap:14px; min-width:0; }
.em-visual-column,.em-calculation-column { display:flex; flex-direction:column; gap:12px; min-width:0; }
.luck-math-card .em-calculation-empty { margin:0; padding:18px; color:#aebbc3; font-size:12px; line-height:1.7; border:1px dashed #9eacb633; border-radius:3px; }
.em-calculation-empty[hidden] { display:none; }
.luck-enchant-math [data-em-inputs] { display:flex; flex-direction:column; gap:14px; }
.luck-enchant-math [data-em-inputs][hidden] { display:none; }
.luck-enchant-math [data-em-prices] { display:grid; gap:8px; padding-top:0; }
.luck-math-card .luck-enchant-math .em-resource { display:flex; flex-direction:column; align-items:stretch; padding:8px; border:1px solid #9babb32b; border-radius:3px; background:#08111855; }
.luck-enchant-math .em-resource span { line-height:1.5; overflow-wrap:anywhere; }
.luck-enchant-math .em-resource small { display:block; margin-top:5px; color:#a4b3be; font-size:10px; }
.luck-enchant-math>small { color:#a4b1bb; font-size:11px; line-height:1.7; padding-top:12px; border-top:1px solid #92a1af25; }
.luck-enchant-math [data-em-result] { display:block; white-space:pre-line; overflow-wrap:anywhere; color:#d1e6d2; font-size:12px; line-height:1.8; }
.luck-enchant-math [data-em-result]:not(:empty) { padding:12px; background:#162c2455; border-left:2px solid #8bb38e; border-radius:3px; }
.luck-enchant-math .em-clover { padding:9px; border:1px solid #9babb32b; border-radius:3px; background:#08111855; }
.luck-math-card .em-clover .settings-toggle-row { display:flex; flex-direction:row; align-items:center; justify-content:space-between; gap:12px; margin:0; }
.luck-enchant-math .em-clover .settings-switch { flex-shrink:0; }
.luck-enchant-math .em-clover .settings-switch input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; z-index:1; }
.luck-enchant-math .em-clover .settings-switch input:disabled { cursor:wait; }
.luck-enchant-math .em-clover p { margin:6px 0 3px; color:#e1e7ed; font-size:10px; }
.luck-enchant-math .em-clover small { display:block; color:#a4b3be; font-size:9px; line-height:1.5; }
.luck-enchant-math [data-em-calculate] { width:100%; border:1px solid #aa955c66; color:#f6e6bc; background:linear-gradient(135deg,#7a68402e,#3a3b351f); padding:10px 12px; }
.luck-math-card label { display:flex; flex-direction:column; gap:9px; font-size:12px; color:#d3d8c9; }
.luck-math-card :is(select,input) { width:100%; min-width:0; height:36px; color:#fff; border:1px solid #9b7c3d55; border-radius:3px; background:#101b23; padding:6px 9px; }
.luck-math-card input:disabled { opacity:.4; }
.luck-math-card dl { margin:5px 0; }
.luck-math-card dl>div { padding:13px 0; display:flex; justify-content:space-between; gap:10px; border-bottom:1px solid #9b7c3d28; }
.luck-math-card dt { font-size:12px; color:#bbc3b2; }
.luck-math-card dd { margin:0; color:#d7decf; }
.luck-math-card p { font-size:12px; line-height:1.7; color:#aaa; margin-top:auto; }
.luck-results-pane { gap:12px; overflow:auto; padding-right:4px; scrollbar-gutter:stable; }
.luck-results-pane>.luck-section-title { margin-bottom:2px; flex-shrink:0; }
.luck-goals { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.luck-target-card { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:9px; min-width:0; position:relative; overflow:hidden; border-top-color:#c9ad7780; }
.luck-target-card small { color:#9eacb8; font-size:10px; }
.luck-target-card label,.luck-target-card>span { color:#e7d8ad; font-size:13px; }
.luck-target-card strong { color:#b0dc93; font-size:32px; font-weight:400; line-height:1.3; }
#luck-target { width:100%; max-width:190px; height:43px; padding:2px 7px; text-align:center; font-size:29px; color:#fff; background:#0d1720; border:1px solid #8ca47a70; border-radius:3px; }
.luck-target-card .number-stepper { width:100%; max-width:190px; }
#luck-status { min-height:20px; margin:0; color:#c6c2a9; font-size:12px; line-height:1.6; }
.luck-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.luck-toolbar button { padding:7px 12px; font-size:12px; }
#luck-modal #luck-pick { border:1px solid #83a68a65!important; color:#e3f2e4!important; background:linear-gradient(125deg,#42674b60,#1b342b80)!important; padding:10px 14px; }
#luck-modal [data-em-calculate] { border-color:#aa955c66!important; color:#f6e6bc!important; background:linear-gradient(135deg,#7a684040,#3a3b3538)!important; }
#luck-save-status { color:#9eb695; font-size:11px; margin-left:auto; }
#luck-reload[hidden] { display:none!important; }
.luck-items-panel { min-height:180px; min-width:0; flex:1 0 210px; display:flex; flex-direction:column; border:1px solid #9baab33a; border-radius:5px; background:linear-gradient(145deg,#202c35c9,#101922e8); overflow:hidden; }
.luck-items-panel>header { padding:12px 14px; border-bottom:1px solid #9b7c3d30; }
.luck-items-panel h3 { margin:0 0 6px; }
#luck-cost { font-size:11px; line-height:1.5; color:#aeb9a3; margin:0; }
.luck-items-scroll { min-height:0; overflow:auto; flex:1; }
.luck-items-scroll table { width:100%; border-collapse:collapse; font-size:11px; }
.luck-items-scroll th { position:sticky; top:0; z-index:1; background:#23303b; color:#d7c498; font-weight:400; text-align:left; }
.luck-items-scroll th,.luck-items-scroll td { padding:8px; border-bottom:1px solid #9b7c3d20; vertical-align:middle; }
.luck-items-scroll td:first-child { min-width:140px; }
.luck-item-open { display:flex; align-items:center; gap:9px; width:100%; padding:0; text-align:left; background:none; border:0; cursor:pointer; font:inherit; color:inherit; }
.luck-item-open>i { flex:0 0 34px; width:34px; height:34px; position:relative; font-style:normal; }
.luck-item-open>i>.item-icon-composite { width:100%; height:100%; }
.luck-pin,.luck-ls { font-size:10px; padding:4px 6px; border:1px solid #9b7c3d55; border-radius:3px; color:#bbbda9; background:#141c13; cursor:pointer; }
.luck-pin.is-pinned { color:#b0dc93; border-color:#789d5c70; }
.luck-ls { margin-top:4px; }
.luck-empty { font-size:12px; line-height:1.6; color:#a2aa9a; padding:15px!important; }
.luck-loading { height:4px; min-height:4px; width:100%; overflow:hidden; background:#233422; border-radius:2px; }
.luck-loading[hidden] { display:none; }
.luck-loading>span { display:block; height:100%; width:35%; background:linear-gradient(90deg,transparent,#a5d888,transparent); animation:luck-loading 1.2s ease-in-out infinite alternate; }
@keyframes luck-loading { from{transform:translateX(-100%)}to{transform:translateX(290%)} }
#luck-modal .luck-slot-pinned { outline:1px solid #99ac6980; outline-offset:1px; }
#luck-modal .luck-slot-unavailable { opacity:.35; }
#luck-modal [data-luck-slot] { cursor:pointer; }
#luck-menu-seed [data-luck-slot="agathion_main"] { grid-column:1; }
#luck-menu-seed [data-luck-slot="agathion1"] { grid-column:3; }
#luck-menu-seed [data-luck-slot="agathion2"] { grid-column:4; }
#luck-menu-seed [data-luck-slot="agathion3"] { grid-column:5; }
#luck-menu-seed [data-luck-slot="agathion4"] { grid-column:6; }
.luck-editor-overlay { z-index:20030!important; }
#luck-modal .luck-editor { width:min(1000px,94vw); height:min(760px,90dvh); max-height:94dvh; display:flex; flex-direction:column; padding:0; overflow:hidden; }
.luck-editor-body { display:grid; grid-template-columns:minmax(200px,.85fr) minmax(250px,1.15fr); min-height:0; flex:1; }
.luck-editor-picker { display:flex; flex-direction:column; min-height:0; padding:14px; gap:12px; border-right:1px solid #9b7c3d40; }
#luck-item-search { color:#fff; padding:10px; width:100%; border:1px solid #9b7c3d70; background:#0a100b; border-radius:3px; }
#luck-picker-results { flex:1; min-height:0; overflow:auto; color:#adb7a4; font-size:12px; }
.luck-picker-item { width:100%; display:flex; align-items:center; gap:10px; text-align:left; padding:8px; color:#e1e4d9; background:linear-gradient(135deg,#252d20,#131911); border:1px solid #9b7c3d30; border-radius:3px; margin-bottom:6px; cursor:pointer; font:inherit; }
.luck-picker-item:hover { border-color:#9ab470; }
.luck-picker-item>i { display:block; width:36px; height:36px; flex:0 0 36px; position:relative; }
.luck-picker-item>i>.item-icon-composite { width:100%; height:100%; }
.luck-picker-item>span { min-width:0; overflow-wrap:anywhere; }
.luck-collection-gain { display:block; margin-top:5px; color:#c4ddb2; font-size:11px; white-space:normal; }
#luck-collection-filters { display:flex; gap:6px; flex-wrap:wrap; }
#luck-collection-filters[hidden] { display:none; }
#luck-collection-filters button { flex:1; padding:8px; border:1px solid #9b7c3d60; border-radius:3px; color:#e7e9e5; background:linear-gradient(135deg,#28323c,#182129); cursor:pointer; font:inherit; font-size:12px; }
#luck-collection-filters button[aria-pressed="true"] { border-color:#c3a460; background:linear-gradient(135deg,#51452b,#2b2c28); }
.luck-editor-settings { overflow:auto; min-height:0; padding:16px; display:flex; flex-direction:column; gap:15px; }
.luck-editor-settings label { display:flex; flex-direction:column; gap:7px; color:#d5d9cb; font-size:12px; }
.luck-editor-settings :is(select,input:not([type="checkbox"])) { background:#0b120b; color:#fff; border:1px solid #9b7c3d65; padding:7px; min-height:34px; border-radius:3px; width:100%; min-width:0; }
.luck-editor-levels { display:flex; gap:12px; }
.luck-editor-levels[hidden],#luck-homunculus-bonds[hidden],#luck-augmentation[hidden] { display:none; }
.luck-extra-sources { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:0; }
.luck-extra-sources button { display:flex; position:relative; flex-direction:column; gap:7px; min-width:0; min-height:80px; padding:12px 25px 12px 11px; border:1px solid #a8b8c13b; border-radius:4px; background:linear-gradient(135deg,#30435180,#192732b3); text-align:left; color:#f0e6cc; cursor:pointer; transition:border-color .15s,background .15s; }
.luck-extra-sources button:hover:not(:disabled) { border-color:#d0b87899; background:linear-gradient(135deg,#3c4d5880,#24313ab3); }
.luck-extra-sources button>span { font-size:11px; line-height:1.4; }
.luck-extra-sources button>small { font-size:10px; line-height:1.5; color:#b1c1cd; overflow-wrap:anywhere; }
.luck-extra-sources button>b { position:absolute; top:10px; right:8px; color:#d5bd83; font-size:16px; font-weight:400; }
#luck-modal :is(button,select,input):focus-visible { outline:2px solid #cbb277; outline-offset:2px; }
#luck-modal button:disabled { opacity:.45; cursor:default; }
.luck-homunculus-bonds { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.luck-homunculus-bonds h4,.luck-homunculus-bonds p { grid-column:1/-1; margin:0; }
.luck-homunculus-bonds select:disabled { opacity:.4; }
.luck-editor-levels>label { flex:1; min-width:0; }
#luck-secondary-wrap[hidden] { display:none; }
.luck-editor-settings .luck-lock-choice { flex-direction:row; align-items:center; }
#luck-augmentation h4 { margin:5px 0 12px; color:#dacba3; font-size:13px; font-weight:400; }
.luck-aug-row { padding:12px; background:linear-gradient(145deg,#25302088,#131c1388); border:1px solid #9b7c3d35; border-radius:4px; margin-bottom:10px; }
.luck-aug-property { display:flex; align-items:center; gap:7px; margin-top:8px; }
.luck-aug-property>[data-luck-roll],.luck-aug-property>.number-stepper { flex:0 0 85px; max-width:85px; }
#luck-editor-error { min-height:18px; color:#e1b68f; font-size:12px; margin:0; padding:5px 16px; }
#luck-modal .luck-editor .modal-footer { flex:0 0 auto; padding:12px 16px; display:flex; justify-content:space-between; margin:0; }
#luck-editor-description { font-size:12px; color:#c9d2c0; }
@media(prefers-reduced-motion:reduce){.luck-loading>span{animation:none;width:100%}}

/* Source controls remain below the shared inventory. Native Wait is a lazy animated WebP. */
.luck-inventory-pane .luck-profile-bar { width:100%; grid-template-columns:minmax(0,1.2fr) minmax(85px,.8fr); gap:8px; padding:0; margin:0; border:0; background:none; }
.luck-inventory-pane .luck-profile-bar label { gap:6px; color:#d7c69a; }
.luck-inventory-pane .luck-profile-bar select { height:34px; }
.luck-extra-sources { grid-template-columns:repeat(2,minmax(0,1fr)); margin:0; flex-shrink:0; }
.luck-extra-sources button { min-height:60px; padding:9px 20px 9px 9px; gap:4px; border-color:#a8b8c135; background:linear-gradient(145deg,#293640d9,#151e25e8); }
.luck-extra-sources button>span { font-size:11px; color:#f0e6cc; }
.luck-extra-sources button>small { color:#c0d2b1; font-size:10px; }
.luck-homunculus-card { position:relative; display:grid; grid-template-columns:100px minmax(0,1fr); align-items:center; min-height:208px; flex-shrink:0; overflow:hidden; isolation:isolate; border:1px solid #a8b8c14a; border-radius:5px; background:linear-gradient(135deg,#23323c,#111b23 72%); }
.luck-homunculus-card::before { content:""; position:absolute; inset:0; z-index:-1; opacity:.8; background:radial-gradient(ellipse at 23% 54%,#7797a927,transparent 55%),linear-gradient(125deg,#bd9f4c0d,transparent 62%); }
.luck-homunculus-card[data-quality="1"]::before { background:radial-gradient(ellipse at 23% 54%,#8eaa692c,transparent 56%),linear-gradient(125deg,#c1a54b13,transparent 62%); }
.luck-homunculus-card[data-quality="2"]::before { background:radial-gradient(ellipse at 23% 54%,#72a9ba32,transparent 56%),linear-gradient(125deg,#9b74c51a,transparent 62%); }
.luck-homunculus-card[data-quality="3"]::before { background:radial-gradient(ellipse at 23% 54%,#c4a25439,transparent 56%),linear-gradient(125deg,#ddc46e22,#6a51861d 62%,transparent); }
.luck-homunculus-badge { position:absolute; z-index:2; top:9px; left:9px; max-width:calc(100% - 18px); padding:5px 8px; border:1px solid #d4bd7d72; border-radius:3px; color:#f2e4bd; background:#111920c9; font-size:9px; line-height:1.4; }
.luck-homunculus-badge[data-active="true"] { border-color:#b1d18d9c; color:#e8f5d6; background:#1a2a20e8; box-shadow:0 0 14px #8cb96125; }
.luck-homunculus-portrait { position:relative; width:100px; height:100%; min-height:208px; display:grid; place-items:center; overflow:hidden; background:center/cover no-repeat url('/static/images/homunculi/fofo-background-1-v1.webp'); }
.luck-homunculus-card[data-quality="1"] .luck-homunculus-portrait { background-image:url('/static/images/homunculi/fofo-background-2-v1.webp'); }
.luck-homunculus-card[data-quality="2"] .luck-homunculus-portrait { background-image:url('/static/images/homunculi/fofo-background-3-v1.webp'); }
.luck-homunculus-card[data-quality="3"] .luck-homunculus-portrait { background-image:url('/static/images/homunculi/fofo-background-4-v1.webp'); }
.luck-homunculus-portrait img { position:absolute; left:50%; bottom:9px; width:140px; height:140px; max-width:none; object-fit:contain; transform:translateX(-50%); filter:drop-shadow(0 5px 9px #0007); }
.luck-homunculus-info { min-width:0; padding:12px 9px; }
.luck-homunculus-kicker { color:#b6c4c8; font-size:9px; letter-spacing:.12em; text-transform:uppercase; }
.luck-homunculus-info h4 { margin:5px 0 7px; color:#f2e5c5; font-size:12px; font-weight:500; line-height:1.45; }
.luck-homunculus-info p { margin:0 0 12px; color:#bdc7cc; font-size:10px; line-height:1.55; }
.luck-homunculus-trigger { display:flex; flex-direction:row!important; align-items:center; justify-content:space-between; gap:8px!important; color:#d6c38f!important; font-size:10px!important; }
.luck-homunculus-trigger .settings-switch { flex:0 0 38px; }
.luck-homunculus-trigger .settings-switch input { position:absolute; inset:0; width:100%; height:100%; margin:0; opacity:0; z-index:1; cursor:pointer; }
.luck-homunculus-trigger .settings-switch input:disabled { cursor:default; }
#luck-homunculus-trigger-value { display:block; margin-top:5px; color:#b4bfc4; font-size:9px; line-height:1.5; }
#luck-homunculus-choose { width:100%; margin-top:14px; padding:7px 9px; color:#eee2c6; font-size:10px; border:1px solid #b59b605c; background:linear-gradient(135deg,#9e814128,#1b272f); border-radius:3px; }
.luck-enchant-math { min-height:0; }
.em-intro { margin:0!important; color:#dfc989!important; font-size:12px!important; line-height:1.6!important; text-align:center; }
.em-workbench { flex:none; width:100%; max-width:418px; margin:0 auto; background:#101315; border:1px solid #8b795942; border-radius:3px; overflow:hidden; }
.em-mechanism { position:relative; width:100%; aspect-ratio:418/308; background:center/100% 100% no-repeat url('/static/images/luck/enchant-workbench-v1.webp'); }
.em-selected-slot { position:absolute; left:49.76%; top:42.86%; transform:translate(-50%,-50%); width:17%; aspect-ratio:1; display:grid; place-items:center; background:linear-gradient(145deg,#1b1c1d,#101113); border:1px solid #c1ab6f99; box-shadow:inset 0 0 8px #000c,0 0 0 3px #171819b3; }
.em-selected-slot img { display:block; width:100%; height:100%; object-fit:contain; }
.em-selected-slot img[hidden],.em-selected-slot span[hidden] { display:none; }
.em-selected-slot span { position:absolute; top:2px; left:2px; border-radius:2px; padding:0 3px; background:#111c; color:#fff0b9; font-size:11px; line-height:1.5; }
.em-selected-copy { min-height:54px; display:flex; flex-direction:column; gap:5px; justify-content:center; padding:9px 12px; text-align:center; background:linear-gradient(#15191bbb,#0e1418); border-top:1px solid #a18c5835; }
.em-selected-copy h4 { margin:0; color:#e6d6ae; font-size:12px; font-weight:500; line-height:1.5; }
.luck-math-card .em-selected-copy p { margin:0; color:#a4afb5; font-size:10px; line-height:1.5; }
.em-allowed-items { padding:10px; border:1px solid #9b875042; border-radius:3px; background:linear-gradient(145deg,#171a1cb3,#0c1115); }
.em-allowed-items h4 { margin:0 0 10px; color:#bfb192; font-size:11px; font-weight:400; }
.em-route-grid { display:grid; grid-template-columns:repeat(auto-fill,48px); align-content:start; gap:5px; min-height:48px; max-height:170px; overflow:auto; padding:2px; }
.em-route-empty { grid-column:1/-1; padding:18px 12px; color:#b9c3c7; font-size:11px; line-height:1.6; border:1px dashed #9eacb633; border-radius:4px; }
.em-route-card { display:grid; place-items:center; width:48px; height:48px; min-width:0; padding:2px; border:1px solid #9dabb34d; border-radius:3px; background:#151b20; cursor:pointer; transition:border-color .15s,box-shadow .15s; }
.em-route-card img { width:42px; height:42px; object-fit:contain; border-radius:2px; }
.em-route-card:hover,.em-route-card[aria-pressed="true"] { border-color:#cbb277; box-shadow:inset 0 0 0 1px #cbb27765,0 0 9px #cbb27726; }
.em-route-details { display:flex; flex-direction:column; gap:10px; }
.em-route-details[hidden] { display:none; }
.luck-enchant-math .em-clover { margin:0; }
.luck-enchant-math [data-em-inputs] { gap:9px; }
.luck-enchant-math .em-route-fields { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.luck-enchant-math .em-resource { padding:9px 11px; }
.luck-enchant-math [data-em-calculate] { width:auto; align-self:flex-end; min-width:190px; }
.luck-enchant-math [data-em-result]:not(:empty) { padding:9px; color:#ece8d6; border:1px solid #bda45b65; border-left:3px solid #bda45b; background:linear-gradient(135deg,#42391f57,#151e24); border-radius:4px; }
.luck-enchant-math .em-route-note { color:#9eabb1; font-size:9px; line-height:1.5; }
.em-result-badges { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin-bottom:8px; }
.em-result-badge { display:flex; flex-direction:column; gap:5px; padding:8px; border:1px solid #b99c5855; background:linear-gradient(145deg,#9d7e302e,#0b141baa); border-radius:4px; }
.em-result-badge small { color:#c0c9ce; font-size:10px; line-height:1.5; }
.em-result-badge strong { color:#f1e4bd; font-size:18px; font-weight:500; line-height:1.5; overflow-wrap:anywhere; }
.em-result-badge:last-child strong { font-size:13px; }
.em-result-resources { display:grid; gap:5px; white-space:normal; }
.em-result-resource { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:9px; padding:5px 0; border-bottom:1px solid #d3bc7c20; color:#ccd4d9; font-size:10px; line-height:1.45; }
.em-result-resource strong { flex-shrink:0; color:#f1e8d3; font-weight:400; }
.em-result-clover { color:#bfdcae; font-size:10px; margin-top:12px; white-space:normal; }
@media(min-width:1900px){.luck-workspace{grid-template-columns:310px minmax(580px,1.7fr) minmax(340px,.8fr);gap:22px;padding:18px 24px}.luck-inventory-pane{padding-right:18px}.luck-homunculus-card{grid-template-columns:110px minmax(0,1fr)}.luck-homunculus-portrait{width:110px}}
@media(max-width:1300px){#luck-modal .luck-dialog{width:96vw!important;height:96dvh}.luck-workspace{grid-template-columns:274px minmax(0,1fr);grid-auto-rows:max-content;gap:16px;padding:14px;overflow:auto;align-items:start;align-content:start}.luck-inventory-pane{grid-column:1;grid-row:1/3;overflow:visible;padding-right:12px;min-height:0}.luck-math-pane{grid-column:2;grid-row:1;min-height:auto;overflow:visible}.luck-math-card{overflow:visible;flex:none}.luck-results-pane{grid-column:2;grid-row:2;min-height:auto;overflow:visible}.luck-items-panel{flex:none}.luck-editor-body{grid-template-columns:minmax(160px,.8fr) minmax(220px,1fr)}}
@media(max-width:850px){.luck-math-card .luck-enchant-math{grid-template-columns:minmax(0,1fr)}.em-workbench{max-width:280px}}
@media(max-width:700px){#luck-modal .modal-header{padding:12px 14px}#luck-modal .modal-header p{font-size:10px}.luck-workspace{display:flex;flex-direction:column;padding:12px;gap:24px;align-items:stretch}.luck-inventory-pane{order:0;overflow:visible;flex:none;width:min(100%,320px);align-self:center;border:0;padding:0}.luck-inventory-pane .luck-profile-bar{grid-template-columns:minmax(0,1.2fr) minmax(85px,.8fr)}.luck-inventory-host{height:auto;min-height:0}.luck-homunculus-card{grid-template-columns:110px minmax(0,1fr)}.luck-homunculus-portrait{width:110px}.luck-math-pane{order:1;min-height:0;flex:none}.luck-results-pane{order:2;min-height:0;flex:none;overflow:visible}.luck-enchant-math .em-route-fields{grid-template-columns:1fr}.luck-enchant-math [data-em-calculate]{width:100%}.em-result-badges{grid-template-columns:1fr}.luck-editor-body{display:flex;flex-direction:column;overflow:auto}.luck-editor-picker{min-height:220px;max-height:280px;flex:none;border-right:0;border-bottom:1px solid #9b7c3d40}.luck-editor-settings{min-height:300px;flex:none;overflow:visible}}
@media(prefers-reduced-motion:reduce){.em-route-card{transition:none}}
