/* Authoritative shared components. Loaded last for every game and account route. */
body.ui-modern-classic[data-ui-theme="modern-classic-v1"]{
 --mc-control-height:42px;--mc-control-radius:6px;--mc-panel-padding:16px;
 --mc-field-bg:#13191d;--mc-field-line:#4b565f;--mc-action-bg:#a82b32;
 --mc-action-line:#c0525b;--mc-secondary-bg:#272f35;--mc-detail-gap:12px;
}

/* Scope covers every native/typed page, auth view and shared page action. */
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.card>h2,.card>h3,.card:not(.native-item-card)>summary,.compact:not(.native-item-card)>summary){
 display:flex!important;align-items:center!important;gap:10px!important;
 min-height:46px!important;margin:0!important;padding:12px var(--mc-panel-padding)!important;
 font:700 14px/1.45 Arial,Helvetica,sans-serif!important;letter-spacing:0!important;
 color:var(--mc-text)!important;background:linear-gradient(#242a2f,#1b2024)!important;
 border:0!important;border-bottom:1px solid var(--mc-line)!important;
 border-left:3px solid var(--mc-red)!important;border-radius:0!important;text-shadow:none!important;
 overflow-wrap:anywhere;
}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.card>h2,.card>h3,.card:not(.native-item-card)>summary)::before{display:none!important}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) .panel-title-icon{display:inline-flex!important;align-items:center;flex:none;margin:0!important;color:var(--mc-muted)}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) .panel-title-icon .mc-icon{width:18px!important;height:18px!important}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) .row-title-wrap{display:flex;align-items:center;gap:10px;min-width:0;flex:1}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) .row-preview{color:var(--mc-muted)!important;font-size:12px!important;font-weight:400;min-width:0;overflow-wrap:anywhere}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) .panel-body{padding:var(--mc-panel-padding)!important;line-height:1.6;min-width:0}

/* Plain detail rows, including finance, world, career and admin screens. */
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.info-list>div,.torn-table>div,.stat-line,.stat){
 display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
 align-items:center!important;gap:var(--mc-detail-gap)!important;min-width:0;
 margin:0!important;padding:11px 0!important;min-height:42px!important;
 border:0!important;border-bottom:1px solid var(--mc-line)!important;
 border-radius:0!important;box-shadow:none!important;background:transparent!important;
 font-size:13px!important;line-height:1.5!important;font-variant-numeric:tabular-nums;
}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.info-list>div,.torn-table>div,.stat-line,.stat)>span{color:var(--mc-muted)!important;min-width:0;overflow-wrap:anywhere}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.info-list>div,.torn-table>div,.stat-line,.stat)>strong{color:var(--mc-text)!important;font-weight:700!important;text-align:right!important;min-width:0;overflow-wrap:anywhere}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.info-list>div,.torn-table>div,.stat-line,.stat):last-child{border-bottom:0!important}

/* Action controls retain their original forms, field names and disabled states. */
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell,.mc-section-hero,.mc-page-actions,.mc-overview-tools) :is(button,.ui-link,.button-link){
 display:inline-flex!important;align-items:center;justify-content:center;gap:7px;
 min-height:var(--mc-control-height)!important;max-width:100%;width:auto!important;
 padding:9px 13px!important;border:1px solid var(--mc-action-line)!important;
 border-radius:var(--mc-control-radius)!important;background:var(--mc-action-bg)!important;
 color:#fff!important;font:700 12px/1.4 Arial,Helvetica,sans-serif!important;
 text-decoration:none!important;text-align:center;white-space:normal;overflow-wrap:anywhere;
 box-sizing:border-box;box-shadow:none!important;cursor:pointer;
}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell,.mc-section-hero,.mc-page-actions,.mc-overview-tools) :is(button[type="button"],.quantity-shortcuts button,.ui-link,.button-link){background:var(--mc-secondary-bg)!important;border-color:var(--mc-field-line)!important;color:#e0e6eb!important}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(button.active,button[aria-pressed="true"]){background:#48272d!important;border-color:#c0525b!important;color:#fff!important}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) form:has(input[name="action"]:is([value$="_cancel"],[value$="_discard"],[value$="_delete"],[value$="_remove"],[value$="_leave"],[value$="_decline"]))>button,
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(button.danger,.danger button){background:#3b2228!important;border-color:#d06b78!important;color:#ffdce3!important}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell,.mc-section-hero,.mc-page-actions,.mc-overview-tools) button:disabled{opacity:.45!important;cursor:not-allowed!important}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell,.mc-section-hero,.mc-page-actions,.mc-overview-tools) :is(button,.ui-link,.button-link):focus-visible{outline:2px solid #ff9298!important;outline-offset:3px}

/* All visible form fields; hidden secure fields and specialised controls stay intact. */
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) form{min-width:0;max-width:100%}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) label{font-size:12px!important;line-height:1.5!important;color:var(--mc-muted)!important;min-width:0}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]):not([type="button"]):not([type="reset"]),select,textarea){
 min-height:44px!important;max-width:100%!important;min-width:0;box-sizing:border-box;
 padding:10px 12px!important;margin-top:6px!important;border:1px solid var(--mc-field-line)!important;
 border-radius:var(--mc-control-radius)!important;background:var(--mc-field-bg)!important;
 color:var(--mc-text)!important;font:400 16px/1.4 Arial,Helvetica,sans-serif!important;box-shadow:none!important;
}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) textarea{min-height:96px!important;resize:vertical;line-height:1.6!important}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) input[type="hidden"]{display:none!important}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(input[type="checkbox"],input[type="radio"]){width:18px!important;min-width:18px!important;height:18px!important;min-height:18px!important;padding:0!important;margin:0 7px 0 0!important;flex:none;accent-color:var(--mc-red)}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) label:has(>input:is([type="checkbox"],[type="radio"])){display:flex!important;align-items:center;gap:7px}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(input,select,textarea):focus-visible{outline:2px solid #ff9298!important;outline-offset:2px}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(input,select,textarea)[aria-invalid="true"]{border-color:#ef91a1!important}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.quantity-shortcuts,.action-row,.appearance-options,.profile-privacy-options){display:flex;gap:8px!important;flex-wrap:wrap;align-items:center}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) .quantity-shortcuts{margin-top:8px}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] .auth-shell form>button{width:100%!important;margin-top:12px}

@media(max-width:520px){body.ui-modern-classic[data-ui-theme="modern-classic-v1"]{--mc-panel-padding:13px;--mc-detail-gap:9px}body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) .card:not(.native-item-card)>summary{flex-wrap:wrap}body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) .row-title-wrap{flex-basis:100%}}
@media(max-width:360px){body.ui-modern-classic[data-ui-theme="modern-classic-v1"]{--mc-panel-padding:12px;--mc-detail-gap:8px}}

/* Shared tabs, item presentation, statuses and finishing states. */
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content,.auth-shell) :is(.mc-section-tabs,.section-tabs,.admin-tabs,.stock-tabs,.stock-range,.notification-filters,.mail-folders,.travel-inventory-controls){display:flex!important;flex-wrap:wrap!important;gap:8px!important;align-items:center;max-width:100%;min-width:0;padding:0!important;margin:0 0 14px!important;border:0!important;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content,.auth-shell) :is(.mc-section-tabs,.section-tabs,.admin-tabs,.stock-tabs,.stock-range,.notification-filters,.mail-folders,.travel-inventory-controls) >:is(a,button){display:inline-flex!important;align-items:center;justify-content:center;gap:6px;min-height:42px!important;padding:9px 13px!important;margin:0!important;border:1px solid #4b565f!important;border-radius:6px!important;background:#272f35!important;color:#dce4ea!important;font:700 12px/1.4 Arial,Helvetica,sans-serif!important;text-decoration:none;max-width:100%;white-space:normal;overflow-wrap:anywhere;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content,.auth-shell) :is(.mc-section-tabs,.section-tabs,.admin-tabs,.stock-tabs,.stock-range,.notification-filters,.mail-folders,.travel-inventory-controls) >:is(a,button):is(.active,[aria-current="page"],[aria-pressed="true"]){background:#3b252b!important;border-color:#b8505c!important;color:#fff!important;box-shadow:inset 0 -2px #ed3e43!important;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.inventory-filter,.market-filter,.honour-filter,.contact-filters,.stock-toolbar,.travel-pack-form){display:flex!important;flex-wrap:wrap!important;align-items:flex-end!important;gap:12px!important;margin:0 0 14px!important;min-width:0;max-width:100%;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.inventory-filter,.market-filter,.honour-filter,.contact-filters,.stock-toolbar,.travel-pack-form) >label{flex:1 1 145px;min-width:0!important;margin:0!important;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.inventory-filter,.market-filter,.honour-filter,.contact-filters,.stock-toolbar,.travel-pack-form) >label:has(>input[type="checkbox"]){flex:0 1 auto;align-self:center;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.inventory-filter,.market-filter,.honour-filter,.contact-filters,.stock-toolbar,.travel-pack-form) >label :is(input:not([type="checkbox"]):not([type="radio"]),select){width:100%!important;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.native-item-card,.market-row,.foreign-market-row,.travel-bag-row,.item-visual-row){border-radius:8px!important;border-color:var(--mc-line)!important;min-width:0;overflow-wrap:anywhere;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.market-row,.foreign-market-row,.travel-bag-row,.item-visual-row){padding:14px!important;margin-bottom:10px!important;background:linear-gradient(120deg,#252d34,#1a2127)!important;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) .native-item-card>summary{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto!important;align-items:center;gap:12px!important;padding:14px!important;min-height:88px;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.native-item-summary,.market-row-main){min-width:0;gap:12px!important;align-items:center;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.native-item-summary-copy,.market-row-copy,.item-visual-meta){min-width:0;overflow-wrap:anywhere;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) .item-art{width:64px!important;height:64px!important;flex:0 0 64px!important;min-width:64px!important;border-radius:8px!important;display:grid;place-items:center;overflow:hidden;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) .item-art img{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.item-depth-strip,.inventory-market-strip,.market-row-actions,.travel-buy-actions){gap:8px!important;flex-wrap:wrap;font-variant-numeric:tabular-nums;min-width:0;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.badge,.game-status-chip,.catalog-chip,.unread-pill,.forum-tag,.stock-status,.notification-new){display:inline-flex;align-items:center;gap:5px;padding:4px 7px!important;border:1px solid #4b5864!important;border-radius:5px!important;background:#29343d!important;color:#dce5ed!important;font:700 11px/1.4 Arial,Helvetica,sans-serif!important;max-width:100%;overflow-wrap:anywhere;vertical-align:middle;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.badge,.game-status-chip,.stock-status):is(.ok,.ready,.completed,.available,.active,.stock-ready){border-color:#628f74!important;background:#243d2e!important;color:#c7efd5!important;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.badge,.game-status-chip):is(.locked,.inactive){background:#282f35!important;border-color:#515c66!important;color:#b5bfc8!important;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.badge,.game-status-chip):is(.warn,.cooldown,.pending){background:#3d3323!important;border-color:#9f8151!important;color:#f3d7a1!important;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.unread-pill,.notification-new,.badge.error,.badge.failed){background:#44262f!important;border-color:#ab6072!important;color:#ffd7e2!important;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.item-depth-strip .upgrade,.travel-set-item.owned>small){color:#acd9bc!important;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.empty-state,.mc-empty-state,.stock-no-purchases,.stock-chart-empty){display:block!important;padding:18px!important;margin:10px 0!important;border:1px dashed #53616c!important;border-radius:8px!important;background:#192228!important;color:#c2ced8!important;text-align:left!important;font:400 13px/1.65 Arial,Helvetica,sans-serif!important;overflow-wrap:anywhere;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.empty-state,.mc-empty-state)::before{display:none!important;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content,.auth-shell) .live-loading{display:flex;align-items:center;gap:10px;padding:12px 14px;margin:0 0 12px;border:1px solid #46545f;border-radius:8px;background:#1b262e;color:#dbe8f0;font-size:13px;line-height:1.5;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content,.auth-shell) .live-loading::before{content:"";width:15px;height:15px;flex:none;border:2px solid #5d6b76;border-top-color:#ed3e43;border-radius:50%;animation:mc-ui-loading .8s linear infinite;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.panel-body p,.asset-description,.section-help,.section-note){font-size:13px!important;line-height:1.65!important;overflow-wrap:anywhere;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) .panel-body>h3{font-size:16px!important;line-height:1.4!important;font-weight:700;letter-spacing:0;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.small,.money-preview,.row-preview){font-size:12px!important;line-height:1.5!important;color:var(--mc-muted)!important;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.eyebrow,.asset-catalog-kicker){font-size:10px!important;line-height:1.4;letter-spacing:.08em!important;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) strong{font-variant-numeric:tabular-nums;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.panel-body,.row-title,.forum-post-body,.message-bbcode,.notification-copy){min-width:0;overflow-wrap:anywhere;}
body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) table{max-width:100%;overflow-x:auto;}
@keyframes mc-ui-loading{to{transform:rotate(360deg)}}
@media(max-width:520px){body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) .native-item-card>summary{grid-template-columns:minmax(0,1fr) auto!important;gap:9px!important;padding:12px!important;}body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) .native-item-summary{grid-column:1/-1;}body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) .item-art{width:52px!important;height:52px!important;min-width:52px!important;flex-basis:52px!important;}body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.market-row,.foreign-market-row,.travel-bag-row,.item-visual-row){padding:12px!important;}body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.inventory-filter,.market-filter,.honour-filter,.contact-filters,.stock-toolbar,.travel-pack-form){gap:9px!important;}body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.market-row-actions,.travel-buy-actions){width:100%;}body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content,.auth-shell) :is(.mc-section-tabs,.section-tabs,.admin-tabs,.stock-tabs,.stock-range,.notification-filters,.mail-folders,.travel-inventory-controls){gap:7px!important;}}
@media(max-width:360px){body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.inventory-filter,.market-filter,.honour-filter,.contact-filters,.stock-toolbar,.travel-pack-form)>label{flex-basis:100%;}body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.market-row,.foreign-market-row,.travel-bag-row){min-width:0;max-width:100%;}body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content .native-page,.auth-shell) :is(.empty-state,.mc-empty-state,.stock-no-purchases,.stock-chart-empty){padding:14px!important;}}
@media(prefers-reduced-motion:reduce){body.ui-modern-classic[data-ui-theme="modern-classic-v1"] :is(.nw-app .game-content,.auth-shell) .live-loading::before{animation:none!important;}}
body.reduce-motion .live-loading::before{animation:none!important;}
