/* Phone interface: scenes, focus mode, chat (yohara-scenes.js). Loaded for every visitor, but
   every rule lives under #ymobile (the touch overlay) or .ys-chip - a computer has neither. */

/* -- the HUD without the computer-style leftovers ------------------------------------------- */
#ymobile.in-game #ym-top.game,#ymobile.in-game #ym-ch.game,#ymobile.in-game #ym-map.game,#ymobile.in-game #ym-esc.game,
#ymobile.in-game #ym-opts.game,#ymobile.in-game #ym-bar.game,#ymobile.in-game #ym-closes.game,#ymobile.in-game #ym-lock.game,
#ymobile.in-game #ym-auto.game{display:none!important}
#ymobile #ym-fbar{transform:scale(var(--s,1))}
#ymobile .ym-fkey{--d:calc(42px * var(--hud) * var(--ctrl))}
#ymobile #ym-affects{flex-direction:row-reverse;max-width:calc(100vw - 420px * var(--hud))}
#ym-mmtap{position:absolute;left:0;top:0;width:0;height:0;border:0;padding:0;background:transparent;border-radius:50%}
#ym-chatlog{position:absolute;left:calc(var(--sl) + 216px * var(--hud));right:calc(var(--sr) + 330px * var(--hud));bottom:calc(var(--sb) + 4px);
 display:flex!important;flex-direction:column;justify-content:flex-end;gap:1px;pointer-events:none;font:calc(12px * var(--font)) Tahoma,Verdana,Arial,sans-serif;max-height:30vh;overflow:hidden}
#ymobile:not(.in-game) #ym-chatlog{display:none!important}
#ym-chatlog p{margin:0;padding:1px 6px;background:rgba(0,0,0,.38);border-radius:3px;color:#fff;text-shadow:1px 1px 0 #000;transition:opacity .6s;
 white-space:nowrap;overflow:hidden;text-overflow:ellipsis;align-self:flex-start;max-width:100%}
#ym-chatlog p.old{opacity:0}
#ymobile .ym-badge{position:absolute;right:-2px;top:-2px;min-width:16px;height:16px;border-radius:8px;background:#b3261e;color:#fff;font:bold 10px/16px Tahoma,Arial,sans-serif;text-align:center;padding:0 3px;text-shadow:none}

/* -- focus: a game window alone on the screen ----------------------------------------------- */
html.yohara-touch body{background:#000}
html.yohara-touch canvas#canvas{transform-origin:0 0;transition:transform .16s ease-out}
#ymobile.in-game.window-open:not(.editing) .game:not(.ys-keep),#ymobile.in-game.scene-open:not(.editing) .game:not(.ys-keep){display:none!important}
#ymobile.in-game.window-open:not(.editing) #ym-fbar,#ymobile.in-game.window-open:not(.editing) #ym-affects,#ymobile.in-game.scene-open:not(.editing) #ym-fbar,#ymobile.in-game.scene-open:not(.editing) #ym-affects{display:none!important}
#ys-focus{position:absolute;right:calc(var(--sr) + 6px);top:calc(var(--st) + 6px);display:none;flex-direction:column;gap:10px;pointer-events:none}
#ymobile.in-game.window-open:not(.scene-over) #ys-focus{display:flex}
.ys-x{width:52px;height:52px;border-radius:10px;border:0;padding:0;display:grid;place-items:center;pointer-events:auto;
 background:linear-gradient(#3a352a,#1b1914);box-shadow:inset 0 0 0 1px #000,inset 0 0 0 2px #a79467,0 2px 8px #000;color:#f3e7c6}
.ys-x svg{width:54%!important;height:54%!important}
.ys-x:active{box-shadow:inset 0 0 0 1px #000,inset 0 0 0 2px #f0d27a,0 0 10px rgba(240,210,122,.8)}

/* -- scenes ---------------------------------------------------------------------------------- */
.ys-scene{position:absolute;inset:0;z-index:9;pointer-events:auto;touch-action:none;display:flex;flex-direction:column;
 background:radial-gradient(120% 90% at 50% 40%,rgba(34,29,22,.93),rgba(8,7,6,.97));color:#e9dfc4;font:15px/1.3 Tahoma,Verdana,Arial,sans-serif;text-shadow:none;
 padding:calc(var(--st) + 6px) calc(var(--sr) + 8px) calc(var(--sb) + 6px) calc(var(--sl) + 8px);box-sizing:border-box}
.ys-scene[hidden]{display:none!important}
.ys-head{display:flex;align-items:center;gap:8px;min-height:52px;flex:none}
.ys-head h2{flex:1;margin:0;font:bold 19px Georgia,'Times New Roman',serif;color:#f1d48a;letter-spacing:.3px;text-shadow:0 1px 2px #000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ys-tabs{display:flex;gap:4px;flex:none}
.ys-tab{min-width:52px;height:44px;padding:0 12px;border:0;border-radius:6px;background:linear-gradient(#57503f,#2f2b22);box-shadow:inset 0 0 0 1px #000,inset 0 0 0 2px #7d7052;
 color:#e9dfc4!important;font:bold 15px Georgia,'Times New Roman',serif!important}
.ys-tab.on{background:linear-gradient(#8a7443,#4d3f22);box-shadow:inset 0 0 0 1px #000,inset 0 0 0 2px #f0d27a;color:#fff!important}
.ys-body{flex:1;min-height:0;display:flex;gap:8px}
.ys-scroll{overflow-y:auto;overflow-x:hidden;touch-action:pan-y;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.ys-btn{min-height:46px;padding:0 16px;border:0;border-radius:6px;background:linear-gradient(#4a4232,#262219);box-shadow:inset 0 0 0 1px #000,inset 0 0 0 2px #a79467;
 color:#f3e7c6!important;font:bold 16px Tahoma,Verdana,Arial,sans-serif!important}
.ys-btn:active,.ys-tile:active{box-shadow:inset 0 0 0 1px #000,inset 0 0 0 2px #f0d27a,0 0 10px rgba(240,210,122,.6)}
.ys-btn.red{background:linear-gradient(#6a2a22,#2e1410)}
.ys-btn[disabled]{opacity:.45}

/* menu: a grid of big tiles */
.ys-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:8px;align-content:start;flex:1;padding:2px}
.ys-tiles h3{grid-column:1/-1;margin:8px 0 0;font:bold 14px Georgia,serif;color:#b9a777;border-bottom:1px solid #4d4431;padding-bottom:3px}
.ys-tile{min-height:62px;padding:6px 8px;border:0;border-radius:8px;background:linear-gradient(#3b3529,#1d1a14);box-shadow:inset 0 0 0 1px #000,inset 0 0 0 2px #6f6347;
 color:#efe6cf!important;font:bold 14px/1.2 Tahoma,Verdana,Arial,sans-serif!important;display:grid;place-items:center;text-align:center}

/* chat */
.ys-chat .ys-body{flex-direction:column}
.ys-chatlist{flex:1;min-height:0;background:rgba(0,0,0,.45);border:1px solid #4d4431;border-radius:6px;padding:6px 8px;font-size:15px;user-select:text;-webkit-user-select:text}
.ys-chatlist p{margin:0 0 3px;word-break:break-word}
.ys-chatrow{display:flex;gap:6px;flex:none}
.ys-chatrow select,.ys-chatrow input{height:46px;border-radius:6px;border:1px solid #7d7052;background:#14120e;color:#fff!important;font:16px Tahoma,Arial,sans-serif!important;padding:0 8px;touch-action:auto!important}
.ys-chatrow input{flex:1;min-width:0}

/* a touch device switched to the computer interface: the way back */
.ys-chip{position:fixed;left:6px;bottom:6px;z-index:30;padding:8px 12px;border:1px solid #a79467;border-radius:16px;background:rgba(20,18,14,.85);color:#f3e7c6;font:bold 12px Tahoma,Arial,sans-serif;opacity:.75}

/* bag and equipment */
.ys-inv{background:linear-gradient(90deg,rgba(9,8,6,.9),rgba(9,8,6,.35) 38%,rgba(9,8,6,.35) 62%,rgba(9,8,6,.9))}
.ys-inv .ys-body{gap:8px;align-items:stretch}
.ys-eq,.ys-bagp{flex:none;display:flex;flex-direction:column;gap:6px;padding:8px;border-radius:8px;background:rgba(16,14,11,.92);box-shadow:inset 0 0 0 1px #000,inset 0 0 0 2px #5d5239,0 4px 14px rgba(0,0,0,.6)}
.ys-eq{width:min(34vw,300px)}
.ys-eqtabs{display:flex;gap:4px;flex:none}.ys-eqtabs .ys-tab{flex:1;height:40px;padding:0 6px;font-size:13px!important}
.ys-dollbox{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;gap:12px;overflow:hidden}
.ys-doll[hidden],.ys-eqtabs[hidden]{display:none}
.ys-doll{position:relative;flex:none}
.ys-doll img{position:absolute;pointer-events:none;max-width:none}
.ys-doll:has(img) .ys-es{background-color:transparent;box-shadow:none}
.ys-es,.ys-it{position:absolute;border:0;padding:0;margin:0;background:rgba(0,0,0,.55) center/contain no-repeat;image-rendering:auto;border-radius:4px}
.ys-es{box-shadow:inset 0 0 0 1px #000,inset 0 0 0 2px #6b5b3a}
.ys-es.sel,.ys-it.sel{box-shadow:inset 0 0 0 2px #f0d27a,0 0 10px rgba(240,210,122,.7);z-index:1}
.ys-mid{flex:1;min-width:0;display:flex;align-items:center;justify-content:center;pointer-events:none}
.ys-item{pointer-events:auto;width:100%;max-width:340px;max-height:100%;display:flex;flex-direction:column;gap:8px;padding:10px;box-sizing:border-box;border-radius:8px;
 background:rgba(8,7,6,.93);box-shadow:inset 0 0 0 1px #000,inset 0 0 0 2px #a79467,0 6px 18px rgba(0,0,0,.7)}
.ys-lines{flex:1;min-height:0;text-align:center;font-size:14px;line-height:1.35}
.ys-lines p{margin:0 0 2px;color:#e8dcc0}.ys-lines p.nm{font-size:16px;font-weight:bold;margin-bottom:6px}
.ys-acts{flex:none;display:grid;grid-template-columns:1fr 1fr;gap:6px}
.ys-acts .ys-btn{padding:0 6px;font-size:15px!important}.ys-acts .ys-btn.gold{grid-column:1/-1;background:linear-gradient(#7a6535,#3d3119)}
.ys-acts .ys-btn.q{min-height:44px}.ys-acts .hint{grid-column:1/-1;margin:0;text-align:center;color:#f1d48a}
.ys-acts:has(.q){grid-template-columns:repeat(4,1fr)}.ys-acts:has(.q) .ys-btn:last-child{grid-column:1/-1}
.ys-bagp{width:calc(var(--c,52px) * 5 + 16px);box-sizing:border-box}
.ys-bagscroll{flex:1;min-height:0}
.ys-cells{position:relative;background-color:#0b0a08;
 background-image:linear-gradient(#4d4431 1px,transparent 1px),linear-gradient(90deg,#4d4431 1px,transparent 1px);background-size:var(--c,52px) var(--c,52px);box-shadow:inset 0 0 0 1px #4d4431}
.ys-it{width:var(--c,52px);background-color:transparent;background-size:88% auto}
.ys-it b{position:absolute;right:3px;bottom:1px;font:bold 13px Tahoma,Arial,sans-serif;color:#fff;text-shadow:1px 1px 0 #000,-1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000}
.ys-cells.moving{box-shadow:inset 0 0 0 2px #f0d27a}
.ys-gold{flex:none;height:34px;display:flex;align-items:center;justify-content:flex-end;gap:6px;padding:0 10px;background:#0b0a08;border:1px solid #4d4431;border-radius:4px;color:#f1d48a;font:bold 15px Tahoma,Arial,sans-serif}
@media (orientation:portrait){
 .ys-inv{background:rgba(9,8,6,.9)}
 .ys-inv .ys-body{flex-direction:column}
 .ys-eq{width:auto;height:34vh}.ys-bagp{width:auto;flex:1;min-height:0;align-items:center}.ys-bagscroll{width:calc(var(--c,52px) * 5)}.ys-gold{align-self:stretch}
 .ys-mid{position:absolute;left:8px;right:8px;bottom:calc(var(--sb) + 8px);z-index:3}.ys-item{max-width:none;max-height:60vh}
}

/* the bag docked beside a game window (shop, storage, trade ...) */
#ymobile.side-bag #ys-focus{display:none!important}
.ys-scene.side{left:auto;background:none;pointer-events:none;padding-left:0}
.ys-scene.side .ys-head h2,.ys-scene.side .ys-eq{display:none}
.ys-scene.side .ys-head{justify-content:flex-end;pointer-events:auto;align-self:flex-end}
.ys-scene.side .ys-body{justify-content:flex-end}
.ys-scene.side .ys-bagp{pointer-events:auto}
.ys-scene.side .ys-mid{position:fixed;right:calc(var(--sr) + var(--c,52px) * 5 + 40px);top:calc(var(--st) + 8px);bottom:calc(var(--sb) + 8px);width:min(300px,40vw);flex:none}

/* before the game: the rules window in focus, with the scroll buttons only */
#ymobile.pre-focus #ys-focus{display:flex;top:auto;bottom:calc(var(--sb) + 60px)}
#ymobile.pre-focus #ys-focus .ys-x:not(.ys-wheel){display:none}
#ymobile.pre-focus #ym-pre{display:none}
@media (orientation:portrait){
 #ym-chatlog{left:calc(var(--sl) + 8px);right:calc(var(--sr) + 8px);bottom:calc(var(--sb) + 262px * var(--hud))}
 .ys-head h2{font-size:17px}
}

/* keyboard bar for the game's text fields */
#ys-kb{position:absolute;z-index:12;left:calc(var(--sl) + 12%);right:calc(var(--sr) + 80px);top:calc(var(--st) + 6px);display:flex;gap:6px;pointer-events:auto}
#ys-kb[hidden]{display:none}
#ys-kb input{flex:1;min-width:0;height:46px;border-radius:6px;border:2px solid #f0d27a;background:rgba(12,11,9,.92);color:#fff!important;font:16px Tahoma,Arial,sans-serif!important;padding:0 10px;touch-action:auto!important}

/* quick bar scene */
.ys-qwrap{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px}
.ys-qhint{grid-column:1/-1;margin:0;color:#cfc3a3;font-size:14px}
.ys-qslots{display:flex;gap:8px;flex-wrap:wrap;flex:none}
.ys-qs{position:relative;width:60px;height:60px;border:0;border-radius:8px;background:#0b0a08 center/78% no-repeat;box-shadow:inset 0 0 0 1px #000,inset 0 0 0 2px #6b5b3a;color:#fff!important;font-size:10px!important;overflow:hidden}
.ys-qs.aim{box-shadow:inset 0 0 0 2px #f0d27a,0 0 10px rgba(240,210,122,.7)}
.ys-qs em{position:absolute;left:4px;top:2px;font:bold 12px Tahoma,Arial,sans-serif;font-style:normal;color:#f1d48a;text-shadow:1px 1px 0 #000}
.ys-qskills{flex:1;min-height:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:6px;align-content:start}
.ys-sk{display:flex;align-items:center;gap:8px;min-height:56px;padding:4px 8px;border:0;border-radius:8px;background:linear-gradient(#3b3529,#1d1a14);box-shadow:inset 0 0 0 1px #000,inset 0 0 0 2px #6f6347;color:#efe6cf!important;font:bold 14px Tahoma,Arial,sans-serif!important;text-align:left}
.ys-sk.sel{box-shadow:inset 0 0 0 2px #f0d27a,0 0 10px rgba(240,210,122,.7)}
.ys-sk i{flex:none;width:44px;height:44px;border-radius:6px;background:#0b0a08 center/contain no-repeat}
.ys-sk span{flex:1;min-width:0}.ys-sk b{color:#f1d48a}

/* shop / storage as the left panel of the bag scene */
.ys-actbox{flex:1;min-height:0;display:block}
.ys-actbox[hidden],.ys-dollbox[hidden]{display:none}
.ys-inv.acting{background:rgba(9,8,6,.82)}
.ys-inv.acting .ys-eq{width:auto;flex:1 1 0;min-width:0;max-width:calc(var(--c,52px) * 10 + 20px)}
.ys-inv.acting .ys-mid{flex:0 1 300px}
.ys-acells{margin:0 auto}
@media (orientation:portrait){.ys-inv.acting .ys-eq{max-width:none;height:38vh;flex:none}}

/* NPC / quest dialog buttons */
#ys-qd{position:absolute;z-index:6;left:calc(var(--sl) + 8px);right:calc(var(--sr) + 72px);bottom:calc(var(--sb) + 6px);display:flex;flex-wrap:wrap;gap:6px;justify-content:center;
 max-height:42vh;overflow-y:auto;touch-action:pan-y;pointer-events:auto}
#ys-qd[hidden]{display:none}
#ys-qd .ys-btn{flex:1 1 40%;min-height:48px;max-width:100%;text-align:center;white-space:normal;padding:4px 12px}
#ys-qd .ys-btn.gold{background:linear-gradient(#7a6535,#3d3119)}
#ymobile:not(.window-open) #ys-qd{display:none}
/* small phones in landscape: the item panel lies over the equipment instead of squeezing between the panels */
@media (orientation:landscape) and (max-width:759px){
 .ys-inv:not(.side) .ys-mid{position:absolute;z-index:3;left:calc(var(--sl) + 8px);right:calc(var(--sr) + var(--c,52px) * 5 + 36px);top:calc(var(--st) + 62px);bottom:calc(var(--sb) + 6px);align-items:stretch}
 .ys-inv:not(.side) .ys-item{max-width:none}
 .ys-inv:not(.side) .ys-eq{flex:1 1 0;width:auto;min-width:0}
 .ys-head h2{font-size:17px}.ys-tab{min-width:44px;padding:0 8px}
}
/* the "add to home screen" hint belongs to the start screen: never under a scene or an enlarged window */
#ymobile.in-game.scene-open #ym-ios-hint,#ymobile.in-game.window-open #ym-ios-hint{display:none!important}

/* blacksmith and trade: a wide left panel, the description of a tapped item lies over it */
.ys-inv.wide .ys-eq{max-width:none}
.ys-inv.wide:not(.side) .ys-mid{position:absolute;z-index:3;left:calc(var(--sl) + 8px);right:calc(var(--sr) + var(--c,52px) * 5 + 36px);top:calc(var(--st) + 62px);bottom:calc(var(--sb) + 6px);align-items:center}
.ys-actx{display:flex;flex-direction:column;gap:8px;min-height:100%}
.ys-actx[hidden],.ys-acells[hidden]{display:none}
.ys-rf{flex:1;display:flex;gap:12px;align-items:flex-start;justify-content:center;text-align:center}
.ys-rf.empty{flex-direction:column;align-items:center;justify-content:flex-start}
.ys-rfinfo{flex:1;min-width:0;max-width:420px;display:flex;flex-direction:column;gap:5px}
.ys-rfslot{flex:none;width:60px;height:60px;margin:4px 6px;border-radius:6px;background:#0b0a08 center/contain no-repeat;box-shadow:inset 0 0 0 1px #000,inset 0 0 0 2px #a79467,0 0 14px rgba(240,160,60,.25)}
.ys-rfslot.h2{height:104px}.ys-rfslot.h3{height:150px}
@media (orientation:portrait){.ys-rf{flex-direction:column;align-items:center}.ys-rfinfo{align-self:stretch;max-width:none}}
.ys-rfhint{margin:14px 8px;color:#f1d48a;font-size:16px}
.ys-rf .ys-lines{flex:none}.ys-rf .ys-lines p{margin:0}.ys-rf .ys-lines p.nm{margin-bottom:3px}
.ys-rfmats{align-self:stretch;display:flex;flex-direction:column;gap:3px}
.ys-rfmats p{margin:0;display:flex;align-items:center;gap:8px;padding:2px 8px;background:rgba(0,0,0,.4);border-radius:4px;text-align:left}
.ys-rfmats i{flex:none;width:30px;height:30px;background:center/contain no-repeat}.ys-rfmats span{flex:1;min-width:0}
.ys-rfmats p.ok b{color:#8fe08f}.ys-rfmats p.no b,.ys-rfcost.no{color:#ff8a7a}
.ys-rfcost{margin:0;color:#f1d48a;font-weight:bold}
.ys-rfbtns{flex:none;align-self:stretch;display:flex;gap:8px;position:sticky;bottom:0;padding-top:4px;background:rgba(16,14,11,.96)}
.ys-rfbtns .ys-btn{flex:1}.ys-rfbtns .ys-btn.gold,.ys-item .ys-btn.gold{background:linear-gradient(#7a6535,#3d3119)}
.ys-tr{flex:1;display:flex;gap:12px;justify-content:center;align-items:flex-start}
.ys-tr.one{flex-direction:column;align-items:center}
.ys-trside{display:flex;flex-direction:column;gap:4px;padding:4px;border-radius:6px}
.ys-trside.ok{box-shadow:0 0 0 2px #6fbf6f}
.ys-trside h4{margin:0;display:flex;justify-content:space-between;gap:6px;font:bold 14px Georgia,serif;color:#f1d48a;white-space:nowrap}
.ys-trside h4 span{overflow:hidden;text-overflow:ellipsis}.ys-trside h4 em{font:bold 12px Tahoma,Arial,sans-serif;color:#8fe08f}
.ys-trgold{min-height:36px;display:flex;align-items:center;justify-content:flex-end;padding:0 10px;background:#0b0a08;border:1px solid #4d4431;border-radius:4px;color:#f1d48a;font:bold 15px Tahoma,Arial,sans-serif}
button.ys-trgold{justify-content:center;border:0}

/* the target's action (trade / upgrade) under the target's bar */
#ys-tgt{position:absolute;left:50%;top:calc(var(--st) + 70px * var(--hud,1));transform:translateX(-50%);z-index:4;pointer-events:auto;min-height:42px;background:linear-gradient(#7a6535,#3d3119)}
#ys-tgt[hidden]{display:none!important}

/* character */
.ys-ch{flex:1;min-width:0;display:flex;flex-wrap:wrap;gap:10px;align-content:flex-start}
.ys-chcol{flex:1 1 230px;display:flex;flex-direction:column;gap:4px;padding:8px 10px;border-radius:8px;background:rgba(16,14,11,.92);box-shadow:inset 0 0 0 1px #000,inset 0 0 0 2px #5d5239}
.ys-ch h3{margin:0 0 4px;font:bold 16px Georgia,serif;color:#f1d48a;display:flex;align-items:center;gap:8px}.ys-ch h3 em{font-style:normal;color:#fff}.ys-ch h3 .ys-btn{margin-left:auto;min-height:40px}
.ys-chcol p{margin:0;display:flex;align-items:center;gap:8px;min-height:30px;border-bottom:1px solid rgba(125,112,82,.25)}
.ys-chcol p span{flex:1;color:#cfc3a3}.ys-chcol p b{color:#fff}
.ys-chcol p.st{min-height:50px}.ys-chcol p.st .ys-btn{min-width:52px;font-size:22px!important;padding:0}
.ys-chsk{flex:1;display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:6px;align-content:start}
.ys-chsk h3{grid-column:1/-1}.ys-chsk .ys-sk .ys-btn{min-width:48px;min-height:44px;font-size:22px!important;padding:0}

/* -- 24 November 2026: phones held sideways (the owner's screenshots, 874x402) ------------------- */
/* more below: a shade and an arrow at the bottom edge of a list (cue() in yohara-scenes.js) */
.ys-cue{display:block;position:sticky;bottom:0;height:0;pointer-events:none;z-index:2;grid-column:1/-1}
.ys-cue::before{content:"";position:absolute;left:0;right:0;bottom:0;height:14px;background:linear-gradient(transparent,rgba(8,7,6,.6));opacity:0;transition:opacity .2s}
.ys-cue b{position:absolute;left:50%;bottom:3px;width:40px;height:20px;margin-left:-20px;border-radius:10px;background:rgba(24,20,14,.95);box-shadow:inset 0 0 0 1px #a79467;
 color:#f1d48a;font:bold 17px/19px Tahoma,Arial,sans-serif;text-align:center;opacity:0;transition:opacity .2s}
.ys-scroll.more>.ys-cue::before{opacity:1}
.ys-scroll.more>.ys-cue b{opacity:1;animation:ys-cue 1.4s ease-in-out infinite}
@keyframes ys-cue{50%{transform:translateY(3px)}}
.ys-qskills>.ys-cue,.ys-tiles>.ys-cue{margin-top:-6px}

/* bag scene: no gap between the panels; the description of a tapped item lies over the panel on the
   other side (never squeezed between them, never over the cell that was tapped) with the text on the left,
   scrolling, and every button in a column on the right */
@media (orientation:landscape) and (max-width:1099px){
 .ys-inv:not(.side) .ys-eq{flex:1 1 0;width:auto;min-width:0;max-width:none}
 .ys-inv:not(.side) .ys-mid{position:absolute;z-index:3;left:calc(var(--sl) + 8px);right:calc(var(--sr) + var(--c,52px) * 5 + 32px);top:calc(var(--st) + 64px);bottom:calc(var(--sb) + 6px);
  flex:none;width:auto;align-items:stretch}
 .ys-inv:not(.side) .ys-item{max-width:none;flex-direction:row;gap:10px}
 .ys-inv:not(.side) .ys-item .ys-lines{flex:1 1 0;min-width:0;align-self:stretch}
 .ys-inv:not(.side) .ys-item .ys-acts{flex:0 0 clamp(136px,36%,190px);grid-template-columns:1fr;align-content:start;overflow-y:auto;touch-action:pan-y}
 .ys-inv:not(.side) .ys-item .ys-acts:has(.q){grid-template-columns:1fr 1fr;flex-basis:clamp(150px,40%,200px)}
 .ys-inv:not(.side) .ys-item .ys-acts:has(.q) .ys-btn:last-child{grid-column:1/-1}
 .ys-inv.selleft:not(.side) .ys-mid{left:auto;right:calc(var(--sr) + 8px);width:calc(var(--c,52px) * 5 + 16px)}
 .ys-inv.selleft:not(.side) .ys-item{flex-direction:column}
 .ys-inv.selleft:not(.side) .ys-item .ys-lines{flex:1 1 0;min-height:0;align-self:auto}
 .ys-inv.selleft:not(.side) .ys-item .ys-acts{flex:none}
}
/* short screens: the eight places of the bar on the left, the skills beside them in their own scrolling list */
@media (orientation:landscape) and (max-height:560px){
 .ys-qwrap{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);gap:8px 12px;min-height:0}
 .ys-qslots{grid-column:1;grid-row:1;display:grid;grid-template-columns:repeat(4,54px);gap:6px}
 .ys-qs{width:54px;height:54px}
 .ys-qwrap>.ys-qhint{grid-column:1;grid-row:2;max-width:234px;font-size:12.5px;line-height:1.35;overflow:hidden}
 .ys-qskills{grid-column:2;grid-row:1/3;grid-template-columns:repeat(auto-fill,minmax(170px,1fr))}
 .ys-sk{min-height:52px}
}
@media (orientation:landscape) and (max-height:380px){
 .ys-inv:not(.side) .ys-item{padding:8px}
 .ys-inv:not(.side) .ys-item .ys-acts .ys-btn{min-height:40px}
}
/* the description panel's own close button (the panel may lie over what the player wants to tap next) */
.ys-item{position:relative}
.ys-ix{position:absolute;left:4px;top:4px;z-index:3;width:34px;height:34px;border:0;border-radius:8px;padding:0;display:grid;place-items:center;
 background:linear-gradient(#3a352a,#1b1914);box-shadow:inset 0 0 0 1px #000,inset 0 0 0 2px #7d7052;color:#f3e7c6}
.ys-ix svg{width:50%!important;height:50%!important}
.ys-item .ys-lines p.nm{padding:0 34px}
.ys-qskills{grid-auto-rows:var(--skh,auto)}
.ys-ch>.ys-cue{flex:0 0 100%}
.ys-bagp{justify-content:space-between}
@media (orientation:portrait) and (max-width:430px){.ys-inv .ys-head h2{font-size:15px}.ys-inv .ys-tab{min-width:40px;padding:0 6px}.ys-inv .ys-head{gap:5px}}

/* -- 25 November 2026: lists scroll with a finger -------------------------------------------------
   Buttons of the overlay are touch-action:none (HUD controls must not pan the page), but a touch that
   starts on a bag cell / menu tile / skill inside a list must still scroll that list: the browser only
   pans when every element from the touched one up to the scroller allows it. The arrow at the bottom
   is a button too: a tap scrolls one page down. */
#ymobile .ys-scroll,#ymobile .ys-scroll *,#ymobile .ys-scroll button,#ymobile .ys-scroll .ys-it{touch-action:pan-y}
#ymobile .ys-scroll input[type=range]{touch-action:none}
.ys-scroll.more>.ys-cue b{pointer-events:auto;cursor:pointer}
.ys-cue b::after{content:"";position:absolute;inset:-12px -16px -4px}

/* -- 26 November 2026: extra inventory, offline shops, Auction House, number pad ------------------- */
.ys-in{height:44px;min-width:0;border-radius:6px;border:1px solid #7d7052;background:#14120e;color:#fff!important;font:15px Tahoma,Arial,sans-serif!important;padding:0 8px;touch-action:auto!important;box-sizing:border-box}
select.ys-in{padding:0 4px}
.ys-btn.gold{background:linear-gradient(#7a6535,#3d3119)}
/* the left panel's bars (shop name / time / Yang to collect; the new shop's name, time and button) */
.ys-actbar,.ys-actfoot{flex:none;display:flex;align-items:center;gap:6px;min-width:0}
.ys-actbar[hidden],.ys-actfoot[hidden]{display:none}
.ys-actbar .ys-btn,.ys-actfoot .ys-btn{min-height:40px;padding:0 12px;font-size:14px!important;flex:none}
.ys-actbar input.ys-in{flex:1 1 120px;height:40px}.ys-actbar select.ys-in{flex:0 1 190px;height:40px}
.ys-shopinfo{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.2}
.ys-shopinfo b{color:#f1d48a;font:bold 15px Georgia,serif;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ys-shopinfo span{color:#cfc3a3;font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ys-shopgold{flex:none;display:flex;flex-direction:column;align-items:flex-end;line-height:1.2}
.ys-shopgold span{color:#cfc3a3;font-size:12px}.ys-shopgold b{color:#f1d48a;font-size:14px;white-space:nowrap}
.ys-actfoot{height:34px;padding:0 4px;color:#cfc3a3;font-size:13px}
.ys-actfoot .ys-btn{min-height:32px;height:32px;font-size:13px!important}
.ys-actfoot b{margin-left:auto;color:#f1d48a;font-size:13px;white-space:nowrap}.ys-actfoot span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* cells of a panel: price tags of a shop's lines, dimmed lines, locked cells, the pages' borders */
.ys-it em{position:absolute;left:2px;top:1px;font:bold 10.5px Tahoma,Arial,sans-serif;font-style:normal;color:#ffd56a;text-shadow:1px 1px 0 #000,-1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000;white-space:nowrap;pointer-events:none}
.ys-it.dim{opacity:.45}
.ys-lock{position:absolute;width:var(--c,52px);height:var(--c,52px);background:repeating-linear-gradient(45deg,rgba(90,30,24,.5) 0 5px,rgba(20,10,8,.55) 5px 10px);pointer-events:none}
.ys-acells.pages{background-image:linear-gradient(#4d4431 1px,transparent 1px),linear-gradient(90deg,#4d4431 1px,transparent 1px),linear-gradient(#a79467 2px,transparent 2px),linear-gradient(90deg,#a79467 2px,transparent 2px);
 background-size:var(--c,52px) var(--c,52px),var(--c,52px) var(--c,52px),var(--pw,100%) var(--ph,100%),var(--pw,100%) var(--ph,100%)}
.ys-eqtabs .ys-tab{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.ys-ekwbtn{flex:none;min-width:0;padding:0 10px;font-size:13px!important;background:linear-gradient(#4a4a5f,#26263a)}
.ys-ekwbtn[hidden]{display:none}
.ys-acts.more{grid-template-columns:1fr!important;align-content:start;overflow-y:auto;touch-action:pan-y}
.ys-acts .hint small{color:#cfc3a3;font-weight:normal}
.ys-inv.acting .ys-actbox{align-self:stretch}
.ys-toast{position:absolute;left:50%;bottom:calc(var(--sb) + 46px);transform:translateX(-50%);z-index:5;max-width:min(86%,560px);padding:8px 14px;border-radius:8px;background:rgba(10,9,7,.95);
 box-shadow:inset 0 0 0 1px #a79467,0 4px 14px #000;color:#ffd9a0;font:14px Tahoma,Arial,sans-serif;text-align:center;pointer-events:none}
.ys-toast[hidden]{display:none}

/* number pad */
.ys-pad{position:absolute;inset:0;z-index:13;display:grid;place-items:center;pointer-events:auto;touch-action:none;background:rgba(0,0,0,.6);
 padding:calc(var(--st) + 6px) calc(var(--sr) + 8px) calc(var(--sb) + 6px) calc(var(--sl) + 8px);box-sizing:border-box;font:15px/1.3 Tahoma,Verdana,Arial,sans-serif;text-shadow:none;color:#e9dfc4}
.ys-pad[hidden],.ys-pad.under{display:none}
.ys-padbox{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:minmax(0,1fr) auto;gap:8px 12px;width:min(100%,720px);height:min(100%,372px);max-height:100%;padding:10px;box-sizing:border-box;border-radius:10px;
 background:rgba(14,12,9,.98);box-shadow:inset 0 0 0 1px #000,inset 0 0 0 2px #a79467,0 8px 24px #000}
.ys-padinfo{grid-row:1/3;min-width:0;min-height:0;display:flex;flex-direction:column;gap:6px}
.ys-padinfo h3{margin:0;font:bold 17px Georgia,serif;color:#f1d48a}
.ys-paditem{display:flex;align-items:center;gap:8px;min-height:36px}.ys-paditem i{flex:none;width:36px;height:36px;background:#0b0a08 center/contain no-repeat;border-radius:4px}
.ys-paditem span{font-weight:bold;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ys-padf{display:flex;align-items:center;gap:8px;min-height:46px;padding:0 10px;border-radius:6px;background:#0b0a08;box-shadow:inset 0 0 0 1px #4d4431}
.ys-padf.on{box-shadow:inset 0 0 0 2px #f0d27a}
.ys-padf label{flex:none;color:#cfc3a3;font-size:13px}.ys-padf small{flex:none;color:#cfc3a3}
.ys-padf output{flex:1;min-width:0;text-align:right;font:bold 22px Tahoma,Arial,sans-serif;color:#fff;white-space:nowrap;overflow:hidden}
.ys-padf button{flex:none;width:44px;height:38px;border:0;border-radius:6px;background:linear-gradient(#4a4232,#262219);box-shadow:inset 0 0 0 1px #000,inset 0 0 0 2px #7d7052;color:#f3e7c6!important;font:bold 22px Tahoma,Arial,sans-serif!important}
.ys-padsub{margin:0;min-height:18px;color:#f1d48a;font-size:13.5px;text-align:right}
.ys-padchips{display:flex;flex-wrap:wrap;gap:5px}
.ys-padchips button{flex:1 1 30%;min-height:40px;padding:2px 6px;border:0;border-radius:6px;background:linear-gradient(#3b3529,#1d1a14);box-shadow:inset 0 0 0 1px #000,inset 0 0 0 2px #6f6347;color:#efe6cf!important;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.15}
.ys-padchips small{font:11px Tahoma,Arial,sans-serif;color:#cfc3a3}.ys-padchips b{font:bold 13.5px Tahoma,Arial,sans-serif;color:#ffd56a}
.ys-padlines{flex:1 1 0;min-height:0;font-size:12.5px;color:#cfc3a3}.ys-padlines p{margin:0 0 2px}.ys-padlines[hidden]{display:none}
.ys-padkeys{display:grid;grid-template-columns:repeat(4,minmax(54px,64px));grid-auto-rows:minmax(44px,1fr);gap:6px;align-self:stretch}
.ys-padkeys button{border:0;border-radius:8px;background:linear-gradient(#4a4232,#262219);box-shadow:inset 0 0 0 1px #000,inset 0 0 0 2px #a79467;color:#fff!important;font:bold 21px Tahoma,Arial,sans-serif!important;min-height:44px}
.ys-padkeys button.w2{grid-column:span 2}
.ys-padkeys button:active,.ys-padchips button:active{box-shadow:inset 0 0 0 1px #000,inset 0 0 0 2px #f0d27a,0 0 10px rgba(240,210,122,.6)}
.ys-padbtns{display:flex;gap:6px}.ys-padbtns .ys-btn{flex:1;min-height:46px}
@media (orientation:portrait){
 .ys-padbox{grid-template-columns:1fr;grid-template-rows:auto auto auto;width:min(100%,420px);height:auto;overflow-y:auto;touch-action:pan-y}
 .ys-padinfo{grid-row:auto}.ys-padlines{flex:none;max-height:20vh}
 .ys-padkeys{grid-template-columns:repeat(4,1fr);grid-auto-rows:52px}
}
@media (orientation:landscape) and (max-height:380px){.ys-padkeys{grid-auto-rows:minmax(40px,1fr)}.ys-padkeys button{min-height:40px}.ys-padf{min-height:40px}.ys-padbtns .ys-btn{min-height:42px}}

/* Auction House */
.ys-ah .ys-body{position:relative}
.ys-ahw{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;gap:6px}
.ys-ahbar{flex:none;display:flex;gap:6px}
.ys-ahbar input{flex:2 1 160px}.ys-ahbar select{flex:1 1 110px}
.ys-ahlock{flex:none;display:flex;align-items:center;gap:8px;padding:2px 2px 2px 10px;border-radius:6px;background:rgba(40,60,34,.6);color:#9be29b;font-size:13.5px}
.ys-ahlock[hidden]{display:none}.ys-ahlock span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ys-ahlock .ys-btn{min-height:34px;padding:0 12px}
.ys-ahlist{flex:1;min-height:0;display:flex;flex-direction:column;gap:4px}
.ys-ahrow{flex:none;display:flex;align-items:center;gap:8px;height:var(--rh,52px);min-height:44px;box-sizing:border-box;padding:2px 6px;border-radius:6px;background:rgba(16,14,11,.92);box-shadow:inset 0 0 0 1px #4d4431}
.ys-ahrow i{flex:none;width:40px;height:40px;background:#0b0a08 center/contain no-repeat;border-radius:4px;box-shadow:inset 0 0 0 1px #6b5b3a}
.ys-ahrow .nm{flex:1 1 0;min-width:0;display:flex;flex-direction:column;line-height:1.2}
.ys-ahrow .nm b{color:#fff;font-size:14.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ys-ahrow .nm small{color:#8fd6ff;font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ys-ahrow .ct{flex:none;width:52px;text-align:right;color:#e9dfc4;font-weight:bold}
.ys-ahrow .sl{flex:0 1 120px;min-width:0;color:#cfc3a3;font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ys-ahrow .pr{flex:none;min-width:96px;display:flex;flex-direction:column;align-items:flex-end;line-height:1.2}
.ys-ahrow .pr b{color:#ffd56a;font-size:14.5px}.ys-ahrow .pr small{color:#cfc3a3;font-size:11.5px}
.ys-ahrow .ys-btn{flex:none;min-height:40px;height:calc(100% - 6px);min-width:64px;padding:0 12px}
@media (orientation:portrait){.ys-ahrow{height:auto;min-height:56px}.ys-ahrow .ys-btn{height:44px}}
.ys-ahfoot{flex:none;display:flex;align-items:center;gap:6px;min-height:40px}
.ys-ahfoot .ys-tab{height:38px;min-width:44px}.ys-ahfoot .ys-tab[disabled]{opacity:.4}
.ys-ahfoot .pg{min-width:64px;text-align:center;font-weight:bold;color:#fff}
.ys-ahfoot .st{margin-left:auto;color:#cfc3a3;font-size:13px}.ys-ahfoot .gd{color:#f1d48a;font-weight:bold;font-size:14px;white-space:nowrap}
.ys-ahitem{position:absolute;inset:0;z-index:4;display:grid;place-items:center;background:rgba(0,0,0,.55);pointer-events:auto}
.ys-ahitem[hidden]{display:none}
.ys-ahitem .ys-item{width:min(100%,620px);max-width:none;max-height:100%;flex-direction:row;gap:10px}
.ys-ahitem .ys-lines{flex:1 1 0;min-width:0;align-self:stretch}
.ys-ahitem .ys-acts{flex:0 0 clamp(160px,38%,220px);grid-template-columns:1fr;align-content:start;overflow-y:auto;touch-action:pan-y}
@media (orientation:portrait){
 .ys-ahbar{flex-wrap:wrap}.ys-ahbar input{flex:1 1 100%}
 .ys-ahrow{flex-wrap:wrap}.ys-ahrow .sl{display:none}.ys-ahrow .nm{flex-basis:50%}
 .ys-ahitem .ys-item{flex-direction:column}.ys-ahitem .ys-acts{flex:none}
 .ys-ahfoot{flex-wrap:wrap}
}
@media (max-width:719px){.ys-ahrow .sl{display:none}.ys-ahrow .pr{min-width:84px}}
/* the description over the bag (an item of the left panel): its buttons in two columns, the main one across */
@media (orientation:landscape) and (max-width:1099px){
 .ys-inv.selleft:not(.side) .ys-item .ys-acts{display:flex;flex-wrap:wrap;max-height:62%;overflow-y:auto;touch-action:pan-y}
 .ys-inv.selleft:not(.side) .ys-item .ys-acts .hint,.ys-inv.selleft:not(.side) .ys-item .ys-acts .ys-btn.gold{flex:1 1 100%}
 .ys-inv.selleft:not(.side) .ys-item .ys-acts .ys-btn{flex:1 1 40%}
 .ys-inv.selleft:not(.side) .ys-item .ys-acts.more .ys-btn{flex:1 1 100%;min-height:42px}
}
/* choosing a place or a target (move, use on an item, a split part): only a strip with the hint and "cancel",
   over the scene's title - nothing lies over the cells to tap */
.ys-inv.picking:not(.side) .ys-mid{position:absolute;z-index:6;left:calc(var(--sl) + 8px)!important;right:calc(var(--sr) + var(--c,52px) * 5 + 96px)!important;top:calc(var(--st) + 6px)!important;bottom:auto!important;
 width:auto!important;height:52px;align-items:stretch}
.ys-inv.picking:not(.side) .ys-item{flex-direction:row!important;align-items:center;gap:8px;padding:4px 8px;max-width:none;width:100%}
.ys-inv.picking:not(.side) .ys-item .ys-lines,.ys-inv.picking:not(.side) .ys-item .ys-ix{display:none}
.ys-inv.picking:not(.side) .ys-item .ys-acts{flex:1!important;display:flex;align-items:center;gap:8px;max-height:none;overflow:visible}
.ys-inv.picking:not(.side) .ys-item .ys-acts .hint{flex:1;min-width:0;text-align:left;font-size:13.5px;line-height:1.2}
.ys-inv.picking:not(.side) .ys-item .ys-acts .ys-btn{flex:none;min-height:40px;padding:0 14px}
.ys-inv.picking .ys-ekwbtn{visibility:hidden}
@media (orientation:portrait){
 .ys-inv.picking:not(.side) .ys-mid{left:8px!important;right:8px!important;top:auto!important;bottom:calc(var(--sb) + 4px)!important;height:auto;min-height:50px}
}
.ys-editbtn.on{background:linear-gradient(#2f5a34,#17301b);box-shadow:inset 0 0 0 1px #000,inset 0 0 0 2px #8fe08f}
@media (max-width:759px){.ys-actbar.k-myshop .ys-editbtn{display:none}.ys-actbar .ys-btn{padding:0 9px}}
/* Auction House held upright: the name on its own line, amount / price / button under it; the description above the buttons */
@media (orientation:portrait){
 .ys-ahrow{flex-wrap:wrap;height:auto;min-height:0;row-gap:2px;padding:4px 6px}
 .ys-ahrow .nm{flex:1 1 calc(100% - 60px)}
 .ys-ahrow .ct{order:2;width:auto;margin-left:48px;text-align:left}
 .ys-ahrow .pr{order:3;margin-left:auto;flex-direction:row;align-items:baseline;gap:8px}
 .ys-ahrow .ys-btn{order:4;height:40px;min-height:40px}
 .ys-ahitem .ys-lines{flex:0 1 auto;max-height:38vh;align-self:stretch}
 .ys-ahfoot .st{margin-left:0;flex:1 1 40%}.ys-ahfoot .gd{flex:1 1 40%;text-align:right}
}
