/* UI pass: native UO materials and pixel proportions; legible command hierarchy. */
:root{--adventure-chrome:60px;--reading-gold:#ebd6a6;--reading-muted:#c2b18c;--dock-width:290px}
.adventure-chrome{height:var(--adventure-chrome);display:flex;align-items:center;gap:18px;padding:0 14px 0 9px;color:var(--reading-gold);border-bottom:3px solid transparent;border-image:url('assets/uo/classic-ui/stone-alternate-border.png') 20 fill/3px/0 stretch;background:#100e09;position:relative;z-index:41}
.adventure-home{display:flex;align-items:center;height:56px;flex:none}.adventure-home img{object-fit:contain;width:64px;height:54px;filter:drop-shadow(0 2px 2px #000)}
.adventure-heading{min-width:0;flex:1;display:grid;gap:3px}.adventure-heading>span{color:#ad9872;font-size:12px;letter-spacing:.13em}.adventure-heading>b{font-size:19px;font-weight:normal;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}
.adventure-shortcuts{display:flex;gap:8px;align-items:center}.adventure-shortcuts button,.adventure-help button{min-height:40px;padding:8px 13px;color:#ead9b4;border:1px solid #695b3e;background:linear-gradient(#272217,#15120d);box-shadow:inset 0 0 0 1px #0b0905;cursor:pointer;font-size:16px;white-space:nowrap}.adventure-shortcuts button:hover,.adventure-help button:hover{color:#fff0c5;border-color:#bd9a54;background:#3b3020}.adventure-shortcuts button:first-child{border-color:#b49b5e}.adventure-shortcuts button span{color:#bfa873;font-size:13px}.adventure-shortcuts #chrome-mission-ready{display:inline-grid;place-items:center;width:16px;height:17px;border:1px solid #bea360;background:#493713;color:#ffe2a0}.adventure-shortcuts [hidden]{display:none!important}
#adventure-help-toggle{border:1px solid #7d6c43;background:#1d190f;color:#e4cb91;width:36px;height:36px;font-size:20px;cursor:pointer}
.adventure-help{position:fixed;right:16px;top:68px;width:min(480px,calc(100vw - 24px));z-index:63;padding:25px;color:#221b0f;border:19px solid transparent;border-image:url('assets/uo/classic-ui/stone-floral-border.png') 45 fill/24px/0 stretch;background:#b9b7a2 url('assets/uo/classic-ui/gump-0a2c.png');box-shadow:0 12px 38px #000b}.adventure-help[hidden]{display:none}.adventure-help h2{font-size:25px;margin:0 0 12px}.adventure-help p{font-size:17px;line-height:1.55;margin:0 0 14px}.adventure-help button{white-space:normal;margin:4px 5px 0 0}
.app-body{height:calc(100dvh - var(--adventure-chrome));grid-template-rows:minmax(0,1fr) 48px}.main-column{padding:10px 6px 8px 10px}.world-card canvas{height:calc(100dvh - 355px);min-height:320px}.world-card{border-width:5px;border-image-width:5px}.world-topline .zone-pill{font-size:17px;min-height:32px;padding:5px 8px}.world-bottomline{font-size:13px}.world-bottomline>span{padding:4px 7px}
.character-dock{padding-top:8px}.topbar{bottom:8px}.topbar .resource-chip{font-size:17px}.character-dock .local-save-note{font-size:12px}.character-dock .dock-section-title{font-size:16px}.character-dock .dock-skill{font-size:14px;line-height:1.45}.character-dock .music-controls{margin:7px 0}.character-dock .music-controls summary{font-size:15px}
.side-nav,.side-nav.more-open{height:48px;min-height:48px;padding:4px 6px 6px;gap:5px}.side-nav .nav-item,.side-nav.more-open>.nav-primary,.side-nav.more-open>.nav-more{height:38px;min-height:38px;font-size:16px}.side-nav .secondary-nav{bottom:52px;max-height:calc(100dvh - 125px);width:min(460px,calc(100vw - var(--dock-width) - 24px))}.side-nav .secondary-nav .nav-item{min-height:42px;font-size:18px}.side-nav .secondary-nav .nav-group-label{padding-top:12px;font-size:14px}
.run-panel{padding:12px 13px 10px;border:1px solid #63563b;background:linear-gradient(100deg,#1c1810,#0c0b08);font-size:17px;gap:7px;position:relative}.run-panel-top{gap:8px}.run-panel-top b{color:#ffe5a1}.run-panel .run-meter{width:100%;height:13px;max-width:none}.run-panel .run-meter span{background-size:100% 100%}.run-chips{gap:5px 8px}.run-chip{font-size:15px;padding:5px 10px;min-height:28px}.run-chip.empty{opacity:.65}.run-panel small{font-size:14px;color:#c4b594}.run-details,.run-waiting{font-size:16px;min-height:32px}.run-choice-pending .adventure-shortcuts button:first-child{background:#493815;border-color:#d9b566}.run-choice-pending .run-panel{border-color:#c9a65a}.run-waiting{color:#ffe9a4!important}
.gameplay-tracker{font-size:16px;padding:9px 12px;border-bottom:1px solid #4d432d}.gameplay-tracker-row{min-height:30px;gap:12px}.gameplay-tracker button{font-size:16px;min-height:32px}.gameplay-tracker-row>strong{font-weight:normal}.gameplay-hunt-row{font-size:14px}.battle-feed{font-size:15px!important;line-height:1.45!important;min-height:38px!important;padding:9px!important}.screen-battle .skill-card{height:auto;min-height:40px}.screen-battle .skill-meta strong{font-size:17px}.location-status{font-size:15px;line-height:1.5}.location-services button{font-size:16px;min-height:40px}
.screen-sub{top:78px;max-height:calc(100dvh - 146px);padding:22px 26px!important}.screen-sub .page-heading h1{font-size:29px;line-height:1.25}.screen-sub .sub-heading p{font-size:16px;line-height:1.4}.screen-sub .subscreen-content{font-size:17px;line-height:1.5}.screen-sub .subscreen-card p{font-size:17px;line-height:1.5}.screen-sub :is(button,input,select){font-size:16px}.screen-sub :is(.inline-action,.back-button,.choice-card,.hero-tabs button){min-height:40px}.screen-sub .subscreen-card h2{font-size:24px}.screen-sub :is(.gameplay-note,.gameplay-next,.card-kicker){font-size:14px}.screen-sub .gameplay-reward{padding:13px;gap:12px}.screen-sub .gameplay-reward h3{font-size:21px}.screen-sub .gameplay-reward p{line-height:1.4;font-size:16px}.screen-sub .back-button{flex:none}
.run-offer{max-height:calc(100% - 24px);border-width:24px;padding:12px;box-shadow:0 12px 40px #000b}.run-offer header h2{font-size:28px}.run-offer header p{font-size:16px;line-height:1.4}.run-cards{gap:12px}.run-card{padding:14px 12px;min-height:255px}.run-card h3{font-size:22px}.run-card ul{font-size:17px;line-height:1.45}.run-card-note{font-size:14px;line-height:1.4}.run-card-kind{font-size:13px}.run-pick{min-height:44px;font-size:17px;margin-top:14px}.run-offer footer button{min-height:40px;font-size:16px}
.screen-sub .expansion-grid{color:#ead8b3}.screen-sub .expansion-card,.screen-sub .expansion-current{border-radius:0;border:4px solid transparent;border-image:url('assets/uo/classic-ui/stone-alternate-border.png') 20 fill/4px/0 stretch;background:#211c13;box-shadow:none}.screen-sub .expansion-card h3,.screen-sub .expansion-current h3{color:#f3dfb1}.screen-sub .expansion-card p,.screen-sub .expansion-current p{color:#d6c5a4}.screen-sub .expansion-intro{color:#252116}.screen-sub .expansion-eyebrow{font-size:12px;color:#d3b578}.screen-sub .expansion-card small,.screen-sub .expansion-current small{font-size:14px;color:#c9b68f}.screen-sub .expansion-current input{color:#ead8b3!important;background:#100e09!important}.screen-sub .expansion-card .expansion-button{border-radius:0}.expansion-native-preview{width:200px;height:170px;max-width:100%;align-self:center;image-rendering:pixelated}.screen-sub .expansion-house-scene{background:#110e09;height:280px;border:4px solid transparent;border-image:url('assets/uo/classic-ui/stone-alternate-border.png') 20 fill/4px/0 stretch;box-shadow:none}.expansion-house-scene canvas{max-width:100%;height:auto;max-height:280px;object-fit:contain;image-rendering:pixelated}.screen-sub .expansion-codex-row b{color:#ead8b3}.screen-sub .expansion-codex-row small{font-size:13px}.screen-sub .expansion-codex-row>span{font-size:14px}
.specialization-modal{max-width:570px;padding:26px!important}.specialization-modal>p{font-size:18px;line-height:1.55}.specialization-modal h2{font-size:32px}.specialization-modal .skill-cap-note{font-size:14px;line-height:1.5}.start-adventure-form input{min-height:48px;font-size:20px}.start-adventure-form button{min-height:48px;font-size:19px}.start-adventure-form label{font-size:17px}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid #f1d78e!important;outline-offset:3px!important}.screen-sub :is(button,a,input,select):focus-visible,.adventure-help :is(button,a):focus-visible{outline-color:#403318!important}
@media(min-width:1700px){:root{--dock-width:310px}.adventure-chrome{padding-right:20px}.world-card canvas{height:calc(100dvh - 352px)}}
@media(max-width:1100px){.adventure-heading>b{font-size:17px}.adventure-chrome{gap:10px}.adventure-shortcuts{gap:5px}.adventure-shortcuts button{padding:7px 10px;font-size:15px}.adventure-heading{max-width:220px}.adventure-home{display:none}.screen-sub{left:20px;right:calc(var(--dock-width) + 14px);width:auto}}
@media(max-width:800px){:root{--adventure-chrome:96px}.adventure-chrome{height:96px;flex-wrap:wrap;gap:0;padding:6px 10px 8px}.adventure-heading{flex:1;max-width:none;padding-right:8px}.adventure-heading>span{font-size:10px}.adventure-heading>b{font-size:16px}.adventure-shortcuts{order:3;width:100%;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin-top:5px}.adventure-shortcuts button{min-height:38px;padding:5px 3px;font-size:14px}.adventure-shortcuts button span{font-size:11px}.adventure-help{top:102px}.adventure-help p{font-size:16px}.adventure-heading{order:0}#adventure-help-toggle{order:1;width:32px;height:32px}.world-card canvas{height:calc(100dvh - 400px);min-height:300px}.screen-sub{top:107px;max-height:calc(100dvh - 164px);padding:16px!important}.run-panel-top{font-size:15px}.run-chip{font-size:14px}}
@media(max-width:620px){.app-shell{height:auto;min-height:100dvh}.app-body{height:auto;min-height:calc(100dvh - 96px);display:block}.main-column{padding:5px 5px 8px}.world-card canvas{height:clamp(290px,calc(100dvh - 405px),540px);min-height:290px}.world-topline .zone-pill{font-size:15px}.world-bottomline{font-size:11px}.world-bottomline>span{padding:3px}.run-panel{padding:10px;gap:7px}.run-panel-top>span{font-size:15px}.run-panel-top .run-details{min-height:44px}.run-chips{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.run-chip{white-space:normal;font-size:14px;min-height:31px}.run-panel small{font-size:13px}.run-panel .run-meter{width:100%}.gameplay-tracker{padding:8px;font-size:15px}.gameplay-tracker-row{flex-wrap:wrap;gap:3px}.gameplay-tracker button{min-height:44px;font-size:15px}.gameplay-tracker-row>strong{width:100%}.screen-battle .game-layout>.right-column{grid-template-columns:minmax(0,1fr)}.side-nav,.side-nav.more-open{height:var(--mobile-nav-height);min-height:var(--mobile-nav-height);padding:3px 4px calc(5px + env(safe-area-inset-bottom,0px))}.side-nav .nav-item,.side-nav.more-open>.nav-primary,.side-nav.more-open>.nav-more{min-height:44px;height:44px;font-size:14px}.side-nav .secondary-nav{width:calc(100vw - 12px);right:6px;bottom:calc(var(--mobile-nav-height) + 3px);max-height:calc(100dvh - var(--mobile-nav-height) - 108px)}.side-nav .secondary-nav .nav-item{font-size:17px;min-height:44px}.screen-sub{left:6px;right:6px;width:auto;top:104px;max-height:calc(100dvh - var(--mobile-nav-height) - 111px);border-width:19px;padding:10px!important}.screen-sub .page-heading h1{font-size:25px}.screen-sub .subscreen-content{font-size:16px}.screen-sub :is(.inline-action,.back-button,.hero-tabs button){min-height:44px}.run-offer{top:5px;max-height:calc(100% - 10px);padding:6px;border-width:18px}.run-offer header h2{font-size:24px}.run-offer header p{font-size:15px}.run-card{min-height:0;padding:10px}.run-card h3{font-size:20px}.run-card ul{font-size:16px}.run-card-note{font-size:13px}.run-pick{font-size:16px;margin-top:9px}.character-dock.mobile-open{z-index:65}.toast-region{top:106px;right:10px;width:calc(100vw - 20px);max-width:360px}.adventure-help{z-index:70}.specialization-modal{padding:18px!important}.specialization-modal h2{font-size:29px}.specialization-modal>p{font-size:17px}.specialization-modal .skill-cap-note{font-size:13px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
/* Respect the dynamic world fit and the native phone status gump. */
@media(min-width:621px){.world-card canvas{height:var(--world-available-height,calc(100dvh - 355px))}}
@media(max-width:620px){.character-dock:not(.mobile-open){top:calc(var(--adventure-chrome) + 4px);left:6px}.topbar{height:68px}.world-card canvas{max-height:540px}.screen-sub .expansion-house-scene{height:auto;min-height:320px}}
.screen-sub .expansion-house-scene{height:auto;min-height:340px}.screen-sub .expansion-button{color:#f2dfb6}.screen-sub .expansion-button:disabled{color:#d4bd93;opacity:.6}
/* Portrait tablets retain the original three-row desktop: scene, native gumps, commands. */
@media(min-width:621px) and (max-width:1100px) and (orientation:portrait) and (min-height:860px){
  .app-body{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) 336px 48px}
  .main-column{grid-column:1;grid-row:1}.character-dock{grid-column:1;grid-row:2;height:336px;min-height:0;overflow:hidden}
  .side-nav,.side-nav.more-open{grid-column:1;grid-row:3}
}

/* Inventory: the selected object's action stays above the native container. */
.screen-sub:has(.inventory-selection)>.sub-heading{z-index:6;background:#9b9d91 var(--gump-stone) repeat;--inventory-heading-mask:10px}.screen-sub:has(.inventory-selection)>.sub-heading::before{content:'';position:absolute;left:0;right:0;bottom:100%;height:var(--inventory-heading-mask);background:inherit;pointer-events:none}
@media(max-width:800px){.screen-sub:has(.inventory-selection)>.sub-heading{--inventory-heading-mask:4px}}
@media(max-width:620px){.screen-sub:has(.inventory-selection)>.sub-heading{--inventory-heading-mask:1px}}
.screen-sub .inventory-selection{position:sticky;top:var(--inventory-sticky-top,52px);z-index:4;display:grid;grid-template-columns:minmax(0,1fr);gap:8px;padding:12px;border:2px ridge #746b51;background:#c5c2ab url('assets/uo/classic-ui/gump-0a2c.png');color:#211b10;box-shadow:0 5px 7px #0005}
.inventory-selection-head{display:flex;gap:10px;align-items:center;min-width:0}.inventory-selection-head>img{width:42px;height:42px;object-fit:contain;image-rendering:pixelated;flex:none}.screen-sub .inventory-selection h2{font-size:22px;line-height:1.2;margin:3px 0 0;overflow-wrap:anywhere}.screen-sub .inventory-selection p{font-size:15px;line-height:1.4;color:#332a17;margin:0}.inventory-item-state{font-size:14px;line-height:1.25;display:block;color:#42341d}
.screen-sub .inventory-equip-button{display:block;width:100%;min-height:48px;padding:8px 14px;border:3px ridge #8e7844;background:#ede0b5;color:#21170b;font-size:19px;line-height:1.25;box-shadow:1px 2px 0 #5b5038;cursor:pointer}.screen-sub .inventory-equip-button:hover:not(:disabled){background:#fff0bd;border-color:#ae8a35}.screen-sub .inventory-equip-button:disabled{opacity:1;background:#b8b5a1;color:#494434;border-color:#8f8b75;box-shadow:none;cursor:default}.inventory-state-collection .inventory-item-state{color:#68441b}
.screen-sub .inventory-run-link{min-height:44px;padding:8px 10px;background:#ded2ab;border:2px outset #8f8059;color:#2b2111;font-size:16px;line-height:1.3;cursor:pointer}
.screen-sub .inventory-worn{margin:4px 0}.screen-sub .inventory-worn h3{font-size:18px;line-height:1.3;margin:8px 0}.inventory-worn h3 span{font-size:14px;font-weight:normal;display:block;margin-top:3px}.inventory-worn-items{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(125px,100%),1fr));gap:8px}.screen-sub .inventory-worn-items button{display:flex;align-items:center;text-align:left;gap:9px;padding:7px;min-height:54px;border:1px solid #82785d;background:#b7b69f;color:#211b11;cursor:pointer}.inventory-worn-items img{width:32px;height:38px;object-fit:contain;image-rendering:pixelated;flex:none}.inventory-worn-items span{min-width:0}.inventory-worn-items b,.inventory-worn-items small{display:block;overflow-wrap:anywhere;line-height:1.3}.inventory-worn-items b{font-size:16px}.inventory-worn-items small{font-size:13px;color:#4a432e}
.inventory-compartments{display:flex;gap:8px;margin-top:8px}.screen-sub .inventory-compartments button{flex:1;min-height:48px;padding:8px;border:2px outset #a89b73;background:#bfb99d;color:#2b2313;line-height:1.35;font-size:16px;cursor:pointer}.inventory-compartments b{margin-left:5px}.screen-sub .inventory-compartments [aria-pressed=true],.screen-sub .inventory-worn-items [aria-pressed=true],.screen-sub .inventory-item-row[aria-pressed=true]{background:#e6d8ad;color:#221b0d;border-color:#705e32;box-shadow:inset 0 0 0 1px #f1e7c1}
.screen-sub .inventory-compartment-note{font-size:15px;line-height:1.45;color:#382f1b;margin:0}.inventory-organized .inventory-item-list{display:grid;align-content:start;gap:8px}.screen-sub .inventory-item-row{display:flex;align-items:center;gap:9px;width:100%;min-height:58px;padding:8px;text-align:left;background:#c5bda2;border:2px outset #968761;color:#211b10;cursor:pointer}.inventory-item-row>img{width:34px;height:38px;object-fit:contain;image-rendering:pixelated;flex:none}.inventory-item-row>span:not(.inventory-select-hint){min-width:0;flex:1}.inventory-item-row b,.inventory-item-row small{display:block;line-height:1.3;overflow-wrap:anywhere}.inventory-item-row b{font-size:17px}.inventory-item-row small{font-size:14px;margin-top:4px;color:#4c3d23}.inventory-select-hint{font-size:12px;white-space:nowrap;color:#5a4927}.screen-sub .inventory-empty{color:#3c321f;font-size:16px;line-height:1.5;margin:6px 0}.screen-sub .inventory-comparison{margin-top:4px;padding:14px;border-top:2px ridge #9c9275;color:#2e2719}.inventory-secondary-actions{display:flex;flex-wrap:wrap;gap:8px}.screen-sub .inventory-secondary-actions .inline-action{min-height:44px;margin:0}
.screen-sub:has(.inventory-selection) .inventory-toolbar{gap:8px}.screen-sub:has(.inventory-selection) .inventory-toolbar select{min-height:44px;font-size:15px}.screen-sub:has(.inventory-selection) .upgrade-filter{min-height:44px;display:flex;align-items:center;gap:8px}.screen-sub:has(.inventory-selection) .inventory-toolbar>span{color:#4a3e25}.screen-sub:has(.inventory-selection) .equipment-feedback:empty{display:none}.screen-sub:has(.inventory-selection) .back-button{min-height:44px;min-width:64px}
.inventory-selection button:focus-visible,.inventory-worn-items button:focus-visible,.inventory-compartments button:focus-visible,.inventory-item-row:focus-visible{outline:3px solid #5f4317;outline-offset:2px}
@media(max-width:1000px){.inventory-organized .inventory-item-list{order:-1;flex-basis:100%}.inventory-select-hint{display:none}.screen-sub .inventory-selection{padding:10px;gap:7px}.screen-sub .inventory-selection h2{font-size:20px}}
@media(max-height:650px){.screen-sub .inventory-selection p{font-size:13px}.screen-sub .inventory-selection{gap:5px;padding:8px}.inventory-selection-head>img{width:30px;height:30px}}
