:root {
  --tex-stone: none; --tex-parch: none; --tex-leather: none; --tex-dark: none;
  --ink: #2a1a0c; --gold: #d8b04a; --blue-btn: #2b4fa0;
  --fell: 'IM Fell English', Georgia, serif;
  --fellsc: 'IM Fell English SC', Georgia, serif;
  --med: 'MedievalSharp', Georgia, serif;
  --script: 'Pirata One', 'MedievalSharp', Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #0c0a08; color: #eee; overflow: hidden; font-family: var(--fell); -webkit-tap-highlight-color: transparent; }
button { font-family: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.screen { position: fixed; inset: 0; }

/* ---------- textures ---------- */
.stone {
  background-color: #8d877c; background-image: var(--tex-stone);
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.35), inset -2px -2px 0 rgba(0,0,0,.45), 0 0 0 1px #2a2520, 0 4px 14px rgba(0,0,0,.6);
}
.parch {
  background-color: #d8c496; background-image: var(--tex-parch); color: var(--ink);
  box-shadow: inset 0 0 30px rgba(110,70,20,.45), 0 0 0 2px #6a4a22, 0 0 0 5px #a88a52, 0 0 0 6px #3a2a14, 0 6px 20px rgba(0,0,0,.6);
}
.fell { font-family: var(--fell); font-size: 16px; line-height: 1.35; }

/* ---------- login ---------- */
#login { display: grid; place-items: center; background: radial-gradient(#1c1712, #070605); }
.lframe { position: relative; width: min(980px, 100vw); height: min(720px, 100dvh); padding: 18px; border-radius: 14px; }
.lframe::before { content: ''; position: absolute; inset: 8px; border-radius: 10px; border: 2px solid rgba(40,32,24,.7); box-shadow: inset 0 0 0 2px rgba(216,176,74,.25); pointer-events: none; z-index: 3; }
#scene { width: 100%; height: 100%; display: block; border-radius: 8px; box-shadow: inset 0 0 0 3px #1a1510; background: #2a1a2a; }
.quit { position: absolute; top: 22px; right: 22px; z-index: 4; width: 52px; height: 52px; border-radius: 50%; border: 3px solid #d8b04a; background: radial-gradient(circle at 35% 30%, #d04a3a, #7a1a14); color: #ffe9c0; font-family: var(--med); font-size: 13px; box-shadow: 0 3px 8px rgba(0,0,0,.6); }
.banner { position: absolute; left: 30px; top: 26px; bottom: 26px; width: 120px; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.shield { width: 108px; height: 210px; border-radius: 6px 6px 54px 54px; background: linear-gradient(90deg, #8a1c1c 0 50%, #1d5a2a 50% 100%); border: 4px solid #d8b04a; box-shadow: inset 0 0 0 3px #3a1a0a, 0 4px 10px rgba(0,0,0,.6); display: grid; place-items: center; }
.shield svg { width: 74px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.6)); }
.oval { width: 104px; height: 50px; border-radius: 50%; border: 3px solid var(--gold); color: #fff0c8; font-family: var(--med); font-size: 16px; box-shadow: 0 3px 8px rgba(0,0,0,.6), inset 0 2px 6px rgba(255,255,255,.3); }
.oval.purple { background: radial-gradient(circle at 40% 30%, #8a5ad0, #3a1a6a); }
.crest { width: 86px; height: 92px; border: 3px solid var(--gold); border-radius: 8px 8px 43px 43px; background: radial-gradient(circle at 40% 30%, #d04a3a, #6a1410); color: #fff0c8; font-family: var(--med); font-size: 17px; box-shadow: 0 3px 8px rgba(0,0,0,.6); }
.smallbtns { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.pill { min-width: 84px; padding: 6px 14px; border-radius: 16px; border: 2px solid #5a4a30; background: linear-gradient(#a49c8c, #6e675c); color: #1a120a; font-family: var(--fellsc); font-size: 14px; box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 2px 4px rgba(0,0,0,.5); }
.pill:active { transform: translateY(1px); }
.pill.gold { background: linear-gradient(#ecd086, #b88c34); border-color: #6a4a14; }
.lpanel { position: absolute; z-index: 4; left: 50%; bottom: 62px; transform: translateX(-50%); width: min(440px, calc(100% - 40px)); padding: 16px 22px 16px; border-radius: 8px; display: grid; gap: 8px; }
.ltitle { font-family: var(--fell); font-size: 23px; color: #1e1710; text-align: center; text-shadow: 0 1px 0 rgba(255,255,255,.35); margin-bottom: 2px; }
.lpanel label { display: grid; grid-template-columns: 128px 1fr; align-items: center; font-family: var(--fell); font-size: 19px; color: #1e1710; }
.lpanel input, #uoName { width: 100%; font-family: var(--script); font-size: 22px; color: #8a1010; background: linear-gradient(#ddd6c4, #c4bca8); border: 2px solid #4a4030; border-radius: 3px; padding: 3px 8px; box-shadow: inset 1px 2px 4px rgba(0,0,0,.35); outline: none; }
.lpanel input:focus, #uoName:focus { border-color: #8a1010; }
.lmsg { min-height: 1.1em; text-align: center; color: #7a0a0a; font-family: var(--fell); font-size: 15px; }
.lver { text-align: center; font-size: 12px; color: #2a2016; }
.go { position: absolute; right: -78px; bottom: 4px; width: 58px; height: 58px; border-radius: 50%; border: 3px solid var(--gold); background: radial-gradient(circle at 40% 30%, #6ad06a, #1a6a24); color: #f0ffe0; font-size: 26px; box-shadow: 0 3px 10px rgba(0,0,0,.6); }
.rating { position: absolute; z-index: 4; width: 74px; display: grid; justify-items: center; background: #fff; color: #111; border: 2px solid #111; padding: 2px 0 3px; font-family: Arial, sans-serif; left: auto; right: 30px; bottom: 30px; }
.rating b { font-size: 40px; line-height: 1; } .rating span { font-size: 10px; font-weight: 700; } .rating small { font-size: 5.5px; text-align: center; padding: 0 3px; }
.copy { position: absolute; z-index: 4; bottom: 26px; left: 0; right: 0; text-align: center; font-size: 12px; color: #e8dcc0; text-shadow: 0 1px 2px #000; pointer-events: none; }
.modal { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(0,0,0,.45); padding: 16px; }
.gump.parch { padding: 18px 20px; border-radius: 4px; width: min(420px, 100%); }
.gump.wide { width: min(560px, 100%); }
.gtitle { font-family: var(--fellsc); font-size: 24px; text-align: center; margin-bottom: 6px; color: #3a1a08; }
.shard { text-align: center; font-size: 15px; margin-bottom: 10px; }
.charlist { display: grid; gap: 4px; max-height: min(52vh, 420px); overflow-y: auto; padding: 4px; border: 2px inset rgba(120,80,30,.5); background: rgba(255,240,200,.25); }
.charbtn { display: grid; grid-template-columns: 38px 1fr auto; gap: 10px; align-items: center; text-align: left; padding: 5px 8px; background: none; border: 1px solid transparent; border-radius: 3px; color: var(--ink); font-family: var(--fell); font-size: 18px; }
.charbtn:hover, .charbtn:focus { background: rgba(120,80,30,.18); border-color: rgba(120,80,30,.4); outline: none; }
.charbtn img { width: 38px; height: 38px; object-fit: cover; border-radius: 3px; border: 1px solid #6a4a22; background: #3a2a1a; }
.charbtn small { display: block; font-size: 13px; color: #6a4a2a; }
.charbtn .on { font-size: 12px; color: #1a6a24; }
.charbtn[disabled] { opacity: .75; cursor: default; font-style: italic; }
.charbtn.memorial { color: #4a3a6a; }
.row { display: flex; justify-content: center; gap: 12px; margin-top: 12px; }
#uoName { margin: 8px 0; }

/* ---------- entering ---------- */
#entering { background: #000; display: grid; place-items: center; }
#gateFx { position: absolute; inset: 0; width: 100%; height: 100%; }
.entering-text { position: relative; margin-top: 52vh; font-family: var(--fell); font-size: 22px; color: #e8dcc0; text-shadow: 0 0 8px #48a; }
.bar { position: absolute; bottom: 18vh; width: min(320px, 70vw); height: 8px; border: 1px solid #6a5a3a; background: #111; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #3a8ad0, #9ad0ff); transition: width .2s; }

/* ---------- game ---------- */
#game { background: #000; touch-action: none; }
#view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M2 2 L20 9 L12 12 L9 20 Z' fill='%23d8b04a' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") 2 2, auto; }
#topbar { position: absolute; top: 0; left: 0; right: 0; height: 30px; display: flex; align-items: stretch; z-index: 5; border-radius: 0 0 6px 6px; padding: 0 6px; }
#topbar button { position: relative; background: none; border: 0; border-right: 1px solid rgba(0,0,0,.35); box-shadow: 1px 0 0 rgba(255,255,255,.2); padding: 0 12px; font-family: var(--fellsc); font-size: 15px; color: #1a120a; text-shadow: 0 1px 0 rgba(255,255,255,.35); }
#topbar button:hover { color: #6a0a0a; }
.badge { position: absolute; top: 1px; right: 1px; background: #c81e1e; color: #fff; border-radius: 8px; font: 700 10px/14px Arial, sans-serif; min-width: 14px; padding: 0 3px; text-shadow: none; }
.cnt { margin-left: 4px; font-size: 12px; color: #1a5a1a; }
#statusbar { position: absolute; top: 34px; left: 8px; z-index: 4; display: flex; gap: 10px; font: 700 13px/1.2 Verdana, sans-serif; text-shadow: 1px 1px 0 #000, -1px 0 0 #000, 0 -1px 0 #000; pointer-events: none; }
#sbName { color: #5bd16a; } #sbPlace { color: #e8d080; }
#sbMusic { color: #9ad0ff; pointer-events: auto; cursor: pointer; }
#radar { position: absolute; top: 36px; right: 8px; width: 150px; height: 150px; z-index: 4; border: 3px solid #6e675c; box-shadow: 0 0 0 1px #000, 0 3px 10px rgba(0,0,0,.6); background: #111; cursor: pointer; border-radius: 3px; }
#sysmsg { position: absolute; left: 8px; bottom: 44px; z-index: 4; max-width: min(560px, 70vw); pointer-events: none; font: 700 13px/1.35 Verdana, sans-serif; text-shadow: 1px 1px 0 #000, -1px 0 0 #000, 0 -1px 0 #000, 1px 0 0 #000; }
#sysmsg div { transition: opacity 1.5s; }
#chatform { position: absolute; left: 8px; bottom: 12px; z-index: 6; width: min(560px, calc(100vw - 16px)); }
#chat { width: 100%; background: rgba(0,0,0,.35); border: 1px solid rgba(216,176,74,.35); color: #f0e8c8; font: 700 14px Verdana, sans-serif; padding: 5px 8px; border-radius: 3px; outline: none; text-shadow: 1px 1px 0 #000; }
#chat:focus { border-color: var(--gold); background: rgba(0,0,0,.55); }
#bottombar { display: none; }
#aimFrame { position: fixed; z-index: 11; border: 0; background: #fff; }
#aimFrame.off { left: -9999px; top: 0; width: 360px; height: 600px; visibility: hidden; }

/* gumps */
#gumps { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
.gw { position: absolute; pointer-events: auto; user-select: none; -webkit-user-select: none; }
.gw .gx { position: absolute; top: 4px; right: 6px; width: 22px; height: 22px; border-radius: 50%; border: 1px solid #3a2a14; background: radial-gradient(circle at 35% 30%, #d6c08a, #8a6a34); color: #2a1a0a; font: 700 13px/18px Arial, sans-serif; padding: 0; z-index: 2; }
.gw .gh { cursor: move; touch-action: none; }
.g-parch { padding: 14px 16px 14px; border-radius: 4px; min-width: 240px; }
.g-parch .gh { font-family: var(--fellsc); font-size: 20px; text-align: center; color: #3a1a08; margin: -2px 18px 8px; }
.g-stone { padding: 12px; border-radius: 10px; }
.scroll { max-height: min(56vh, 460px); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.jline { font: 13px/1.35 Verdana, sans-serif; padding: 1px 0; }
.jline .t { color: #7a6040; font-size: 11px; margin-right: 6px; }
.skills .sk { display: grid; grid-template-columns: 1fr auto; padding: 2px 4px; font-size: 17px; border-bottom: 1px dotted rgba(90,60,20,.3); }
.skills .grp { font-family: var(--fellsc); font-size: 17px; color: #6a2a08; margin-top: 6px; }
.skills .tot { text-align: right; font-size: 15px; margin-top: 6px; }

/* paperdoll */
.doll { width: 344px; padding: 0; border-radius: 120px 120px 14px 14px; padding: 18px 14px 12px; }
.doll .arch { position: relative; display: grid; grid-template-columns: 1fr 108px; gap: 8px; }
.doll .pane { position: relative; height: 290px; border-radius: 96px 96px 4px 4px; background: #050404 var(--tex-dark); box-shadow: inset 0 0 0 3px #3a342c, inset 0 0 18px #000; overflow: hidden; }
.doll .pane canvas { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); }
.doll .pane .portrait { position: absolute; left: 8px; bottom: 8px; width: 46px; height: 60px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 0 3px #000); }
.doll .pane .photo { position: absolute; right: 8px; top: 34px; width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2px solid #8a7a5a; box-shadow: 0 0 6px #000; }
.doll .btns { display: flex; flex-direction: column; gap: 5px; justify-content: center; }
.blue { height: 25px; border-radius: 13px; border: 2px solid #c9a848; background: radial-gradient(ellipse at 50% 30%, #6a8ae0, #1e3a8a); color: #f0f4ff; font-family: var(--fellsc); font-size: 13px; letter-spacing: .5px; text-shadow: 0 1px 1px #000; box-shadow: 0 2px 3px rgba(0,0,0,.5); padding: 0 6px; }
.blue:active { transform: translateY(1px); }
.doll .namescroll { margin-top: 8px; padding: 6px 10px; border-radius: 4px; text-align: left; font-size: 16px; }
.doll .namescroll small { display: block; font-size: 13px; color: #5a3a18; }
.doll .medal { position: absolute; left: 50%; top: -12px; transform: translateX(-50%); width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle at 40% 30%, #c8c2b4, #5a564e); border: 2px solid #2a2622; display: grid; place-items: center; font-size: 20px; z-index: 2; }

/* containers */
.pack { padding: 74px 18px 30px; border-radius: 40px 40px 26px 26px; background-color: #6b4626; background-image: var(--tex-leather); box-shadow: inset 0 0 0 3px #3a2410, inset 0 0 30px rgba(0,0,0,.6), 0 6px 18px rgba(0,0,0,.6); }
.pack::before { content: ''; position: absolute; left: 28px; right: 28px; top: 8px; height: 58px; border-radius: 20px 20px 50% 50%; background: inherit; box-shadow: inset 0 -4px 8px rgba(0,0,0,.45), 0 4px 6px rgba(0,0,0,.4); }
.pack .clasp { position: absolute; left: 50%; top: 52px; width: 18px; height: 18px; transform: translateX(-50%) rotate(45deg); border: 3px solid #d8b04a; z-index: 1; }
.pack .cont { border-radius: 10px; background: rgba(20,10,4,.55); box-shadow: inset 0 0 14px #000; }
.packfoot { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font: 700 11px Verdana, sans-serif; color: #f0d890; text-shadow: 1px 1px 0 #000; }
.pouchg { padding: 40px 14px 16px; border-radius: 30px 30px 50% 50% / 30px 30px 40px 40px; background-color: #7a5432; background-image: var(--tex-leather); box-shadow: inset 0 0 0 2px #3a2410, inset 0 0 24px rgba(0,0,0,.55), 0 6px 16px rgba(0,0,0,.6); }
.pouchg::before { content: ''; position: absolute; left: 30%; right: 30%; top: 14px; height: 8px; border-radius: 4px; background: #3a2410; box-shadow: 0 0 0 2px #d8b04a; }
.pouchg .cont { border-radius: 10px 10px 40px 40px; background: rgba(20,10,4,.5); box-shadow: inset 0 0 12px #000; }
.bankbox { padding: 36px 14px 14px; border-radius: 8px; background: linear-gradient(#b4b0a8, #6e6a62); box-shadow: inset 0 0 0 3px #3a3630, inset 0 2px 0 rgba(255,255,255,.5), 0 6px 18px rgba(0,0,0,.6); }
.bankbox::after { content: ''; position: absolute; inset: 6px; border-radius: 5px; pointer-events: none; background: radial-gradient(circle at 10px 10px, #e8e4da 2px, transparent 3px) 0 0 / 50% 50%; opacity: .6; }
.bankbox .cont { border-radius: 4px; background: radial-gradient(ellipse at 50% 30%, #8a1c24, #3a060c); box-shadow: inset 0 0 18px #000, 0 0 0 2px #2a2622; }
.ctitle { position: absolute; top: 9px; left: 0; right: 0; text-align: center; font-family: var(--fellsc); font-size: 17px; color: #1e1a14; text-shadow: 0 1px 0 rgba(255,255,255,.5); }
.cont { position: relative; touch-action: none; }
.it { position: absolute; width: 44px; height: 44px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.it img { width: 44px; height: 44px; display: block; pointer-events: none; -webkit-user-drag: none; }
.it:hover { filter: drop-shadow(0 0 4px rgba(255,240,180,.9)); }
.it .amt { position: absolute; right: -2px; bottom: -2px; font: 700 10px Verdana, sans-serif; color: #ffe680; text-shadow: 1px 1px 0 #000, -1px 0 0 #000; pointer-events: none; }
.it.ghost { position: fixed; z-index: 1000; pointer-events: none; opacity: .9; }
.jamicon { position: relative; width: 44px; height: 44px; pointer-events: none; }
.jamicon img, .jamicon .noart { position: absolute; left: 2px; top: 4px; width: 34px; height: 34px; object-fit: cover; border: 1px solid #1a120a; box-shadow: 1px 1px 0 rgba(255,255,255,.2), 0 0 0 2px var(--glow, #6a5a40), 0 0 8px var(--glow, transparent); background: #3a2a1a; display: grid; place-items: center; color: #d8b04a; font-size: 18px; }
.jamicon .vinyl { position: absolute; right: 0; top: 7px; width: 28px; height: 28px; border-radius: 50%; background: radial-gradient(circle, #d8b04a 0 3px, #111 4px 6px, #222 7px, #0a0a0a 13px, #111 14px); box-shadow: 0 0 2px #000; }
.jamicon.unid img { filter: grayscale(.7) brightness(.6); }
.jamicon em { position: absolute; left: 2px; top: 4px; width: 34px; height: 34px; display: grid; place-items: center; font: 900 24px Georgia, serif; color: #ffe9a0; text-shadow: 0 0 6px #000, 0 0 2px #000; }
.t-Legendary .vinyl { background: radial-gradient(circle, #ff6a3a 0 3px, #111 4px 6px, #2a1a10 7px, #0a0a0a 13px, #111 14px); }
.t-Epic .vinyl { background: radial-gradient(circle, #b46aff 0 3px, #111 4px 6px, #221a2a 7px, #0a0a0a 13px, #111 14px); }
.t-Rare .vinyl { background: radial-gradient(circle, #4a9aff 0 3px, #111 4px 6px, #1a2230 7px, #0a0a0a 13px, #111 14px); }
.tier-Legendary { color: #ff7a3a; font-weight: 700; } .tier-Epic { color: #b46aff; font-weight: 700; } .tier-Rare { color: #3a8aff; font-weight: 700; } .tier-Uncommon { color: #3aa84a; } .tier-Common { color: #8a8070; }
#itip { position: fixed; z-index: 1001; display: none; pointer-events: none; max-width: 280px; padding: 6px 9px; background: rgba(10,8,6,.92); border: 1px solid #8a7a5a; border-radius: 3px; font: 12px/1.4 Verdana, sans-serif; color: #e8e0c8; text-shadow: 1px 1px 0 #000; }
#itip b { font-size: 13px; } #itip small { color: #b8b0a0; }
#view.targeting { cursor: crosshair !important; }
.amtrow { display: flex; gap: 8px; align-items: center; } .amtrow input[type=number] { width: 90px; font-size: 16px; }
#markName { width: 100%; font-family: var(--fell); font-size: 18px; padding: 4px 6px; }
.runebook { min-width: min(360px, 90vw); box-shadow: inset 0 0 30px rgba(110,70,20,.45), 0 0 0 4px #6a1414, 0 0 0 7px #a83030, 0 0 0 8px #2a0a0a, 0 6px 20px rgba(0,0,0,.6); }
.bookcont { min-height: 120px; }
.rrow { display: grid; grid-template-columns: 14px 1fr auto auto auto; gap: 6px; align-items: center; padding: 4px 2px; border-bottom: 1px dotted rgba(90,60,20,.3); font-size: 16px; }
.rrow small { color: #6a4a2a; font-size: 12px; }
.gem { width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #c8a8ff, #4a2a8a); box-shadow: 0 0 4px #8a6ad0; }
.pill.small { min-width: 0; padding: 2px 8px; font-size: 12px; }
.bookcount { text-align: right; font-size: 13px; color: #6a4a2a; margin-top: 4px; }
.atlasdrop { margin-top: 8px; padding: 12px; border: 2px dashed rgba(90,60,20,.5); border-radius: 6px; text-align: center; font-size: 14px; color: #6a4a2a; }
.trade { min-width: min(440px, 94vw); }
.tcols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.thead { font-size: 15px; margin-bottom: 4px; } .thead input { width: 18px; height: 18px; vertical-align: -3px; }
.tpane { min-height: 132px; padding: 4px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 4px; border-radius: 4px; background: rgba(40,20,6,.75); box-shadow: inset 0 0 10px #000; }
.tpane.mine { outline: 2px dashed rgba(216,176,74,.45); outline-offset: -4px; }
.tpane .it { position: relative; }
.tval { font-size: 13px; color: #5a3a18; margin-top: 4px; min-height: 1.2em; }
.thelp { font-size: 12px; color: #6a4a2a; margin: 8px 0 0; text-align: center; }
.song { display: grid; grid-template-columns: 40px 1fr auto; gap: 8px; align-items: center; cursor: pointer; }
.sbtns .vote { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #8a2a2a; background: radial-gradient(circle at 40% 30%, #f07070, #a01818); color: #fff; font-size: 16px; }
.sbtns .vote[disabled] { opacity: .35; }

/* jukebox / lists */
.songs { display: grid; gap: 3px; }
.song { display: grid; grid-template-columns: 40px 1fr auto; gap: 8px; align-items: center; padding: 3px 6px; border-radius: 3px; background: none; border: 1px solid transparent; text-align: left; color: var(--ink); font-family: var(--fell); font-size: 16px; }
.song:hover { background: rgba(120,80,30,.15); }
.song.playing { background: rgba(40,110,40,.18); border-color: rgba(40,110,40,.4); }
.song img, .song .noart { width: 40px; height: 40px; object-fit: cover; border: 1px solid #6a4a22; border-radius: 2px; background: #3a2a1a; }
.song small { color: #6a4a2a; font-size: 12px; }
.frame { border: 0; display: block; background: #fff; border-radius: 2px; }
.who .w { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 3px 4px; font-size: 16px; border-bottom: 1px dotted rgba(90,60,20,.3); }
.who .w small { color: #6a4a2a; }
.tlist { display: grid; gap: 6px; }
.shrine img { display: block; width: 120px; height: 120px; object-fit: cover; margin: 4px auto 8px; border-radius: 50%; border: 3px solid #8a7a5a; box-shadow: 0 0 0 2px #3a2a14, 0 0 14px rgba(255,220,140,.7); filter: sepia(.25); }
.shrine p { text-align: center; margin: 6px 0; font-size: 17px; }
.shrine .candles { text-align: center; font-size: 15px; color: #6a3a08; }
.opt { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 5px 2px; font-size: 16px; }
.opt input[type=range] { width: 130px; }

#toast { position: fixed; left: 50%; top: 18%; transform: translateX(-50%); z-index: 50; pointer-events: none; font: 700 15px Verdana, sans-serif; color: #f0e0a0; text-shadow: 1px 1px 0 #000, -1px 0 0 #000, 0 -1px 0 #000, 1px 0 0 #000; opacity: 0; transition: opacity .4s; text-align: center; max-width: 90vw; }
#toast.on { opacity: 1; }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .lframe { width: 100vw; height: 100dvh; border-radius: 0; padding: 10px; }
  .banner { left: 18px; top: 18px; bottom: auto; width: auto; flex-direction: row; align-items: flex-start; }
  .shield { width: 56px; height: 104px; border-width: 3px; border-radius: 4px 4px 28px 28px; } .shield svg { width: 40px; }
  .oval { width: 78px; height: 38px; font-size: 13px; } .crest { width: 54px; height: 58px; font-size: 13px; }
  .smallbtns { display: none; }
  .quit { top: 16px; right: 16px; width: 44px; height: 44px; font-size: 11px; }
  .lpanel { bottom: 70px; padding: 12px 14px; } .ltitle { font-size: 19px; }
  .lpanel label { grid-template-columns: 1fr; font-size: 16px; gap: 2px; }
  .go { right: 10px; bottom: -58px; width: 50px; height: 50px; }
  .rating { display: none; }
  .copy { bottom: 8px; font-size: 10px; }
  #topbar { display: none; }
  #bottombar { display: flex; position: absolute; left: 0; right: 0; bottom: 0; z-index: 7; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); border-radius: 10px 10px 0 0; }
  #bottombar button { position: relative; flex: 1; background: none; border: 0; display: grid; justify-items: center; font-family: var(--fellsc); font-size: 12px; color: #1a120a; padding: 2px 0; }
  #bottombar i { font-style: normal; font-size: 20px; line-height: 1.1; filter: drop-shadow(0 1px 0 rgba(255,255,255,.4)); }
  #statusbar { top: calc(6px + env(safe-area-inset-top)); font-size: 12px; flex-direction: column; gap: 2px; }
  #radar { top: calc(6px + env(safe-area-inset-top)); width: 96px; height: 96px; }
  #sysmsg { bottom: 112px; font-size: 12px; max-width: 86vw; }
  #chatform { bottom: 66px; display: none; } #chatform.open { display: block; }
  #chat { font-size: 16px; padding: 8px; }
  .gw { left: 50% !important; transform: translateX(-50%); max-width: 96vw; }
  .gw.full { top: calc(8px + env(safe-area-inset-top)) !important; }
}

/* guild chest */
.chestg { padding: 38px 14px 14px; border-radius: 10px 10px 6px 6px; background: linear-gradient(#8a6034, #4a2e14); box-shadow: inset 0 0 0 3px #2a1a0a, inset 0 0 0 6px #b8b0a0, inset 0 0 0 8px #2a1a0a, 0 6px 18px rgba(0,0,0,.6); }
.chestg .ctitle { color: #f0d890; text-shadow: 1px 1px 0 #000; }
.chestg .cont { border-radius: 4px; background: radial-gradient(ellipse at 50% 30%, #3a2a1a, #140c06); box-shadow: inset 0 0 18px #000; }

/* Kombat Hall scroll */
.scrollg { width: min(560px, 96vw); filter: drop-shadow(0 8px 18px rgba(0,0,0,.6)); }
.scrollg .roller { height: 22px; margin: 0 -10px; border-radius: 11px; background: linear-gradient(#a8784a, #6a4422 45%, #3a2410); box-shadow: inset 0 2px 0 rgba(255,255,255,.25), 0 2px 4px rgba(0,0,0,.5); position: relative; z-index: 1; }
.scrollg .roller::before, .scrollg .roller::after { content: ''; position: absolute; top: -3px; width: 16px; height: 28px; border-radius: 5px; background: radial-gradient(circle at 40% 30%, #e8c060, #7a5a10); }
.scrollg .roller::before { left: -8px; } .scrollg .roller::after { right: -8px; }
.scrollbody { margin: -6px 0; padding: 18px 18px 12px; background-color: #e2cf9e; background-image: var(--tex-parch); box-shadow: inset 0 10px 14px -8px rgba(80,50,10,.6), inset 0 -10px 14px -8px rgba(80,50,10,.6), inset 14px 0 18px -14px rgba(110,70,20,.6), inset -14px 0 18px -14px rgba(110,70,20,.6); color: var(--ink); }
.hallhead { font-size: 24px !important; margin: 0 22px 6px !important; }
.kingbar { display: flex; align-items: center; gap: 10px; padding: 6px 10px; margin-bottom: 8px; border: 1px solid rgba(120,80,30,.45); border-radius: 4px; background: rgba(216,176,74,.22); }
.kingbar span { display: grid; } .kingbar b { font-size: 20px; } .kingbar small { font-size: 12px; color: #6a4a2a; }
.kcrown { margin-left: auto; font-size: 30px; color: #b8860b; text-shadow: 0 1px 0 #fff; }
.seals { display: flex; gap: 8px; justify-content: center; margin-bottom: 8px; }
.seal { padding: 4px 12px; border-radius: 14px; border: 2px solid #6a1414; background: radial-gradient(circle at 40% 30%, #c84a3a, #7a1414); color: #ffe9c0; font-family: var(--fellsc); font-size: 14px; opacity: .7; }
.seal.on { opacity: 1; box-shadow: 0 0 0 2px #d8b04a; }
.hallbody { height: min(52vh, 430px); padding-right: 4px; }
.hallfoot { text-align: right; font-size: 12px; margin-top: 6px; } .hallfoot a { color: #6a4a2a; }
.kpor { width: 34px; height: 40px; object-fit: contain; image-rendering: pixelated; display: inline-block; }
.kpor.big { width: 46px; height: 54px; } .kpor.huge { width: 84px; height: 100px; } .kpor.dim { filter: grayscale(.8) opacity(.7); }
.krow { display: grid; grid-template-columns: 26px 38px 1fr 46px 42px 24px 24px 46px; gap: 4px; align-items: center; padding: 3px 2px; border-bottom: 1px dotted rgba(90,60,20,.35); font-size: 15px; cursor: pointer; }
.krow.khead { font-family: var(--fellsc); font-size: 13px; color: #6a2a08; cursor: default; }
.krow.king { background: rgba(216,176,74,.25); }
.krow .kn small, .kcard small { display: block; font-size: 11px; color: #6a4a2a; }
.medal { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 700 11px Verdana, sans-serif; color: #2a1a0a; background: #c8bca0; }
.medal.m1 { background: radial-gradient(circle at 40% 30%, #fff0a0, #c8960a); } .medal.m2 { background: radial-gradient(circle at 40% 30%, #f4f4f4, #8a8a8a); } .medal.m3 { background: radial-gradient(circle at 40% 30%, #f0c090, #8a4a1a); }
.hot { color: #1a7a1a; font-weight: 700; } .cold { color: #9a1a1a; font-weight: 700; }
.kdate { font-family: var(--fellsc); font-size: 15px; color: #6a2a08; margin: 8px 0 2px; border-bottom: 1px solid rgba(120,80,30,.4); }
.kbout { display: grid; grid-template-columns: 38px 1fr 38px; gap: 6px; align-items: center; padding: 3px 0; font-size: 15px; }
.kbout small { display: block; font-size: 12px; color: #6a4a2a; } .fin { color: #9a1a1a; font-weight: 700; font-style: normal; } .flaw { color: #1a5a9a; font-style: normal; font-weight: 700; }
.kgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.kcard { display: grid; justify-items: center; padding: 6px 4px; border: 1px solid rgba(120,80,30,.4); border-radius: 4px; background: rgba(255,240,200,.25); font-family: var(--fell); font-size: 14px; color: var(--ink); }
.kcard:hover { background: rgba(216,176,74,.3); }
.kfocus { display: flex; gap: 12px; align-items: center; margin: 8px 0; } .kfname { font-size: 24px; }
.kstats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; } .kstats span { display: grid; justify-items: center; min-width: 58px; padding: 3px 6px; border: 1px solid rgba(120,80,30,.4); border-radius: 4px; font-size: 11px; color: #6a4a2a; } .kstats b { font-size: 16px; color: var(--ink); }
.kline { margin: 4px 0; font-size: 15px; }
.kvs { display: grid; grid-template-columns: 38px 1fr auto; gap: 6px; align-items: center; font-size: 15px; padding: 2px 0; }
@media (max-width: 760px) { .krow { grid-template-columns: 24px 34px 1fr 42px 36px 20px 20px 36px; font-size: 13px; } .hallbody { height: 58vh; } }

/* combat + status */
#sbHp { display: inline-flex; align-items: center; gap: 4px; color: #e8e0c8; }
.hpbar { display: inline-block; width: 70px; height: 7px; background: #200; border: 1px solid #000; vertical-align: middle; box-shadow: 0 0 0 1px rgba(255,255,255,.2); }
.hpbar i { display: block; height: 100%; }
.wartag { color: #ff6a5a; } .crimtag { color: #c8c8c8; } .ghosttag { color: #c8d0e8; letter-spacing: 2px; }
#tgtBar { position: absolute; left: 50%; top: 40px; transform: translateX(-50%); z-index: 6; padding: 4px 10px; border-radius: 4px; background: rgba(10,8,6,.8); border: 1px solid #8a7a5a; font: 700 12px Verdana, sans-serif; color: #f0e0c0; display: flex; align-items: center; gap: 8px; pointer-events: none; }
#tgtBar .hpbar { width: 110px; height: 8px; }
.k-red { color: #c81e1e; } .k-grey { color: #6a6a6a; } .k-blue { color: #1e4ac8; }
[data-a="voice"].on { color: #1a7a1a !important; text-shadow: 0 0 6px rgba(80,255,80,.6) !important; }
#topbar .warbtn { min-width: 60px; }
.doll .pane .dollpack { position: absolute; right: 8px; bottom: 8px; width: 46px; height: 46px; border: 0; padding: 0; border-radius: 10px 10px 8px 8px; cursor: pointer; background: radial-gradient(circle at 40% 30%, #a8784a, #5a3a1c); box-shadow: inset 0 0 0 2px #3a2410, inset 0 10px 0 -4px #7a5432, 0 0 6px #000; }
.doll .pane .dollpack::after { content: ''; position: absolute; left: 50%; top: 22px; width: 9px; height: 9px; transform: translateX(-50%) rotate(45deg); border: 2px solid #d8b04a; }
.corpseg { padding: 38px 14px 14px; border-radius: 8px; background: linear-gradient(#5a5650, #2a2622); box-shadow: inset 0 0 0 2px #1a1612, 0 6px 18px rgba(0,0,0,.6); }
.corpseg .ctitle { color: #e8e0c8; text-shadow: 1px 1px 0 #000; font-size: 15px; }
.corpseg .cont { border-radius: 6px; background: radial-gradient(ellipse at 50% 40%, #3a2e24, #120c08); box-shadow: inset 0 0 18px #000; }
/* auction */
.auctiong { width: min(520px, 96vw); }
.aucgold { text-align: center; font-size: 14px; color: #6a4a2a; margin-bottom: 6px; }
.aucbody { height: min(50vh, 400px); }
.auc { display: grid; grid-template-columns: 46px 1fr auto; gap: 8px; align-items: center; padding: 5px 2px; border-bottom: 1px dotted rgba(90,60,20,.35); }
.auc .aicon img, .auc .aicon .noart, .sellit img { width: 44px; height: 44px; object-fit: cover; border: 1px solid #6a4a22; border-radius: 3px; background: #3a2a1a; display: grid; place-items: center; }
.auc .ainfo small { display: block; font-size: 12px; color: #6a4a2a; }
.auc .abtn { display: grid; gap: 4px; justify-items: end; }
.sellslot { min-height: 74px; margin-bottom: 8px; border: 2px dashed rgba(90,60,20,.5); border-radius: 6px; display: grid; place-items: center; text-align: center; color: #6a4a2a; padding: 8px; }
.sellit { display: grid; justify-items: center; gap: 2px; } .sellit small { color: #6a4a2a; }
.opt input[type=number], .opt select { width: 130px; font-size: 15px; }
/* hall extras */
.kboards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.kboard { border: 1px solid rgba(120,80,30,.4); border-radius: 4px; padding: 5px 6px; background: rgba(255,240,200,.25); }
.kbt { font-family: var(--fellsc); font-size: 14px; color: #6a2a08; margin-bottom: 3px; }
.kbr { display: grid; grid-template-columns: 24px 1fr auto; gap: 4px; align-items: center; font-size: 14px; padding: 1px 0; cursor: pointer; }
.kbr .medal { width: 18px; height: 18px; font-size: 10px; }
.kboard small { color: #6a4a2a; }
.kjam { display: grid; grid-template-columns: 26px 40px 1fr auto; gap: 8px; align-items: center; padding: 3px 0; border-bottom: 1px dotted rgba(90,60,20,.35); font-size: 15px; }
.kjam img, .kjam .noart { width: 40px; height: 40px; object-fit: cover; border: 1px solid #6a4a22; border-radius: 2px; background: #3a2a1a; }
.kjam small { display: block; font-size: 12px; color: #6a4a2a; text-align: right; } .kjam span small { text-align: left; }
@media (max-width: 760px) { #tgtBar { top: calc(54px + env(safe-area-inset-top)); } #bottombar button { font-size: 11px; } }
/* ---- 1.1.0 Patch Ostard ---- */
.lver { cursor: pointer; } .lver small { display: block; font-size: 10px; color: #4a3a26; } .lver:hover { color: #6a1a1a; }
.fstar { color: #3ad06a; font-style: normal; text-shadow: 0 0 6px rgba(90,255,140,.7); }
.charbtn.founder { box-shadow: inset 0 0 0 2px #3aa04a, 0 0 10px rgba(90,255,140,.35); }
.charbtn small.seen { color: #6a5a40; font-style: italic; }
.who .whohead { margin: 10px 0 4px; font-family: var(--fellsc, serif); color: #5a3a18; border-top: 1px solid rgba(90,58,24,.35); padding-top: 6px; }
.who .w.gone { opacity: .72; }
.doll .namescroll.founder { box-shadow: inset 0 0 0 2px #3aa04a; }
.petsg .petlist { min-width: min(360px, 84vw); max-height: min(50vh, 360px); }
.petrow { display: grid; grid-template-columns: 72px 1fr auto; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid rgba(90,58,24,.25); }
.petrow canvas { width: 72px; height: 72px; background: rgba(0,0,0,.08); border-radius: 8px; }
.petrow .pinfo small { display: block; color: #6a5030; }
.petrow .pbtns { display: flex; flex-direction: column; gap: 3px; }
.pinballg { text-align: center; min-width: min(300px, 84vw); }
.pinballg .pbgift { margin: 0 0 8px; font-size: 13px; }
.pinballg .pbscore { font: 700 28px/1.2 Verdana, sans-serif; color: #ffe36a; background: #1a0e22; border: 2px solid #d8b04a; border-radius: 6px; padding: 6px 10px; letter-spacing: 1px; text-shadow: 0 0 8px rgba(255,90,140,.8); }
.pinballg .pbev { min-height: 18px; margin: 4px 0; color: #8a1a5a; font-weight: 700; }
.pinballg .pbhead { margin: 10px 0 4px; font-family: var(--fellsc, serif); color: #5a3a18; }
.pinballg .pbrow { display: grid; grid-template-columns: 24px 1fr auto; gap: 6px; text-align: left; font-size: 14px; }
.pinballg .pbplays { color: #6a5030; }
.kcard.founder { box-shadow: inset 0 0 0 2px #3aa04a, 0 0 8px rgba(90,255,140,.3); }
.ftitle { display: block; color: #2a6a2a; font-style: italic; }
/* ---- 1.2.0 Patch Yoink ---- */
body.uofont #sysmsg { font: 16px/1.3 MedievalSharp, 'IM Fell English', serif; letter-spacing: .2px; }
body.uofont #chat { font: 16px MedievalSharp, 'IM Fell English', serif; }
body.uofont .jline { font: 15px/1.35 MedievalSharp, 'IM Fell English', serif; }
.doll .pane .dollfig { position: absolute; left: 50%; bottom: 0; width: 200px; height: 270px; transform: translateX(-50%); }
.doll .pane .dollfig canvas { position: absolute; left: 0; top: 0; transform: none; }
.doll .pane .dollfig[data-self] { cursor: copy; }
.dollfig .slots { position: absolute; inset: 0; }
.dollfig .wornslot { position: absolute; border-radius: 8px; cursor: grab; }
.dollfig .wornslot img, .dollfig .wornslot .amt { opacity: 0; }
.dollfig .wornslot:hover { box-shadow: inset 0 0 0 1px rgba(255,230,160,.55); background: rgba(255,230,160,.06); filter: none; }
.dollfig .wornslot.other { cursor: help; }
.it.wornslot.ghost { width: 44px !important; height: 44px !important; }
.it.wornslot.ghost img { opacity: 1; }
.doll .namescroll .ttl { display: block; }
.doll .namescroll .ttl2:empty { display: none; }
.doll .btns button { padding-top: 3px; padding-bottom: 3px; }
.snoopg .cont { margin: 0 auto; }
.snoopg .sit { position: absolute; width: 44px; height: 44px; cursor: pointer; }
.snoopg .sit img { width: 44px; height: 44px; pointer-events: none; }
.snoopg .sit:hover { filter: drop-shadow(0 0 4px rgba(255,120,120,.9)); }
.sk .rk { color: #6a5030; font-size: 11px; }
.skills .skb { max-height: min(62vh, 480px); overflow: auto; }
/* ---- 1.3.0 Patch Pouch: hall, now playing, trade pouches ---- */
.hav { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid #8a6a3a; background: #3a2a1a; display: inline-block; flex: none; }
.hav.mk { object-fit: contain; image-rendering: pixelated; border-radius: 6px; }
.hav.none { background: radial-gradient(circle at 50% 35%, #7a6a52, #3a2a1a); }
.hav.big { width: 50px; height: 50px; } .hav.card { width: 64px; height: 64px; } .hav.huge { width: 96px; height: 96px; } .hav.mini { width: 24px; height: 24px; border-width: 1px; } .hav.dim { filter: grayscale(.8) opacity(.7); }
.krow { grid-template-columns: 26px 40px 1fr 48px 44px 44px; }
@media (max-width: 760px) { .krow { grid-template-columns: 24px 36px 1fr 42px 38px 36px; } }
.kbout { grid-template-columns: 40px 1fr 40px; }
.kbr { grid-template-columns: 22px 28px 1fr auto; }
.kvs { grid-template-columns: 30px 1fr auto; }
.hgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; }
.hcard { display: grid; justify-items: center; gap: 2px; padding: 8px 6px; border: 1px solid rgba(120,80,30,.4); border-radius: 6px; background: rgba(255,240,200,.25); font-family: var(--fell); font-size: 16px; color: var(--ink); cursor: pointer; text-align: center; }
.hcard:hover { background: rgba(216,176,74,.3); }
.hcard small { font-size: 11px; color: #6a4a2a; line-height: 1.25; } .hcard small.seen { font-style: italic; }
.hcard.founder { box-shadow: inset 0 0 0 2px #3aa04a, 0 0 8px rgba(90,255,140,.3); } .hcard.king { box-shadow: inset 0 0 0 2px #d8b04a; }
.hprof { display: flex; gap: 14px; align-items: center; margin: 8px 0; } .hprof small { display: block; color: #6a4a2a; }
.npg { text-align: center; }
.npg .npart img, .npg .npart .noart { width: min(300px, 72vw); height: min(300px, 72vw); object-fit: cover; border-radius: 6px; border: 3px solid #3a2410; box-shadow: 0 4px 14px rgba(0,0,0,.45); display: block; margin: 0 auto 8px; }
.npg .npart .noart { display: grid; place-items: center; font-size: 80px; background: #1a120a; color: #d8b04a; }
.npg .npname { font-size: 18px; font-weight: 700; text-shadow: 0 0 2px #fff; }
.tinside { grid-column: 1 / -1; width: 100%; margin-top: 6px; padding-top: 4px; border-top: 1px dotted rgba(90,60,20,.4); }
.tinside small { display: block; font-size: 11px; color: #6a4a2a; }
.tinside .tin { display: inline-block; width: 34px; height: 34px; position: relative; }
.tinside .tin img, .tinside .tin .jamicon { width: 34px !important; height: 34px !important; }
.tinside .tin .amt { position: absolute; right: -2px; bottom: -2px; font: 700 9px Verdana, sans-serif; color: #ffe680; text-shadow: 1px 1px 0 #000; }
.tpane .tinside small { color: #e0d0a8; } .tpane .tinside { border-top-color: rgba(216,176,74,.35); }

/* 1.4.0: AIM floats on its own, no stone frame (its windows have their own X) */
.gw.aimbare { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; }
.gw.aimbare .gx { display: none; }
.gw.aimbare .aimslot { background: transparent; }
.npby { display: block; color: #6a3a10; font-style: italic; margin-top: 2px; }
