/* Approved PC red/gold shop. Shared layout for desktop and portrait browsers. */
body.ingame dialog.ktc-window.ktc-pc{position:fixed;inset:auto;margin:0;padding:0 11px 9px;max-width:none;min-width:0;min-height:0;overflow:hidden;border:1px solid #a58b46!important;border-radius:2px;background:#141711!important;box-shadow:inset 0 0 0 2px #46381f,inset 0 0 0 4px #0b100b,0 12px 35px #0008;color:#e5d6a6;font:13px/1.4 'TG Vietnamese Serif',Georgia,serif;-webkit-text-size-adjust:none;text-size-adjust:none}
body.ingame dialog.ktc-pc[open]{display:flex;flex-direction:column}
body.ingame .ktc-pc *,body.ingame .ktc-item-dialog *{box-sizing:border-box}
body.ingame .ktc-pc button,body.ingame .ktc-item-dialog button{cursor:pointer;touch-action:manipulation;border:1px solid #8a713d;border-radius:2px;background:linear-gradient(#382b1b,#201a11);color:#e7d89f;font:inherit;text-shadow:1px 1px #000;margin:0}
body.ingame .ktc-pc>header{position:relative;display:flex;align-items:flex-start;justify-content:center;flex:none;height:38px;min-height:38px;margin:-1px -12px 0;padding:0 40px;border:0;background:url('assets/ui/ktc-pc/header-pc-v2.png') center top/100% 34px no-repeat}
body.ingame .ktc-pc>header h2{margin:0;padding:0;min-width:0;white-space:nowrap;font:600 17px/30px 'TG Vietnamese Serif',Georgia,serif;color:#f3d77b;text-shadow:0 1px #000,1px 1px 2px #000}
body.ingame .ktc-pc>header [data-shop-close]{position:absolute;right:4px;top:3px;display:grid;place-items:center;width:30px;height:30px;min-height:30px;padding:0;border-radius:50%;font:22px/22px Georgia,serif;background:#170e0bcc;color:#f2d187;border-color:#9d7e40;box-shadow:inset 0 0 0 2px #28150e}
body.ingame .ktc-pc .ktc-wallet{display:flex;flex:none;align-items:center;justify-content:space-between;gap:8px;padding:7px 1px;border-bottom:1px solid #776332;background:none}
body.ingame .ktc-pc .ktc-wallet>span{display:flex;align-items:center;gap:6px;min-width:0;font-size:12px}
body.ingame .ktc-pc .ktc-wallet canvas{display:block;width:23px;height:23px;flex:none;image-rendering:pixelated}
body.ingame .ktc-pc .ktc-wallet b{display:inline;color:#f0e25c;font-size:17px;line-height:24px;font-weight:600;font-variant-numeric:tabular-nums}
body.ingame .ktc-pc .ktc-wallet small{color:#c2bd9a;font-size:11px}
body.ingame .ktc-pc .ktc-wallet>button{width:auto;flex:none;min-height:29px;padding:2px 10px;font-size:12px}
body.ingame .ktc-pc .ktc-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));flex:none;gap:3px 2px;margin:0 0 6px;padding:7px 0 6px;border-bottom:1px solid #624824}
body.ingame .ktc-pc .ktc-tabs button{display:flex;align-items:center;justify-content:center;width:auto;height:30px;min-width:0;min-height:30px;padding:0 1px;border:4px solid transparent;border-image:url('assets/ui/ktc-pc/tab-pc-idle-v2.png') 8 fill stretch;border-radius:0;background:none;box-shadow:none;white-space:nowrap;font-size:11px;font-weight:600;line-height:15px;color:#d9bd7f}
body.ingame .ktc-pc .ktc-tabs button[aria-selected=true]{border-image-source:url('assets/ui/ktc-pc/tab-pc-active-v2.png');color:#ffe3a0;background:none}
body.ingame .ktc-pc .ktc-tabs small{display:none}
body.ingame .ktc-pc .ktc-tabs button:hover{filter:brightness(1.16)}
body.ingame .ktc-pc .ktc-search{display:flex;flex:none;align-items:center;gap:6px;min-height:31px;padding:0 8px;margin:0;border:1px solid #645a37;background:#060b07}
body.ingame .ktc-pc .ktc-search>span{position:relative;width:12px;height:12px;flex:none;margin:0 4px 2px 1px;border:2px solid #d8bc63;border-radius:50%}
body.ingame .ktc-pc .ktc-search>span:after{content:'';position:absolute;width:7px;height:2px;right:-6px;bottom:-3px;transform:rotate(45deg);transform-origin:left center;background:#d8bc63}
body.ingame .ktc-pc .ktc-search input{width:100%;min-width:0;min-height:29px;padding:0;border:0;background:none;color:#e7dfbe;font:16px/29px 'TG Vietnamese Serif',Georgia,serif;outline:0}
body.ingame .ktc-pc .ktc-search input::-webkit-search-cancel-button{display:none}
body.ingame .ktc-pc .ktc-search button{min-height:28px;padding:0 4px;border:0;background:none;font-size:20px}
body.ingame .ktc-pc [hidden]{display:none!important}
body.ingame .ktc-pc .ktc-results{display:flex;flex:none;align-items:center;justify-content:space-between;padding:6px 1px 4px;font-size:10px;line-height:14px;color:#cdb76c}
body.ingame .ktc-pc .ktc-results small{font-size:10px;color:#8b947c}
body.ingame .ktc-pc .ktc-goods{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;flex:0 1 auto;gap:5px;min-height:0;margin:0;padding:0;overflow:hidden auto;overscroll-behavior:contain;scrollbar-width:thin}
body.ingame .ktc-pc .ktc-good{position:relative;display:block;flex:none;min-width:0;min-height:95px;height:95px;margin:0;padding:6px;border:1px solid #454a33;border-radius:3px;background:linear-gradient(145deg,#1b1e17,#090d0a);box-shadow:inset 0 0 0 1px #090d08}
body.ingame .ktc-pc .ktc-good-info{text-align:left;min-width:0}
body.ingame .ktc-pc .ktc-good h3{display:block;min-height:0;height:30px;margin:0;font-size:11px;line-height:15px}
body.ingame .ktc-pc .ktc-good h3 button{display:block;width:100%;height:30px;min-height:0;padding:0;border:0;background:none!important;box-shadow:none;text-align:left;align-content:start;overflow:hidden;font-size:11px;line-height:15px;font-weight:600;color:#e8deaa;overflow-wrap:anywhere}
body.ingame .ktc-pc .ktc-good-body{display:flex;align-items:center;gap:7px;margin-top:3px;min-width:0}
body.ingame .ktc-pc .ktc-good .ktc-good-icon{display:grid;place-items:center;flex:none;width:38px;height:38px;min-height:38px;margin:0;padding:2px;border:1px solid #746331;border-radius:0;background:radial-gradient(#29301e,#080d09);box-shadow:none}
body.ingame .ktc-pc .ktc-good-icon canvas{display:block;width:32px;height:32px;max-width:100%;max-height:100%;object-fit:contain;image-rendering:pixelated}
body.ingame .ktc-pc .ktc-good-price{align-self:start;min-width:0;line-height:15px}
body.ingame .ktc-pc .ktc-good-price span{display:block;font:10px/15px Arial,sans-serif;color:#aaa98f}
body.ingame .ktc-pc .ktc-good-price strong{display:block;font-size:12px;line-height:15px;font-weight:600;color:#79ede0;white-space:nowrap}
body.ingame .ktc-pc [data-shop-owned]{position:absolute;right:6px;top:39px;max-width:50%;overflow:hidden;white-space:nowrap;font:9px/12px Arial,sans-serif;color:#8e997e}
/* Shared dialog rules contain #systemDialog inside :is(), giving them ID
   specificity for every matched dialog. Scope this real text label to #app. */
html body.ingame #app dialog.ktc-pc button.ktc-buy[data-buy]{position:absolute;right:4px;bottom:2px;display:grid;place-items:center;width:53px;height:30px;min-height:30px;margin:0;padding:0;border:1px solid #d7ad66;border-radius:3px;background:linear-gradient(#b5442d,#7a1c15 50%,#50100d);color:#fff0b8;font:600 12px/26px Tahoma,Arial,sans-serif;text-align:center;text-shadow:1px 1px #310500;box-shadow:inset 0 0 0 1px #54150d,inset 0 2px 1px #e68b4c66}
html body.ingame #app dialog.ktc-pc button.ktc-buy[data-buy]:hover:not(:disabled){background:linear-gradient(#d15c36,#9e291c 50%,#661510);color:#fff6d4;border-color:#ffe09a}
body.ingame .ktc-pc .ktc-empty{grid-column:1/-1;padding:26px 8px;text-align:center;font-size:12px;color:#bdb48d}
body.ingame .ktc-pc .ktc-pages{display:grid;grid-template-columns:38px 58px minmax(0,1fr) 58px 38px;align-items:center;flex:none;gap:5px;margin-top:8px;padding:8px 0 0;border-top:1px solid #5d5633}
body.ingame .ktc-pc .ktc-pages button{width:auto;min-width:0;height:28px;min-height:28px;padding:2px;font-size:11px;text-align:center}
body.ingame .ktc-pc .ktc-pages b{text-align:center;font-size:12px;font-weight:400;color:#e1d86a;white-space:nowrap}
body.ingame .ktc-pc>footer{flex:none;min-height:20px;max-height:42px;margin:0;padding:7px 0 0;overflow:auto;border:0;background:none;text-align:center;font:10px/15px Arial,sans-serif;color:#a9ad94;overflow-wrap:anywhere}
body.ingame .ktc-pc button:disabled{opacity:.38;cursor:default}
body.ingame .ktc-pc button:focus-visible,body.ingame .ktc-item-dialog :is(button,input):focus-visible{outline:2px solid #ffe297;outline-offset:1px}
body.ingame dialog.ktc-item-dialog{box-sizing:border-box;position:fixed;inset:auto;margin:0;padding:24px 16px 14px;max-width:none;overflow:auto;overscroll-behavior:contain;background:linear-gradient(135deg,#282217,#0b100b);border:1px solid #bfa358;border-radius:3px;box-shadow:inset 0 0 0 2px #45381e;color:#e5d6a6;text-align:center;font:12px/1.6 'TG Vietnamese Serif',Georgia,serif;-webkit-text-size-adjust:none;text-size-adjust:none}
body.ingame .ktc-item-dialog::backdrop,body.ingame .ktc-pc::backdrop{background:#0009}
body.ingame .ktc-item-dialog h2{margin:0 14px 12px;font-size:16px;line-height:1.5;color:#f3dc8c;overflow-wrap:anywhere}
body.ingame .ktc-item-dialog p{margin:9px 0}
body.ingame .ktc-item-dialog .ktc-item-description{white-space:pre-line;overflow-wrap:anywhere}
body.ingame .ktc-item-dialog .ktc-item-icon{display:grid;place-items:center;width:54px;height:54px;margin:auto}
body.ingame .ktc-item-dialog canvas{display:block;width:48px;height:48px;max-width:100%;max-height:100%;object-fit:contain;image-rendering:pixelated}
body.ingame .ktc-item-dialog .ktc-item-close{position:absolute;right:5px;top:4px;width:28px;height:28px;min-height:28px;padding:0;font:23px/26px Georgia,serif}
body.ingame .ktc-item-dialog label{display:flex;align-items:center;justify-content:center;gap:8px;margin:12px 0 6px}
body.ingame .ktc-item-dialog input{width:85px;min-width:0;height:36px;padding:5px;border:1px solid #a68b43;border-radius:2px;background:#080e08;color:#f6e6ba;text-align:center;font:16px/24px 'TG Vietnamese Serif',Georgia,serif}
body.ingame .ktc-item-dialog strong{color:#85e5d9}
body.ingame .ktc-item-dialog .ktc-item-actions{display:flex;gap:7px;margin-top:14px}
body.ingame .ktc-item-dialog .ktc-item-actions button{flex:1;min-width:0;min-height:36px;padding:4px 5px;font-size:12px}
body.ingame .ktc-item-dialog .ktc-item-actions button:first-child{background:linear-gradient(#8e2f24,#4d140f);border-color:#e0bd75}
body.ingame .ktc-item-dialog .ktc-item-error{color:#ff987e;overflow-wrap:anywhere}
body.ingame .ktc-item-dialog .ktc-item-error:empty{display:none}
body.ingame .ktc-item-dialog :disabled{opacity:.5;cursor:wait}
body.ingame .ktc-pc.ktc-compact>header{height:32px;min-height:32px}
body.ingame .ktc-pc.ktc-compact .ktc-wallet{padding-block:3px}
body.ingame .ktc-pc.ktc-compact .ktc-tabs{padding-block:3px;margin-bottom:3px}
body.ingame .ktc-pc.ktc-compact .ktc-tabs button{height:26px;min-height:26px}
body.ingame .ktc-pc.ktc-compact .ktc-results{padding-block:3px}
body.ingame .ktc-pc.ktc-compact .ktc-pages{margin-top:4px;padding-top:4px}
body.ingame .ktc-pc.ktc-compact>footer{padding-top:4px;max-height:30px}
@media(max-width:350px){body.ingame .ktc-pc .ktc-tabs button{font-size:10px}body.ingame .ktc-pc .ktc-pages{grid-template-columns:32px 50px minmax(0,1fr) 50px 32px;gap:4px}body.ingame .ktc-pc>header h2{font-size:16px}body.ingame .ktc-pc .ktc-good-body{gap:5px}body.ingame .ktc-pc .ktc-good h3 button{font-size:10px}}
/* User requested removal of the unsolicited search control. */
body.ingame dialog.ktc-pc .ktc-search{display:none}
