refactor(repo)!: move apps, shared packages, and patch definitions

Everything sat in packages/: two programs next to the small libraries
they use, and the patch data loose at the root. The programs now live in
apps/ and the shared libraries in packages/:

  apps/server        the local server (was packages/local-service),
                     package @wto/server
  packages/patcher   builds the game copy (was packages/build),
                     package @wto/patcher
  patches/exe        exe patch definitions (was exe-patches)
  patches/gui        GUI script patches (was gui-patches)

Inside the server, the network layer folder becomes transport/ so it is
not server/server/, the entry module is server.ts, and startLocalService
and its types become startServer, ServerOptions and RunningServer. The
health answer names the app wto-server, and the TLS files in the data
folder are server.key and server.crt (made again on the next start).
Comments, logs and tool texts say "local server".

The patcher no longer reaches into the server's folder. It read the
default tuning/store.jsonc by a relative path to register bundle GUIDs
for the multi-vehicle packs, which also ignored the player's overrides
in <data>/tuning/. It now takes the pack ids from its caller; the
server exports multiVehiclePackIds(dataFolder), which reads them the way
the running server does. rebuildGuiPack takes the patch folder from its
caller as well.

The development build moves out of the patcher to
scripts/build-game-copy.ts, since it uses both the server and the
patcher. It needs --data (the folder the server will run with) and
defaults the patch folders and the hook library to this repository.


Checked with the root typecheck, check-patches, check-gui,
check-offsets, the native build, a run of build-game-copy.ts into a
scratch folder (12 exe patches, 35 GUI patches, 496 bundle GUIDs as
before) and a server start from apps/server answering wto-server.

BREAKING CHANGE: Use @wto/server and @wto/patcher from the new workspace paths. Run the development build with scripts/build-game-copy.ts and pass --data.
This commit is contained in:
N0VAN0M4LY committed 2026-11-29 03:20:54 +08:00
1 parent 9c813ccf7d
commit 930ea07630
476 files changed
+275 -251

No files matched your search

+227
View File
@@ -0,0 +1,227 @@
// Local marketplace page (implementation notes; layout after the official Gaijin Market,
// implementation notes), shown in the game's built-in browser.
// The game opens it as <marketplaceURL>?a=<app id>[&viewitem&n=<market_hash_name>] (inventoryClient.nut);
// with `n` the page opens that item's card directly.
'use strict';
const T = {
zh: {
toStore: '前往商城', eagles: '金鹰', filters: '筛选', itemType: '物品类型', country: '国家', vehicleClass: '适用于',
heldOnly: '只看我的库存', search: '搜索', sortPopular: '人气', sortName: '名称(从 A 到 Z)', sortPriceAsc: '价格(从低到高)', sortPriceDesc: '价格(从高到低)',
catVehicle: '载具', catSkin: '涂装', catAttachable: '装饰挂件', catDecal: '贴花', catUnlock: '头像',
allCountries: '全部国家', allClasses: '全部', rank: '{rank} 级', from: '从', held: '库存 ×{n}', owned: '已拥有',
buy: '购买', freeBuy: '老福爷付过了', sell: '出售', pickAccount: '请先在右上角选择账号', empty: '没有符合条件的物品',
buyPrice: '系统售价:<b>{price}</b> GJN', sellPrice: '卖给系统:<b>{price}</b> GJN(扣 {fee}% 手续费)', youHave: '你拥有:<b>{n}</b>',
tradeUnconfirmed: '无法确认交易结果,请先查看余额和库存。',
tagType: '物品类型', tagRarity: '稀有度', tagCountry: '国家', ticker: '离线交易所:按固定价格与系统交易,价格取自官方交易所快照。',
},
en: {
toStore: 'Store', eagles: 'Golden Eagles', filters: 'Filters', itemType: 'Item type', country: 'Country', vehicleClass: 'Vehicle type',
heldOnly: 'Only my inventory', search: 'Search', sortPopular: 'Popular', sortName: 'Name (A to Z)', sortPriceAsc: 'Price (low to high)', sortPriceDesc: 'Price (high to low)',
catVehicle: 'Vehicles', catSkin: 'Camouflages', catAttachable: 'Decorations', catDecal: 'Decals', catUnlock: 'Avatars',
allCountries: 'All countries', allClasses: 'All', rank: 'Rank {rank}', from: 'from', held: 'Owned ×{n}', owned: 'Owned',
buy: 'Buy', freeBuy: '老福爷付过了', sell: 'Sell', pickAccount: 'Pick an account at the top right', empty: 'Nothing matches the filters',
buyPrice: 'System price: <b>{price}</b> GJN', sellPrice: 'Sell to system: <b>{price}</b> GJN ({fee}% fee)', youHave: 'You own: <b>{n}</b>',
tradeUnconfirmed: 'Could not confirm the trade. Check your balance and inventory.',
tagType: 'Item type', tagRarity: 'Rarity', tagCountry: 'Country', ticker: 'Offline market: fixed-price trades with the system, prices from an official market snapshot.',
},
};
const CATEGORIES = [['vehicle', 'catVehicle', '#fd5f2c'], ['skin', 'catSkin', '#8f7ee7'], ['attachable', 'catAttachable', '#8f7ee7'], ['decal', 'catDecal', '#8f7ee7'], ['unlock', 'catUnlock', '#00ced1']];
const CLASS_LABELS = { aircraft: 'mainmenu/type_aircraft', helicopter: 'mainmenu/type_helicopter', tank: 'mainmenu/type_tank', ship: 'mainmenu/type_ship_only', boat: 'mainmenu/type_boat_only' };
const RARITY = { afafa1: ['常见', 'Common'], '14bd3a': ['罕见', 'Uncommon'], '2965ff': ['稀有', 'Rare'], c816c1: ['超稀有', 'Ultra rare'] };
const ROMAN = ['', 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX', 'X'];
const t = (key, params) => WtoUi.tr(T, key, params);
const $ = (id) => document.getElementById(id);
const wantedItem = WtoUi.query.get('n') || '';
let state = { accounts: [], currentUserId: '', balance: { gjnCents: 0, goldenEagles: 0 }, listings: [] };
const activeCats = new Set();
let openedWanted = false;
let tradeNoticeId = 0;
function applyStaticTexts() {
for (const el of document.querySelectorAll('[data-t]')) el.textContent = t(el.dataset.t);
$('searchInput').placeholder = t('search');
$('storeLink').href = WtoUi.pageLink('/store');
const types = $('typeFilters');
for (const [cat, key, color] of CATEGORIES) {
const row = document.createElement('label');
row.className = 'check';
row.innerHTML = '<input type="checkbox" /> <span></span>';
row.querySelector('span').textContent = t(key);
row.querySelector('span').style.color = color;
row.querySelector('input').onchange = (e) => { if (e.target.checked) activeCats.add(cat); else activeCats.delete(cat); renderGrid(); };
types.appendChild(row);
}
const classSelect = $('classFilter');
classSelect.appendChild(new Option(t('allClasses'), ''));
for (const [unitClass, key] of Object.entries(CLASS_LABELS)) classSelect.appendChild(new Option(WtoUi.label(key), unitClass));
}
async function loadState(userId) {
state = await WtoUi.getJson('/trade.gaijin.net/api/state' + (userId ? '?userId=' + encodeURIComponent(userId) : ''));
if (userId && !state.currentUserId) { WtoUi.clearSavedAccount(); return loadState(''); }
WtoUi.fillAccountSelect($('accountSelect'), state.accounts, state.currentUserId);
$('gjnVal').textContent = WtoUi.gjn(state.balance.gjnCents);
$('goldVal').textContent = WtoUi.num(state.balance.goldenEagles);
renderCountries();
renderGrid();
if (wantedItem && !openedWanted) {
openedWanted = true;
const wanted = state.listings.find((l) => l.marketHashName === wantedItem);
if (wanted) openDetail(wanted);
}
}
function renderCountries() {
const select = $('countryFilter');
const previous = select.value;
select.innerHTML = '';
select.appendChild(new Option(t('allCountries'), ''));
for (const country of [...new Set(state.listings.map((l) => l.country).filter(Boolean))]) select.appendChild(new Option(WtoUi.label(country), country, false, country === previous));
}
function matches(listing) {
const query = $('searchInput').value.trim().toLowerCase();
if (activeCats.size && !activeCats.has(listing.category)) return false;
if ($('countryFilter').value && listing.country !== $('countryFilter').value) return false;
if ($('classFilter').value && listing.unitClass !== $('classFilter').value) return false;
if ($('heldOnly').checked && !listing.couponCount) return false;
return !query || [listing.title.zh, listing.title.en, listing.marketHashName, String(listing.itemdefId)].some((s) => (s || '').toLowerCase().includes(query));
}
function sorted(listings) {
const mode = $('sortSelect').value;
const copy = [...listings];
if (mode === 'name') copy.sort((a, b) => WtoUi.text(a.title).localeCompare(WtoUi.text(b.title)));
if (mode === 'priceAsc') copy.sort((a, b) => a.gjnCostCents - b.gjnCostCents);
if (mode === 'priceDesc') copy.sort((a, b) => b.gjnCostCents - a.gjnCostCents);
return copy;
}
function listingImage(listing, className) {
return listing.category === 'vehicle' ? WtoUi.vehicleImg(listing.targetKey, className) : WtoUi.itemImg(listing.category, listing.targetKey, className);
}
function renderGrid() {
const grid = $('grid');
grid.innerHTML = '';
const listings = sorted(state.listings.filter(matches));
if (!listings.length) grid.innerHTML = '<div class="empty">' + WtoUi.escapeHtml(t('empty')) + '</div>';
for (const listing of listings) grid.appendChild(lotCard(listing));
}
function lotCard(listing) {
const card = document.createElement('a');
card.className = 'lot' + (listing.marketHashName === wantedItem ? ' highlight' : '');
const color = '#' + (listing.nameColor || 'afafa1');
card.innerHTML = '<div class="rarity"></div><div class="lot-image"></div><div class="lot-meta"><div class="project"></div><div class="lot-name"></div></div><div class="lot-stats"></div>';
card.querySelector('.rarity').style.background = 'linear-gradient(180deg, ' + color + ', transparent)';
card.querySelector('.lot-image').appendChild(listingImage(listing, ''));
const project = card.querySelector('.project');
if (listing.country) project.appendChild(WtoUi.iconImg('flag', listing.country, ''));
project.appendChild(document.createTextNode(listing.rank ? 'War Thunder · ' + t('rank', { rank: ROMAN[listing.rank] || listing.rank }) : 'War Thunder'));
card.querySelector('.lot-name').textContent = WtoUi.text(listing.title);
const stats = card.querySelector('.lot-stats');
if (listing.couponCount) stats.appendChild(Object.assign(document.createElement('div'), { className: 'lot-held', textContent: t('held', { n: listing.couponCount }) }));
else if (listing.alreadyActivated) stats.appendChild(Object.assign(document.createElement('div'), { className: 'lot-held', textContent: t('owned') }));
const price = document.createElement('div');
price.className = 'lot-price';
price.innerHTML = '<small></small><span></span> GJN';
price.querySelector('small').textContent = t('from');
price.querySelector('span').textContent = WtoUi.gjn(listing.gjnCostCents);
stats.appendChild(price);
card.onclick = () => openDetail(listing);
return card;
}
function tag(text, color, extraClass) {
const el = Object.assign(document.createElement('span'), { className: 'tag' + (extraClass ? ' ' + extraClass : ''), textContent: text });
if (color) el.style.background = color;
return el;
}
function openDetail(listing) {
const color = '#' + (listing.nameColor || 'afafa1');
const detail = $('detail');
detail.style.setProperty('--glow', color);
detail.innerHTML = '<div class="detail-glow"></div><button class="detail-close">×</button><h2 class="detail-title"></h2>'
+ '<div class="detail-info"><div class="detail-image"></div><div class="detail-side"><div class="tags"></div><div class="detail-desc"></div></div></div>'
+ '<div class="orders"><div class="sell-col"></div><div class="buy-col"></div></div><div class="ticker"></div>';
detail.querySelector('.detail-title').textContent = WtoUi.text(listing.title);
detail.querySelector('.detail-image').appendChild(listingImage(listing, ''));
const tags = detail.querySelector('.tags');
tags.appendChild(tag('War Thunder', '', 'game'));
const cat = CATEGORIES.find((c) => c[0] === listing.category);
if (cat) tags.appendChild(tag(t('tagType') + ': ' + t(cat[1]), cat[2]));
const rarity = RARITY[(listing.nameColor || '').toLowerCase()];
if (rarity) tags.appendChild(tag(t('tagRarity') + ': ' + (WtoUi.lang === 'zh' ? rarity[0] : rarity[1]), color));
if (listing.country) tags.appendChild(tag(t('tagCountry') + ': ' + WtoUi.label(listing.country), '#68838c'));
detail.querySelector('.detail-desc').textContent = WtoUi.text(listing.subtitle);
fillOrderColumns(detail, listing);
detail.querySelector('.ticker').textContent = t('ticker');
detail.querySelector('.detail-close').onclick = closeDetail;
$('modal').hidden = false;
}
function fillOrderColumns(detail, listing) {
const fee = Math.round(state.sellFeeRate * 100);
const sellCol = detail.querySelector('.sell-col');
const buyCol = detail.querySelector('.buy-col');
const noAccount = !state.currentUserId;
const sellBtn = Object.assign(document.createElement('button'), { className: 'big sell', textContent: t('sell'), disabled: noAccount || !listing.couponCount });
sellBtn.onclick = () => trade('/trade.gaijin.net/api/sell', { itemdefId: listing.itemdefId, quantity: 1 }, listing);
sellCol.append(sellBtn, html('totals', t('sellPrice', { price: WtoUi.gjn(listing.sellCents), fee })), html('totals', t('youHave', { n: listing.couponCount || 0 })));
const buyBtn = Object.assign(document.createElement('button'), { className: 'big buy', textContent: noAccount ? t('pickAccount') : t('buy'), disabled: noAccount });
buyBtn.onclick = () => trade('/trade.gaijin.net/api/buy', { itemdefId: listing.itemdefId, quantity: 1, payMethod: 'gjn' }, listing);
const freeBtn = Object.assign(document.createElement('button'), { className: 'big free', textContent: t('freeBuy'), disabled: noAccount });
freeBtn.onclick = () => trade('/trade.gaijin.net/api/buy', { itemdefId: listing.itemdefId, quantity: 1, payMethod: 'free' }, listing);
buyCol.append(buyBtn, freeBtn, html('totals', t('buyPrice', { price: WtoUi.gjn(listing.gjnCostCents) })));
}
function html(className, markup) {
const el = document.createElement('div');
el.className = className;
el.innerHTML = markup;
return el;
}
function closeDetail() { $('modal').hidden = true; }
async function trade(url, body, listing) {
const notice = $('notice');
const noticeId = ++tradeNoticeId;
notice.textContent = '';
notice.className = 'notice';
const showResult = (message, ok) => {
if (noticeId === tradeNoticeId) WtoUi.showNotice(notice, message, ok);
};
let result;
try {
result = await WtoUi.postJson(url, { userId: state.currentUserId, ...body });
} catch {
showResult(t('tradeUnconfirmed'), false);
return;
}
const message = WtoUi.text(result?.message);
if (typeof result?.ok !== 'boolean' || typeof message !== 'string' || !message) {
showResult(t('tradeUnconfirmed'), false);
return;
}
showResult(message, result.ok);
await loadState(state.currentUserId);
const fresh = state.listings.find((l) => l.itemdefId === listing.itemdefId);
if (fresh && !$('modal').hidden) openDetail(fresh);
}
$('modal').onclick = (event) => { if (event.target === $('modal')) closeDetail(); };
$('accountSelect').onchange = (event) => { WtoUi.saveAccount(event.target.value); loadState(event.target.value); };
for (const id of ['countryFilter', 'classFilter', 'sortSelect', 'heldOnly']) $(id).onchange = renderGrid;
$('searchInput').oninput = renderGrid;
Promise.all([WtoUi.loadLabels(), WtoUi.loadImageSources()]).then(() => {
applyStaticTexts();
return loadState(WtoUi.savedAccount());
});
+58
View File
@@ -0,0 +1,58 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Gaijin Market · WTOffline</title>
<link rel="stylesheet" href="/trade.gaijin.net/styles.css" />
</head>
<body>
<header class="head">
<div class="logo"><span class="logo-top">Gaijin.Net</span><span class="logo-main">MARKET</span></div>
<nav class="nav">
<a class="nav-item" id="storeLink" data-t="toStore"></a>
<span class="nav-item wallet"><span class="coin"></span><b id="gjnVal">0</b></span>
<span class="nav-item muted"><span data-t="eagles"></span> <b id="goldVal">0</b></span>
<select id="accountSelect" class="nav-select"></select>
</nav>
</header>
<div class="layout">
<aside class="filters">
<div class="filters-caption" data-t="filters"></div>
<div class="filter-group">
<h3 data-t="itemType"></h3>
<div id="typeFilters"></div>
</div>
<div class="filter-group">
<h3 data-t="country"></h3>
<select id="countryFilter"></select>
</div>
<div class="filter-group">
<h3 data-t="vehicleClass"></h3>
<select id="classFilter"></select>
</div>
<div class="filter-group">
<label class="check"><input type="checkbox" id="heldOnly" /> <span data-t="heldOnly"></span></label>
</div>
</aside>
<main class="screen">
<div class="controls">
<div class="search"><input id="searchInput" type="search" /></div>
<select id="sortSelect" class="control">
<option value="popular" data-t="sortPopular"></option>
<option value="name" data-t="sortName"></option>
<option value="priceAsc" data-t="sortPriceAsc"></option>
<option value="priceDesc" data-t="sortPriceDesc"></option>
</select>
</div>
<div class="grid" id="grid"></div>
</main>
</div>
<div class="modal" id="modal" hidden>
<div class="card-detail" id="detail"></div>
</div>
<div id="notice" class="notice" role="status"></div>
<script src="/_wto/ui/common.js"></script>
<script src="/trade.gaijin.net/app.js"></script>
</body>
</html>
+94
View File
@@ -0,0 +1,94 @@
/* Local marketplace page, laid out like the official Gaijin Market (implementation notes
section 4; Chromium 100: no :has(), container queries or CSS nesting). Fonts fall back to system fonts. */
:root {
--bg: #1c1f23; --surface: #272a2e; --lift: #2e3238; --cyan: #31e3ee; --red: #bf2d36; --green: #2a826d;
--text: #cbd7dc; --muted: #ffffff80; --hair: #ffffff0d; --disabled: #ffffff24;
--font: Inter, "Source Sans Pro", "Segoe UI", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/18px var(--font); min-width: 1024px; }
::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-thumb { background: var(--disabled); border-radius: 4px; }
.head { position: sticky; top: 0; z-index: 100; height: 72px; display: flex; align-items: center; padding: 8px 16px 4px; background: var(--surface); }
.logo { display: flex; flex-direction: column; color: #fff; }
.logo-top { font-size: 16px; font-weight: 500; opacity: 0.8; line-height: 18px; }
.logo-main { font-size: 22px; font-weight: 700; line-height: 24px; letter-spacing: 0.02em; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.nav-item { display: flex; align-items: center; gap: 6px; height: 40px; padding: 10px 8px; border-radius: 8px; color: var(--text); text-decoration: none; }
.nav-item:hover { background: var(--hair); }
.nav-item.muted { color: var(--muted); }
.wallet b { color: #ffda7c; font-size: 16px; }
.coin { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffe9a8, #d9a43a 70%); }
.nav-select { height: 40px; padding: 0 10px; border: none; border-radius: 8px; background: var(--lift); color: #fff; font: inherit; }
.layout { display: flex; gap: 24px; padding: 24px; align-items: flex-start; }
.filters { flex: none; width: 250px; padding: 16px; border-radius: 5px; background: var(--surface); font-family: "Golos UI", var(--font); position: sticky; top: 96px; }
.filters-caption { color: #fff; font-size: 16px; font-weight: 700; text-transform: uppercase; margin-bottom: 12px; }
.filter-group { padding: 10px 0; border-top: 1px solid var(--hair); }
.filter-group h3 { margin: 0 0 8px; color: #fff; font-size: 14px; font-weight: 600; }
.filter-group select { width: 100%; height: 34px; border: none; border-radius: 5px; background: var(--lift); color: #fff; font: inherit; padding: 0 8px; }
.check { display: flex; align-items: center; gap: 8px; height: 24px; font-size: 15px; cursor: pointer; }
.check input { accent-color: var(--cyan); }
.screen { flex: 1; min-width: 0; }
.controls { display: flex; gap: 16px; align-items: center; height: 48px; }
.search { flex: 1; max-width: 420px; }
.search input { width: 100%; height: 48px; padding: 8px 16px; border: none; border-radius: 8px; background: #06090d4f; color: #fff; font: 16px var(--font); box-shadow: inset 0 -1px #ffffff1a; outline: none; }
.search input:focus { background: #06090d9e; box-shadow: inset 0 -1px #ffffff4d; }
.control { margin-left: auto; min-width: 180px; height: 40px; border: none; border-radius: 5px; background: var(--surface); color: #fff; font: inherit; padding: 0 10px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; margin: 24px 0; }
.lot { position: relative; display: flex; flex-direction: column; height: 352px; max-width: 260px; border-radius: 5px; background: var(--surface); overflow: hidden; cursor: pointer; transition: transform 0.15s; }
.lot:hover { transform: translateY(-2px); }
.lot.highlight { outline: 2px solid var(--cyan); }
.rarity { position: absolute; left: 0; right: 0; top: 0; height: 45%; opacity: 0.35; }
.rarity::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: inherit; opacity: 1; }
.lot-image { position: relative; height: 180px; display: flex; align-items: center; justify-content: center; padding: 12px; }
.lot-image img { width: 100%; height: 100%; object-fit: contain; }
.lot-meta { position: relative; padding: 0 14px; }
.project { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.project img { width: 16px; height: 11px; }
.lot-name { height: 53px; margin: 8px 0; color: #fff; font-size: 16px; line-height: 20px; overflow: hidden; word-break: break-word; }
.lot-stats { margin-top: auto; padding: 0 14px 14px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.lot-held { color: var(--cyan); font-size: 13px; }
.lot-price { color: #fff; font-size: 17px; font-weight: 600; }
.lot-price small { color: #2dd4aa; font-size: 12px; font-weight: 400; margin-right: 4px; }
.empty { color: var(--muted); padding: 40px 0; }
.notice {
position: fixed;
z-index: 1001;
top: 16px;
left: 50%;
transform: translateX(-50%);
max-width: calc(100% - 32px);
pointer-events: none;
}
.notice.ok, .notice.err { padding: 10px 14px; border-radius: 8px; background: var(--surface); }
.notice.ok { color: #2dd4aa; }
.notice.err { color: #ff6b73; }
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; justify-content: center; align-items: flex-start; overflow-y: auto; background: #0b0f16db; }
.card-detail { position: relative; width: 960px; margin: 45px auto; border-radius: 5px; background: var(--surface); box-shadow: 0 24px 32px #00000061; overflow: hidden; }
.detail-glow { height: 2px; box-shadow: 0 6px 16px var(--glow); background: var(--glow); }
.detail-title { margin: 29px 64px 16px 24px; color: #fff; font-size: 24px; font-weight: 400; }
.detail-close { position: absolute; top: 2px; right: 0; width: 40px; height: 40px; border: none; background: #0000002b; color: #fff; font-size: 22px; cursor: pointer; }
.detail-info { display: flex; gap: 24px; padding: 0 24px; }
.detail-image { flex: none; width: 440px; height: 260px; display: flex; align-items: center; justify-content: center; border-radius: 5px; background: radial-gradient(50% 50% at 50% 50%, #272a2e99 0%, #272a2ef0 85%, #272a2e 100%), var(--glow); }
.detail-image img { width: 92%; height: 92%; object-fit: contain; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 4px 10px; border-radius: 2px; color: #000; font-size: 12px; font-weight: 600; }
.tag.game { background: #12151a9e; color: #fff; }
.detail-desc { margin-top: 12px; color: var(--text); }
.orders { display: flex; padding: 32px 24px; gap: 24px; }
.orders > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.big { width: 280px; height: 56px; border: none; border-radius: 5px; color: #fff; font: 700 16px var(--font); cursor: pointer; }
.big.sell { background: var(--green); box-shadow: 0 4px 8px #00392c80; }
.big.buy { background: var(--red); box-shadow: 0 4px 8px #7b000080; }
.big.free { background: transparent; border: 1px solid #ffda7c; color: #ffda7c; box-shadow: none; height: 44px; }
.big:disabled { background: var(--disabled); color: #ffffff66; border-color: transparent; box-shadow: none; cursor: default; }
.totals { color: var(--muted); font-size: 15px; text-align: center; }
.totals b { color: #fff; }
.ticker { padding: 16px 64px; background: #0000001a; color: var(--text); font-weight: 600; }