/* ============================================================
   The Keep (hub) — dark parchment, UO-style gumps
   ============================================================ */
#hub {
  position: fixed; inset: 0; z-index: 20; overflow: auto;
  font-family: var(--f-text); color: #e3d6b8;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(255,150,60,0.16), transparent 60%),
    radial-gradient(ellipse at 50% 120%, rgba(90,40,140,0.18), transparent 60%),
    #0d0a08;
}
#hub header {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 24px;
  padding: 10px 24px; background: linear-gradient(#1d1610, #140f0b);
  border-bottom: 2px solid #5a4428; box-shadow: 0 4px 18px rgba(0,0,0,0.6);
}
#hub .logo {
  font-size: 26px; letter-spacing: 6px; color: #ffcf8a; font-weight: bold;
  text-shadow: 0 0 12px rgba(255,160,60,0.8), 0 0 2px #000;
}
#tabs { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.h-tab {
  font: inherit; font-size: 15px; color: #c9b590; cursor: pointer;
  background: #241b12; border: 1px solid #5a4428; border-bottom: none; padding: 7px 16px;
  border-radius: 6px 6px 0 0;
}
.h-tab:hover { color: #ffe6b0; background: #2e2216; }
.h-tab.active { color: #ffdf9e; background: #3a2a18; box-shadow: inset 0 -2px 0 #ffb25a; }
#wallet { display: flex; gap: 16px; font-size: 14px; white-space: nowrap; }
.w-item b { color: #ffdf9e; }
.w-ember b { color: #ff8a4a; }
.h-gold { color: #ffd76a; }

#hubmain { padding: 18px 24px 40px; max-width: 1500px; margin: 0 auto; }
#hub h2 { font-size: 17px; color: #ffcf8a; margin: 0 0 10px; letter-spacing: 1px; border-bottom: 1px solid #4a3822; padding-bottom: 4px; }
#hub h2:not(:first-child) { margin-top: 18px; }
#hub h3 { font-size: 15px; color: #f0d9a8; margin: 12px 0 6px; }
#hub p { line-height: 1.45; margin: 6px 0; font-size: 14px; }
#hub ul { margin: 4px 0 8px 18px; padding: 0; font-size: 14px; }
.h-cols { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.h-cols > section { padding: 14px 16px; }
.h-wide { flex: 2 1 560px; }
.h-side { flex: 1 1 320px; }
.h-bad { color: #ff7a6a; }
.h-good { color: #8fe08a; }
.h-note { margin-top: 10px; padding: 8px 10px; border-left: 3px solid #ffb25a; background: rgba(255,178,90,0.07); font-size: 13px; }
.h-note.warn { border-color: #ff6a5a; background: rgba(255,90,70,0.08); }
.h-btnrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }

/* tables */
.h-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.h-table td, .h-table th { padding: 5px 6px; border-bottom: 1px solid #2e2418; text-align: left; vertical-align: middle; }
.h-table th { color: #b8a27a; font-weight: normal; }

/* character */
.h-doll { flex: 0 0 auto; }
.h-dollgrid { display: flex; gap: 10px; align-items: center; }
#h-paperdoll { width: 280px; height: 440px; background: radial-gradient(ellipse at 50% 60%, #2a1f14, #120d09); border: 1px solid #4a3822; border-radius: 6px; }
.h-slotcol { display: flex; flex-direction: column; gap: 8px; }
.h-slot { width: 64px; cursor: pointer; text-align: center; }
.h-slot-label { font-size: 11px; color: #9c8a68; margin-bottom: 2px; }
.h-slot-empty { width: 52px; height: 52px; margin: 0 auto; border: 1px dashed #4a3822; border-radius: 4px; line-height: 52px; color: #4a3822; }
.h-statbox { flex: 0 1 260px; }
.h-stats { width: 100%; font-size: 13px; border-collapse: collapse; }
.h-stats td { padding: 3px 4px; border-bottom: 1px solid #2a2016; }
.h-stats td:last-child { text-align: right; color: #f3e2bc; }
.h-stash { flex: 1 1 380px; }
.h-grid { display: flex; flex-wrap: wrap; gap: 6px; max-height: 340px; overflow: auto; padding: 2px; }
.h-cw { cursor: pointer; border-radius: 6px; outline: 2px solid transparent; transition: outline-color .1s; }
.h-cw:hover { outline-color: #6a5232; }
.h-cw.h-multi { outline: 2px solid #7fd0ff; outline-offset: -1px; box-shadow: 0 0 10px rgba(127,208,255,.45); position: relative; }
.h-cw.h-multi::after { content: '✔'; position: absolute; top: 1px; right: 3px; color: #7fd0ff; font-size: 12px; text-shadow: 0 0 3px #000; }
.h-multibox h3 { margin: 0 0 6px; }
.h-quicksel { margin-top: 8px; font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.h-tierpick { background: #15100b; border: 1px solid var(--c); color: var(--c); border-radius: 10px; padding: 1px 8px; font: 12px var(--f-text); cursor: pointer; }
.h-hint { font-size: 12px; margin-top: 6px; }
.h-cw.h-sel { outline-color: #ffd76a; box-shadow: 0 0 10px rgba(255,215,106,0.5); }
.h-cw.h-dim { opacity: 0.35; }
.h-detail { margin-top: 12px; padding: 10px 12px; font-size: 13px; }
.h-cmp { margin-top: 6px; }

/* forge */
.h-essrow { display: flex; gap: 8px; flex-wrap: wrap; }
.h-ess { border: 1px solid; border-radius: 6px; padding: 6px 12px; text-align: center; min-width: 70px; background: #17110c; font-size: 13px; }
.h-ess b { font-size: 18px; color: #fff0d0; }
.h-combineinfo { margin-top: 10px; font-size: 14px; line-height: 1.5; }
.h-job { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #2e2418; font-size: 14px; }
.timer { font-variant-numeric: tabular-nums; color: #ffd76a; }

/* skills */
.h-skills td { padding: 7px 6px; }
.h-skname { white-space: nowrap; color: #f0d9a8; }
.h-skval { width: 48px; text-align: right; font-variant-numeric: tabular-nums; color: #fff0d0; }
.h-skbar { width: 160px; }
.h-bar { height: 8px; background: #1a130d; border: 1px solid #3a2c1c; border-radius: 4px; overflow: hidden; margin-top: 4px; }
.h-bar > div { height: 100%; background: linear-gradient(90deg, #8a5a2a, #ffb25a); }
.h-bar.daily > div { background: linear-gradient(90deg, #2a5a8a, #6ab8ff); }
.h-lock { width: 32px; padding: 3px 0 !important; font-size: 13px; }
.h-lock-up { color: #8fe08a !important; }
.h-lock-down { color: #ff7a6a !important; }
.h-lock-locked { color: #b8a27a !important; }
.h-caps { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 14px; font-size: 14px; }

/* keep */
.h-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.h-card { background: #17110c; border: 1px solid #4a3822; border-radius: 6px; padding: 10px 12px; font-size: 13px; display: flex; flex-direction: column; gap: 5px; }
.h-card h3 { margin: 0 0 4px !important; display: flex; justify-content: space-between; }
.h-card .btn { align-self: flex-start; margin-top: 6px; }
.h-lvl { color: #ffd76a; font-size: 13px; }
.h-next { color: #e8d6ae; }
.h-building { color: #ffd76a; margin-top: 4px; }
.h-hall { background: #17110c; border: 1px solid #3a2c1c; border-radius: 6px; padding: 10px; font-size: 14px; min-height: 60px; line-height: 1.6; }
.h-pet { margin-top: 6px; font-style: italic; }

/* reliquary */
.h-rel { text-align: center; font-size: 14px; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.h-rel .h-btnrow { justify-content: center; }
.h-chest { font-size: 64px; color: #ffb25a; text-shadow: 0 0 22px rgba(255,160,60,0.7); line-height: 1; }
.h-pity { color: #ff9d2e; }
.h-store { background: #17110c; border: 1px dashed #5a4428; border-radius: 6px; padding: 10px; font-size: 13px; }
.h-store .btn { margin-top: 8px; }
.h-cosgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.h-cos { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: #17110c; border: 1px solid; border-radius: 6px; font-size: 13px; position: relative; }
.h-cos.owned { cursor: pointer; }
.h-cos.owned:hover { background: #241a10; }
.h-cos.locked { opacity: 0.35; filter: grayscale(0.7); }
.h-cos.on { background: #2c2012; box-shadow: inset 0 0 0 1px #ffd76a; }
.h-eq { position: absolute; right: 8px; color: #ffd76a; }
.h-swatch { width: 16px; height: 16px; border-radius: 50%; flex: 0 0 auto; display: inline-block; }
.h-swatch.big { width: 54px; height: 54px; margin: 14px auto; display: block; }
.h-reveal { text-align: center; min-width: 260px; }
.h-reveal .item-cell { margin: 10px auto; }
.h-revealname { font-size: 22px; letter-spacing: 2px; margin-top: 6px; text-shadow: 0 0 10px currentColor; }

/* deploy */
.h-lobbies { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.h-lobby { background: #17110c; border: 1px solid #4a3822; border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.h-lobby h3 { margin: 0 !important; font-size: 20px !important; letter-spacing: 2px; }
.h-lobby-shallows { border-top: 3px solid #5fcf6a; }
.h-lobby-depths { border-top: 3px solid #c06bff; }
.h-lobby-abyss { border-top: 3px solid #ff9d2e; background: linear-gradient(#1f120a, #17110c); }
.h-cap { color: #e8d6ae; }
.h-keys { color: #ff9d2e; }
.h-enter { margin-top: auto; padding: 10px !important; font-size: 15px !important; }
.h-enter-online { margin-top: 6px; padding: 8px !important; font-size: 14px !important; border-color: #5aa8c8 !important; color: #bfe8ff !important; }

/* gear abilities on the Character tab */
.h-abh { margin-top: 14px; }
.h-ab { border-left: 3px solid var(--ab); padding: 3px 0 3px 8px; margin-bottom: 7px; font-size: 13px; }
.h-ab b { color: #fff; margin-right: 4px; }
.h-ab .h-absrc { font-size: 11.5px; }
.h-bodysel { display: flex; gap: 6px; margin: -4px 0 8px; }
.h-bodysel .btn { padding: 3px 12px; font-size: 12.5px; }

.h-stashval { font-size: 13px; color: #c8a860; font-weight: normal; }

/* drag and drop between stash and paperdoll */
#hubmain [data-hdrag] { cursor: grab; }
.h-slot.h-slothint { outline: 2px dashed #7fd0ff; outline-offset: 1px; }
.h-stash.h-slothint .h-grid { outline: 2px dashed #7fd0ff; outline-offset: 2px; }
.h-slot.h-dropok, .h-dollgrid.h-dropok { box-shadow: 0 0 14px rgba(127, 208, 255, .7); }
.h-stash.h-dropok .h-grid { box-shadow: inset 0 0 14px rgba(127, 208, 255, .5); }

.h-tiersell { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 2px 0 8px; font-size: 12.5px; }
.h-tiersell .h-tierpick:hover { background: #241a10; }
.h-tsn { color: #a89878; font-size: 11px; }

/* upgrade / downgrade badges on stash items */
.h-cw { position: relative; }
.h-cmpb { position: absolute; left: 2px; bottom: 1px; font-size: 11px; line-height: 1; text-shadow: 0 0 3px #000, 0 0 2px #000; pointer-events: none; }
.h-cmpb.cmp-up, .h-cmpb.cmp-new { color: #6fe08a; }
.h-cmpb.cmp-down { color: #ff6a5a; }
.h-cmpb.cmp-side { color: #c8b88a; }
.h-detail .cmp { margin: 8px 0 4px; padding: 6px 8px; background: rgba(0,0,0,.25); border: 1px solid #3a2c1c; border-radius: 6px; }
.h-detail .cmp { display: inline-block; min-width: 300px; max-width: 460px; }
.h-detail .cmp-rows td { padding-right: 18px; }
.h-cmpb { font-size: 13px; }

/* settings button in the top bar, and the settings menu */
#wallet .w-settings { background: none; border: 1px solid rgba(232,200,140,.25); border-radius: 4px; color: inherit; font: inherit; padding: 1px 8px; cursor: pointer; }
#wallet .w-settings:hover { border-color: rgba(232,200,140,.6); }
.set-row { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
.set-row label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.set-row label[for] { min-width: 110px; }
.set-row input[type=range] { flex: 1; min-width: 200px; accent-color: #e8b04a; cursor: pointer; }
.set-row b { min-width: 42px; text-align: right; font-variant-numeric: tabular-nums; }
.set-row input[type=checkbox] { accent-color: #e8b04a; width: 16px; height: 16px; }
.set-note { font-size: 12px; margin-top: 14px; }

/* sub-tabs inside a Keep tab (the Gambler's hall: Slots, Roulette, Gear & Dice) */
.h-subtabs { display: flex; gap: 6px; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 1px solid rgba(232,200,140,.18); }
.h-subtab { background: rgba(20,14,9,.7); border: 1px solid rgba(232,200,140,.25); border-radius: 5px 5px 0 0; color: #cbb98f; font: 15px var(--f-ui); letter-spacing: .04em; padding: 6px 16px; cursor: pointer; }
.h-subtab:hover { border-color: rgba(232,200,140,.6); color: #f0e0b8; }
.h-subtab.active { background: linear-gradient(#3a2814, #20160c); border-color: #e8b04a; color: #ffe3a0; box-shadow: 0 0 10px rgba(232,176,74,.25); }
