﻿/* Shared raster chrome. Border-image paints inward without changing card geometry. */
html #crm :is(.ur-metric,.ur-guide-card,.ur-guild-card,.ur-guild-mini,.ur-chart-panel,#tab-dashboard .feat,.ur-step-content,.uo-economy-stat,.uo-resource-row,.uo-chart-card,.uo-market-filters,.uo-market-ledger,.uo-finish-frame,#evt-list,.chat-wrap,.set-card,#ench-detail){border:1px solid transparent!important;border-radius:0!important;border-image:var(--uo-frame-image,url('/static/uo-v2-frame.webp')) 230 / 11px / 0 round!important;box-shadow:none!important;min-width:0}
html #crm :is(.ur-masthead,.ur-connect-intro,.ur-platform,.uo-commerce-title){border-color:transparent!important;box-shadow:none!important}
html #crm :is(.ur-masthead,.ur-connect-intro,.ur-platform,.uo-commerce-title)::after{border-image-repeat:round!important}
html #crm :is(.uo-resource-row,#ench-chars>.uo-finish-frame){border-image-width:8px!important}
html #crm :is(.ur-guild-roster,.uo-economy-heading){border:0!important}
html #crm #evt-list{padding:8px;background:var(--uc-panel)!important}
html #crm #evt-list>div{border-bottom:0!important;padding:13px 12px!important;line-height:1.6}
html #crm #evt-list>div:nth-child(even){background:color-mix(in srgb,var(--uc-raised) 60%,transparent)}
html #crm :is(#vend-table th,#vend-table td,.ur-player-table th,.ur-player-table td){border:0!important}
html #crm .ur-player-table{border:1px solid transparent;border-image:var(--uo-frame-image,url('/static/uo-v2-frame.webp')) 230 / 11px / 0 round;padding:8px;background:var(--uc-panel)}
html #crm .ur-player-table tbody tr:nth-child(even){background:var(--uc-raised)}
html #crm #vend-table td:first-child img{border:1px solid transparent!important;border-radius:0!important;border-image:var(--uo-frame-image,url('/static/uo-v2-frame.webp')) 230 / 6px / 0 round!important;box-shadow:none!important}
html #crm #tab-players>div[style*='border-top']{border-top:0!important}
html #crm .ur-step-number{border:1px solid transparent!important;border-radius:0!important;border-image:var(--uo-frame-image,url('/static/uo-v2-frame.webp')) 230 / 9px / 0 round!important;box-shadow:none!important;background:var(--uc-panel)!important;color:var(--g1)!important}
html #crm .ur-steps>div:first-child[style*='absolute']{display:none!important}
html #crm :is(#tab-events,#tab-enchants,#tab-machines,#tab-account,#tab-settings,#tab-wiki,#tab-chat,#tab-players,#tab-connect) :is(.fb,.an-period),html #crm :is(#vend-pager button,.uo-economy-tabs .w-tab,.uo-finish-button){border:0!important;border-radius:0!important;min-height:34px;padding:7px 16px!important;background:var(--uo-button-image,url('/static/uo-forged-button.webp')) center/100% 100% no-repeat!important;box-shadow:none!important;color:var(--uc-ink)!important;text-shadow:0 1px 2px #000;font-weight:600}
html[data-uo-theme='light'] #crm :is(.fb,.an-period,.w-tab,.uo-finish-button){text-shadow:none!important;color:var(--uc-ink)!important}
html #crm :is(.an-period.active,.w-tab[aria-pressed='true'],.uo-finish-button[aria-pressed='true']){color:var(--g1)!important;text-decoration:underline;text-underline-offset:4px}
html #crm :is(button,[role='button'],input,select,textarea):focus-visible{outline:2px solid var(--g1)!important;outline-offset:3px}
html #crm button:disabled{opacity:.5;cursor:not-allowed}
html #crm .uo-finish-heading{display:flex;align-items:center;gap:15px;min-height:86px;padding:12px 20px!important;background:var(--uc-panel);border:1px solid transparent;border-image:var(--uo-frame-image,url('/static/uo-v2-frame.webp')) 230 / 14px / 0 round}
html #crm .uo-finish-heading>.uo-sprite{--uo-icon-size:62px;flex-shrink:0}
html #crm .uo-finish-card-art{--uo-icon-size:42px;display:block;margin:0 0 10px;pointer-events:none}
html #crm #ench-chars>.uo-finish-frame{position:relative;padding:19px 18px 19px 68px!important;min-height:92px}
html #crm #ench-chars>.uo-finish-frame>.uo-finish-card-art{position:absolute;left:14px;top:22px;--uo-icon-size:42px}
html #crm #ench-chars>.uo-finish-frame>div{gap:10px}
html #crm #ench-chars{grid-template-columns:repeat(auto-fill,minmax(min(100%,285px),1fr))!important}
html #crm :is(#tab-machines .feats,#ed-items){grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr))!important}
html #crm .uo-finish-frame{background-color:var(--uc-panel)!important}
html #crm #wiki-art-content .uo-finish-frame{padding:20px!important}
html #crm #wiki-art-content .uo-finish-frame :is(h2,h3){color:var(--g1)!important}
html #crm :is(#ch-portraits img,.chat-m-photo){border:1px solid transparent!important;border-radius:0!important;border-image:var(--uo-frame-image,url('/static/uo-v2-frame.webp')) 230 / 8px / 0 round!important}
html #crm :is(#tab-account,#tab-settings) .uo-finish-frame{max-width:100%;box-sizing:border-box}
html #crm .chat-wrap{padding:9px;background-color:var(--uc-panel)!important}
html #crm .chat-rooms{border:0!important;background:color-mix(in srgb,var(--uc-panel) 94%,transparent)!important}
html #crm :is(.chat-topbar,.chat-input-wrap){border:0!important;background:var(--uc-raised)!important}
html #crm .chat-topbar{min-height:65px}
html #crm .chat-room{border:0!important;margin:3px 6px;min-height:50px;color:var(--uc-muted)}
html #crm .chat-room.active{color:var(--g1)!important;background:var(--uc-raised)!important;border:1px solid transparent!important;border-image:var(--uo-frame-image,url('/static/uo-v2-frame.webp')) 230 / 7px / 0 round!important}
html #crm .chat-room-ic .uo-sprite,html #crm #chat-cur-icon .uo-sprite{--uo-icon-size:31px}
html #crm .chat-room-ic{width:33px}
html #crm :is(.chat-room-name,.chat-m-text){color:var(--uc-ink)}
html #crm :is(.chat-room-desc,.chat-m-time,.chat-typing,.chat-m-react-count){color:var(--uc-muted)!important}
html #crm :is(.chat-input,.chat-ctx,.chat-emoji-panel){background:var(--uc-panel)!important;color:var(--uc-ink)!important}
html #crm :is(.chat-btn-send,.chat-btn-attach,.chat-btn-emoji){min-width:35px;min-height:36px;color:var(--g1)!important}
html[data-uo-theme='light'] #crm :is(#tab-machines,#tab-enchants,#tab-account,#tab-settings) :is([style*='color:#e2e8f0'],[style*='color:#aab1bd'],[style*='color:#888'],[style*='color:#444']){color:var(--uc-ink)!important}
html[data-uo-theme='light'] #crm .chat-m-name{color:#76521c!important}
html[data-uo-theme='light'] #crm .chat-m-reply{color:var(--uc-muted)!important}
@media(max-width:600px){html #crm .uo-finish-heading{min-height:72px;padding:10px 15px!important;font-size:23px}html #crm .uo-finish-heading>.uo-sprite{--uo-icon-size:47px}html #crm .chat-wrap{padding:6px}html #crm .chat-input-wrap{padding:9px 7px}html #crm .chat-topbar{padding:9px}html #crm #ench-chars{grid-template-columns:1fr!important}html #crm #tab-account .uo-finish-frame{min-width:0!important}html #crm #evt-list>div{padding:12px 7px!important}}
/* Home feed belongs to the existing right rail, not between the hero and quick links. */
html #crm .uo-side-events{margin:0 0 18px;padding:8px 4px;min-width:0}
html #crm .uo-side-events .uo-events-header{flex-wrap:wrap;padding:9px 12px;gap:4px}
html #crm .uo-side-events .uo-events-header h2{font-size:16px;flex:1 1 100%;gap:7px}
html #crm .uo-side-events .uo-events-header h2 .uo-sprite{--uo-icon-size:29px}
html #crm .uo-side-events .uo-events-all{margin-left:29px;font-size:11px}
html #crm .uo-side-events .uo-events-row{display:block;padding:10px 0}
html #crm .uo-side-events .uo-events-time{display:block;margin-top:4px;font-size:10px}
html #crm .uo-side-events-toggle{display:none}
html #crm .uo-world-aside>.uo-side-panel:has(.uo-service[onclick*='forum']) h2::after{content:'';display:block;height:93px;margin:7px auto 5px;background:url('/static/uo-v2-campfire.webp') center/116px 116px no-repeat;pointer-events:none}
@media(max-width:600px){html #crm .uo-side-events:not(.uo-side-open) :is(.uo-events-list,.uo-events-footer){display:none}html #crm .uo-side-events-toggle{display:block;border:0;background:none;color:var(--g1);font-size:24px;min-width:40px;min-height:40px;margin-left:auto}html #crm .uo-side-events .uo-events-header h2{flex:1}html #crm .uo-side-events .uo-events-all{margin:0}html #crm .uo-side-events .uo-events-header{gap:5px}html #crm .uo-side-events .uo-events-header h2{font-size:15px}}
/* Sidebar navigation now starts directly with its groups. */
html #crm .sidebar .sb-logo{display:none!important}
html #crm :is(#news-articles [data-news-id],#ytTeaser){border:1px solid transparent!important;border-radius:0!important;border-image:var(--uo-frame-image,url('/static/uo-v2-frame.webp')) 230 / 12px / 0 round!important;box-shadow:none!important}
/* The helper lives outside #crm: theme-aware painted chrome, no duplicate rules. */
html #emuo-helper .eh-panel{padding:9px;border:1px solid transparent!important;border-radius:0!important;border-image:var(--uo-frame-image,url('/static/uo-v2-frame.webp')) 230 / 16px / 0 round!important;background:var(--uc-panel)!important;box-shadow:0 14px 38px #0006!important}
html #emuo-helper :is(.eh-header,.eh-composer){border:0!important;background:var(--uc-raised)!important;color:var(--uc-ink)!important}
html #emuo-helper .eh-header{min-height:76px;padding:12px 10px;gap:8px}
html #emuo-helper .eh-heading h2{font:600 16px Georgia,serif;color:var(--g1)!important}
html #emuo-helper .eh-emblem{width:46px;height:48px;flex:none;border:0!important;border-radius:0!important;box-shadow:none!important;font-size:0!important;background:url('/static/uo-v2-book.webp') center/contain no-repeat!important}
html #emuo-helper .eh-emblem svg{display:none}
html #emuo-helper :is(.eh-message-body,.eh-loading,.eh-source,.eh-settings-card){border:1px solid transparent!important;border-radius:0!important;border-image:var(--uo-frame-image,url('/static/uo-v2-frame.webp')) 230 / 7px / 0 round!important;background:var(--uc-raised)!important;color:var(--uc-ink)!important;box-shadow:none!important}
html #emuo-helper .eh-message-body{padding:13px!important}
html #emuo-helper .eh-message-user .eh-message-body{background:var(--uc-panel)!important}
html #emuo-helper :is(.eh-suggestion,.eh-send,.eh-retry,.eh-settings-back){border:0!important;border-radius:0!important;box-shadow:none!important;background:var(--uo-button-image,url('/static/uo-forged-button.webp')) center/100% 100% no-repeat!important;color:var(--uc-ink)!important;padding:8px 13px;min-height:34px;text-shadow:0 1px 2px #000}
html #emuo-helper .eh-send{padding:9px;min-width:43px;height:44px}
html #emuo-helper :is(.eh-icon-button,.eh-launcher-close){border:1px solid transparent!important;border-radius:0!important;border-image:var(--uo-frame-image,url('/static/uo-v2-frame.webp')) 230 / 5px / 0 round!important;background:var(--uc-panel)!important;color:var(--uc-ink)!important}
html #emuo-helper .eh-launcher{border:1px solid transparent!important;border-radius:0!important;border-image:var(--uo-frame-image,url('/static/uo-v2-frame.webp')) 230 / 9px / 0 round!important;background:url('/static/uo-v2-book.webp') center/46px 46px no-repeat,var(--uc-panel)!important;box-shadow:0 4px 14px #0004!important}
html #emuo-helper .eh-launcher svg{visibility:hidden}
html #emuo-helper :is(.eh-input-hint,.eh-message-label,.eh-heading p,.eh-source-excerpt){color:var(--uc-muted)!important}
html #emuo-helper textarea{background:var(--uc-panel)!important;color:var(--uc-ink)!important;border-color:var(--uc-line)!important;border-radius:0!important}
html #emuo-helper textarea::placeholder{color:var(--uc-muted)!important}
html #emuo-helper .eh-settings{background:var(--uc-panel)!important;color:var(--uc-ink)!important}
html[data-uo-theme='light'] #emuo-helper :is(.eh-suggestion,.eh-send,.eh-retry,.eh-settings-back){text-shadow:none!important}
/* Northern palette: silver engraving and blue steel instead of brass. */
html[data-uo-theme='northern']{--uo-button-image:url('/static/uo-northern-button-v1.webp')}
html[data-uo-theme='northern'] #crm .ur-platform-action::before,html[data-uo-theme='northern'] #crm .uo-community-cta::before{filter:none!important}
/* Admin controls retain their visibility logic, icons and native click handlers. */
html #crm #wiki-main>#wiki-btns{position:static!important;right:auto!important;top:auto!important;display:flex;flex-wrap:wrap;justify-content:flex-end;gap:7px;margin:0 0 15px;min-width:0}
html #crm #wiki-btns :is(#we-create-btn,#we-edit-btn,#we-del-btn){width:auto!important;height:auto!important;min-height:36px;gap:7px;padding:8px 18px!important;line-height:1.3!important;font-size:12px!important;white-space:nowrap;flex:0 0 auto;max-width:100%}
html #crm #wiki-btns button svg{display:block!important;visibility:visible!important;opacity:1!important;width:16px!important;height:16px!important;flex:0 0 16px;stroke:currentColor}
html #crm #wiki-btns .uo-wiki-action-label{display:inline;color:inherit!important;font-size:12px;line-height:1.3}
html #crm #wiki-btns #we-del-btn{color:#ffc4bc!important}
html[data-uo-theme='light'] #crm #wiki-btns #we-del-btn{color:#872f25!important}
html #crm #wiki-btns #wiki-toggle{flex:0 0 36px;height:36px!important}
html[data-uo-theme='northern'] #crm :is(.uo-finish-button,.w-tab,.an-period){color:#e5eef5!important;text-shadow:0 1px 2px #071423!important}
html[data-uo-theme='northern'] #crm #wiki-btns #we-del-btn{color:#ffc4bc!important}
@media(max-width:600px){html #crm #wiki-main>#wiki-btns{justify-content:flex-start;margin-bottom:12px}html #crm #wiki-btns :is(#we-create-btn,#we-edit-btn,#we-del-btn){min-height:40px;padding:8px 13px!important}}
/* Nine-slice chrome: retain end-cap proportions at every label width. */
html[data-uo-theme='northern']{--uo-button-image:url('/static/uo-northern-button-v2.webp')}
html[data-uo-theme='northern'] #crm :is(.uo-finish-button,.fb,.an-period,.w-tab,.uo-market-actions button,.ur-platform-action,.uo-community-cta),html[data-uo-theme='northern'] #emuo-helper :is(.eh-suggestion,.eh-send,.eh-retry,.eh-settings-back){background:none!important;border:1px solid transparent!important;border-image:url('/static/uo-northern-button-v2.webp') 35 110 fill / 7px 22px / 0 stretch!important;min-height:38px;padding:8px 24px!important;line-height:20px!important;font-family:'Segoe UI',Arial,sans-serif!important;font-weight:400!important;text-shadow:none!important;text-decoration:none!important;color:#e5eef5!important;box-sizing:border-box}
html[data-uo-theme='northern'] #crm .ur-platform-action::before,html[data-uo-theme='northern'] #crm .uo-community-cta::before{content:none!important}
html[data-uo-theme='northern'] #crm #tab-connect .ur-platform-action{align-self:flex-start;width:auto!important;max-width:100%;min-width:200px;min-height:44px;display:inline-flex!important;align-items:center;justify-content:center;gap:8px;padding:10px 30px!important;flex:none}
html[data-uo-theme='northern'] #crm #wiki-btns :is(#we-create-btn,#we-edit-btn,#we-del-btn){padding:9px 24px!important;min-height:40px;align-items:center;justify-content:center;font-weight:400!important;line-height:20px!important}
html[data-uo-theme='northern'] #crm #wiki-btns .uo-wiki-action-label{font-weight:400!important;line-height:20px!important}
html[data-uo-theme='northern'] #crm #wiki-btns #we-del-btn{color:#ffc4bc!important}
html[data-uo-theme='northern'] #crm #wiki-art-content button.uo-finish-button{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle}
html[data-uo-theme='northern'] #emuo-helper .eh-send{padding:9px!important;border-image-width:7px 12px!important}
@media(max-width:600px){html[data-uo-theme='northern'] #crm #tab-connect .ur-platform-action{min-width:0;align-self:stretch}}
html[data-uo-theme='northern'] #crm #wiki-art-content button.uo-finish-button[style*='font-weight:700']{color:#fff!important;box-shadow:inset 0 0 12px #9dc6df40;filter:brightness(1.15)}
/* World section tabs: keep artwork and captions inside the carved end caps. */
html #crm #tab-world .uo-economy-tabs{gap:10px!important;align-items:stretch}
html #crm #tab-world .uo-economy-tabs .w-tab{display:inline-flex!important;align-items:center;justify-content:center;gap:9px!important;min-height:46px;padding:10px 28px!important;line-height:20px!important;font-weight:400!important;box-sizing:border-box;text-shadow:none!important}
html #crm #tab-world .uo-economy-tabs .w-tab .uo-commerce-art{--uo-icon-size:24px;flex:0 0 24px;margin:0}
html[data-uo-theme='northern'] #crm #tab-world .uo-economy-tabs .w-tab{background:none!important;border:1px solid transparent!important;border-image:url('/static/uo-northern-button-v2.webp') 35 110 fill / 7px 22px / 0 stretch!important}
html #crm #tab-world .uo-economy-tabs .w-tab[aria-pressed='true']{color:var(--g1)!important;text-decoration:underline!important;text-underline-offset:4px}
@media(max-width:600px){html #crm #tab-world .uo-economy-tabs{gap:8px!important}html #crm #tab-world .uo-economy-tabs .w-tab{padding:10px 22px!important;gap:6px!important;line-height:17px!important;white-space:normal;min-width:0}html #crm #tab-world .uo-economy-tabs .w-tab .uo-commerce-art{--uo-icon-size:20px;flex-basis:20px}}
/* News begin directly under the quick links. */
html #crm #tab-news .uo-chronicle-feed>.uo-section-heading{display:none!important}
/* Softer daylight surfaces, with original artwork and readable ink retained. */
html[data-uo-theme='light']{--bg:#d4d9d6;--card:#e3e1d7;--uc-panel:#e3e1d7;--uc-raised:#d2d9d6;--uc-wash:#dce0d9f5}
html[data-uo-theme='light'] #crm .content{background:linear-gradient(#dce1dcfa,#d2dad9fc)!important}
html[data-uo-theme='light'] #crm :is(.sidebar,#top-bar){background-image:linear-gradient(#d9dfdfef,#c8d1d4f2),url('/static/uo-v2-leather.webp')!important}
html[data-uo-theme='light'] #crm :is(#wiki-nav,.wiki-mob-panel){background:#dce1dc!important}
html[data-uo-theme='light'] #crm :is(.card,.scard,.set-card,.hn-card,.hn-feature,.uo-side-panel,.uo-side-guide){background-image:linear-gradient(#e6e3d8f5,#d8ded8f5),url('/static/uo-v2-leather.webp')!important}
html[data-uo-theme='light'] #crm :is(.fi,.linput,.sb-q input,.uo-theme-control select,#craft-bar input,#craft-bar select){background:#e8e7de!important}
html[data-uo-theme='light'] #crm :is(.sb-bottom,.uo-theme-control){background:#cfd8d9!important}
html[data-uo-theme='light'] #crm .ur-realm{--ur-panel:#dce0d9;--ur-panel-top:#d0d8d5;--ur-surface:linear-gradient(#e1e1d7f5,#d3dcd7f5),url('/static/uo-v2-leather.webp')}
html[data-uo-theme='light'] #crm #tab-forum{--ff-panel:#e3e1d7;--ff-panel-raised:#d2d9d6}
html[data-uo-theme='light'] #crm #tab-forum :is(.forum-cat,.forum-thread,.forum-post,#forum-editor,#forum-admin-cats,#forum-admin-bans){background-image:linear-gradient(#e6e3d8f5,#d8ded8f5),url('/static/uo-v2-leather.webp')!important}
html[data-uo-theme='light'] .uo-item-popover{background:#e8e5db!important}
/* Download controls keep a useful size in every theme. */
html #crm #tab-connect .ur-platform-action{align-self:flex-start;width:auto!important;max-width:100%;min-width:200px;min-height:44px;display:inline-flex!important;align-items:center;justify-content:center;gap:8px;padding:10px 30px!important;flex:none;font-weight:400!important;line-height:20px!important;text-shadow:none!important}
html[data-uo-theme='night'] #crm #tab-connect .ur-platform-action::before{content:''!important;inset:0;border:1px solid transparent;border-image:url('/static/uo-northern-button-v2.webp') 35 110 fill / 7px 22px / 0 stretch;background:none!important;filter:grayscale(1) brightness(.65)!important}
@media(max-width:600px){html #crm #tab-connect .ur-platform-action{min-width:0;align-self:stretch}}
/* A separate moonlit landscape for the night-theme home banner. */
html[data-uo-theme='night'] #crm .uo-chronicle-hero{background-image:linear-gradient(90deg,#03040555,transparent 70%),url('/static/uo-night-hero-v1.webp')!important;background-size:cover!important;background-position:center 28%!important}
@media(max-width:600px){html[data-uo-theme='night'] #crm .uo-chronicle-hero{background-image:linear-gradient(90deg,#030405c4,#03040545),url('/static/uo-night-hero-v1.webp')!important;background-position:77% center!important}}
/* Readable community links and crafting annotations in the softer daylight palette. */
html[data-uo-theme='light'] #crm :is(#tab-news,#tab-connect) a[href^='https://t.me/']{color:#16516b!important;border-color:#7097a5!important}
html[data-uo-theme='light'] #crm :is(#tab-news,#tab-connect) a[href*='discord.gg']{color:#41417c!important;border-color:#8988ac!important}
html[data-uo-theme='light'] #crm :is(#tab-news,#tab-connect) a[onclick*="switchTab('community')"]{color:#405562!important}
html[data-uo-theme='light'] #crm #wiki-art-content [data-craft-item]>div:nth-child(2){color:#46545e!important;font-size:.78rem!important;line-height:1.45!important}
html[data-uo-theme='light'] #crm #wiki-art-content [data-craft-item] [style*='#93a3b8']{color:#465967!important}
html[data-uo-theme='light'] #crm #wiki-art-content [data-craft-item] [style*='#3498db']{color:#175777!important}
html[data-uo-theme='light'] #crm #wiki-art-content [data-craft-item] [style*='#48bb78']{color:#286443!important}
/* More compact navigation with stable colors and a small physical hover lift. */
html #crm .sidebar:not(.mini) .sb-nav .sb-item{min-height:94px;padding:8px 7px 9px;transition:transform .16s ease,filter .16s ease!important}
html #crm .sidebar:not(.mini) .sb-nav .sb-item .ic{flex-basis:63px;width:63px;height:63px}
html #crm .uo-portal-nav [data-portal-tab]::before{width:22.5px;height:22.5px}
html #crm .uo-portal-nav button{transition:transform .16s ease,filter .16s ease!important}
html #crm .sidebar .sb-nav .sb-item:not(.active),html #crm .sidebar .sb-nav .sb-item:not(.active):hover{background:transparent!important;color:var(--text)!important}
html #crm .sidebar .sb-nav .sb-item.active,html #crm .sidebar .sb-nav .sb-item.active:hover{background:var(--uc-raised)!important;color:var(--g1)!important}
html #crm .uo-portal-nav button:not(.is-active),html #crm .uo-portal-nav button:not(.is-active):hover{background:transparent!important;color:var(--text)!important}
html #crm .uo-portal-nav button.is-active,html #crm .uo-portal-nav button.is-active:hover{background:#b59b481a!important;color:var(--g1)!important}
@media(hover:hover) and (pointer:fine){html #crm :is(.sidebar .sb-nav .sb-item,.uo-portal-nav button):hover{transform:translateY(-1px) scale(1.025);filter:drop-shadow(0 3px 3px #0005)}html #crm :is(.sidebar .sb-nav .sb-item,.uo-portal-nav button):active{transform:translateY(0) scale(.99)}}
@media(min-width:601px) and (max-width:800px){html #crm:not(.dock-top) .sidebar:not(.mini) .sb-nav .sb-item .ic{flex-basis:39.6px;width:39.6px;height:39.6px}}
@media(max-width:600px){
 html #crm .sidebar:not(.mini) .sb-nav .sb-gb{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:5px}
 html #crm .sidebar:not(.mini) .sb-nav .sb-grp.open>.sb-gb{display:grid!important}
 html #crm .sidebar:not(.mini) .sb-nav .sb-item{min-width:0;min-height:48px;height:48px;margin:0;padding:8px;gap:0}
 html #crm .sidebar:not(.mini) .sb-nav .sb-item .ic{flex:0 0 28px;width:28px;height:28px;filter:grayscale(1)!important}
 html #crm .sidebar:not(.mini) .sb-nav .sb-item>span:not(.ic):not(.chat-unread-badge){position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%);white-space:nowrap!important}
 html #crm .uo-portal-nav button[data-portal-tab]{font-size:0!important;min-width:44px;min-height:44px;padding:8px 10px!important;line-height:1!important;flex:1 0 44px}
 html #crm .uo-portal-nav button[data-portal-tab]::before{width:22px;height:22px;margin:0!important;filter:grayscale(1)}
 html #crm .sidebar:not(.mini) .sb-nav .chat-unread-badge{right:3px;top:2px}
}
@media(prefers-reduced-motion:reduce){html #crm :is(.sidebar .sb-nav .sb-item,.uo-portal-nav button){transition:none!important}html #crm :is(.sidebar .sb-nav .sb-item,.uo-portal-nav button):hover{transform:none!important}}
/* Mobile groups stay on one line, with readable captions below each icon. */
@media(max-width:600px){
 html #crm .sidebar:not(.mini) .sb-nav .sb-grp.open>.sb-gb{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;gap:4px;padding:5px 6px 9px;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;scroll-snap-type:x proximity}
 html #crm .sidebar:not(.mini) .sb-nav .sb-item{flex:0 0 66px!important;width:66px;min-height:70px;height:auto;margin:0;padding:7px 3px!important;gap:5px;justify-content:flex-start;scroll-snap-align:start}
 html #crm .sidebar:not(.mini) .sb-nav .sb-item>span:not(.ic):not(.chat-unread-badge){position:static!important;width:100%!important;height:auto!important;padding:0!important;margin:0!important;overflow:visible!important;clip-path:none!important;white-space:normal!important;font:400 9px/1.2 'Segoe UI',Arial,sans-serif!important;letter-spacing:0!important;text-transform:none!important;overflow-wrap:anywhere;text-align:center}
}
/* Mobile sidebar: one item per row, icon above its caption. */
@media(max-width:600px){
 html #crm .sidebar:not(.mini) .sb-nav .sb-grp.open>.sb-gb{display:flex!important;flex-direction:column!important;flex-wrap:nowrap!important;gap:2px;padding:4px 6px;overflow-x:hidden;overflow-y:visible;scroll-snap-type:none}
 html #crm .sidebar:not(.mini) .sb-nav .sb-item{flex:0 0 auto!important;width:100%!important;min-height:62px;height:auto;padding:7px 5px!important;gap:4px;align-items:center;justify-content:center;scroll-snap-align:none}
 html #crm .sidebar:not(.mini) .sb-nav .sb-item>span:not(.ic):not(.chat-unread-badge){font-size:10px!important;white-space:nowrap!important;overflow-wrap:normal}
}

/* Generated restrained button frames; independent native-scale grain prevents width blur. */
html[data-uo-theme='northern'] body #crm :is(.uo-finish-button,.fb,.an-period,.w-tab,.uo-market-actions button,#tab-connect .ur-platform-action,#tab-community .uo-community-cta),html[data-uo-theme='northern'] body #emuo-helper :is(.eh-suggestion,.eh-send,.eh-retry,.eh-settings-back){background:url('/static/uo-button-northern-grain-v3.webp') left top/128px 30px repeat!important;border:1px solid transparent!important;border-image:url('/static/uo-button-northern-frame-v3.webp') 14 24 / 7px 12px / 0 round!important;border-radius:0!important;background-clip:padding-box!important;box-shadow:none!important;filter:none!important;color:#e4edf2!important;text-shadow:0 1px 1px #141719!important;padding:7px 17px!important;min-height:38px;box-sizing:border-box}
html[data-uo-theme='northern'] body #crm :is(.ur-platform-action,.uo-community-cta)::before{content:none!important;background:none!important;border-image:none!important}
html[data-uo-theme='northern'] body #emuo-helper .eh-suggestion{padding:6px 13px!important;line-height:20px!important}
html[data-uo-theme='northern'] body #crm #tab-world .uo-economy-tabs .w-tab{border-image-source:url('/static/uo-button-northern-frame-v3.webp')!important;border-image-slice:14 24!important;border-image-width:7px 12px!important;background:url('/static/uo-button-northern-grain-v3.webp') left top/128px 30px repeat!important}
html[data-uo-theme='night'] body #crm :is(.uo-finish-button,.fb,.an-period,.w-tab,.uo-market-actions button,#tab-connect .ur-platform-action,#tab-community .uo-community-cta),html[data-uo-theme='night'] body #emuo-helper :is(.eh-suggestion,.eh-send,.eh-retry,.eh-settings-back){background:url('/static/uo-button-night-grain-v3.webp') left top/128px 30px repeat!important;border:1px solid transparent!important;border-image:url('/static/uo-button-night-frame-v3.webp') 14 24 / 7px 12px / 0 round!important;border-radius:0!important;background-clip:padding-box!important;box-shadow:none!important;filter:none!important;color:#e8d7b5!important;text-shadow:0 1px 1px #141719!important;padding:7px 17px!important;min-height:38px;box-sizing:border-box}
html[data-uo-theme='night'] body #crm :is(.ur-platform-action,.uo-community-cta)::before{content:none!important;background:none!important;border-image:none!important}
html[data-uo-theme='night'] body #emuo-helper .eh-suggestion{padding:6px 13px!important;line-height:20px!important}
html[data-uo-theme='night'] body #crm #tab-world .uo-economy-tabs .w-tab{border-image-source:url('/static/uo-button-night-frame-v3.webp')!important;border-image-slice:14 24!important;border-image-width:7px 12px!important;background:url('/static/uo-button-night-grain-v3.webp') left top/128px 30px repeat!important}

/* Icon-only send action must not inherit the wide text-button insets. */
html[data-uo-theme] body #emuo-helper button.eh-send{
 display:flex!important;align-items:center!important;justify-content:center!important;
 width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;
 flex:0 0 44px!important;padding:0!important;line-height:1!important;
}
html[data-uo-theme] body #emuo-helper button.eh-send svg{
 display:block!important;width:20px!important;height:20px!important;
 min-width:20px!important;flex:0 0 20px!important;margin:0!important;
 transform:none!important;fill:none!important;stroke:currentColor!important;
 stroke-width:1.8!important;stroke-linecap:round;stroke-linejoin:round;
}
