:root {
  --bg: #0b0d10;
  --panel: #12151a;
  --panel-2: #171b21;
  --panel-3: #1d222a;
  --line: #2a313c;
  --line-soft: #202630;
  --text: #f4f1e8;
  --muted: #9ea6b2;
  --accent: #d9af63;
  --accent-2: #efc97f;
  --good: #6fcf97;
  --warn: #f2c94c;
  --danger: #eb6b6b;
  --blue: #79a9ff;
  --shadow: 0 18px 55px rgba(0,0,0,.32);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body { min-width: 1080px; }
button, input, select { font: inherit; }
button { color: inherit; }

.app-shell { min-height: 100vh; background:
  radial-gradient(circle at 78% 0%, rgba(217,175,99,.08), transparent 34%),
  linear-gradient(180deg, #0e1014 0%, #0a0c0f 100%);
}

.topbar { height: 92px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 260px 1fr auto; align-items: center; gap: 24px; padding: 0 26px; position: sticky; top: 0; z-index: 20; background: rgba(11,13,16,.94); backdrop-filter: blur(14px); }
.brand-block { display: flex; align-items: center; gap: 15px; }
.brand-mark { width: 66px; height: 66px; display: grid; place-items: center; position: relative; flex: 0 0 66px; padding: 6px; overflow: hidden; border: 1px solid rgba(217,175,99,.38); border-radius: 10px; background: linear-gradient(145deg, rgba(217,175,99,.075), rgba(255,255,255,.015)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.025), 0 8px 22px rgba(0,0,0,.22); }
.brand-mark::after { content:""; position:absolute; inset:4px; border:1px solid rgba(217,175,99,.12); border-radius:7px; pointer-events:none; }
.brand-logo { display:block; width:100%; height:100%; object-fit:contain; filter: drop-shadow(0 0 10px rgba(217,175,99,.08)); }
.brand-title { font-weight: 900; letter-spacing: .18em; font-size: 15px; }
.brand-subtitle { color: var(--muted); font-size: 11px; margin-top: 4px; letter-spacing: .05em; }

.top-stats { display: flex; justify-content: center; gap: 10px; }
.stat-chip { min-width: 112px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); }
.stat-chip span { display:block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.stat-chip strong { display:block; margin-top: 3px; font-size: 15px; }
.xp-chip { width: 150px; }
.xp-bar { height: 5px; background: #262c35; border-radius: 999px; overflow:hidden; margin-top: 8px; }
.xp-bar i { display:block; height:100%; width:0; background: linear-gradient(90deg,var(--accent),var(--accent-2)); }
.header-actions { display:flex; gap:8px; }

.city-alert { min-height: 0; padding: 0 26px; border-bottom: 1px solid transparent; transition: .2s ease; }
.city-alert.visible { min-height: 40px; display:flex; align-items:center; color: #dfd5bf; background: rgba(217,175,99,.07); border-bottom-color: rgba(217,175,99,.18); font-size: 12px; }

.main-layout { display:grid; grid-template-columns: 265px 1fr; min-height: calc(100vh - 92px); }
.sidebar { border-right: 1px solid var(--line); padding: 22px 16px; background: rgba(15,18,22,.75); position: sticky; top: 92px; height: calc(100vh - 92px); overflow:auto; }
.sidebar-title { padding: 0 10px 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .14em; font-size: 10px; }
.nav-list { display:flex; flex-direction:column; gap:5px; }
.nav-btn { border:0; background:transparent; padding: 12px 11px; display:flex; align-items:center; gap:11px; border-radius:10px; color:#bec5cf; text-align:left; cursor:pointer; }
.nav-btn span { font-size:10px; color:#5f6876; width:20px; }
.nav-btn:hover { background: rgba(255,255,255,.04); color:#fff; }
.nav-btn.active { background: linear-gradient(90deg, rgba(217,175,99,.16), rgba(217,175,99,.03)); color: var(--accent-2); box-shadow: inset 2px 0 0 var(--accent); }
.sidebar-panel { margin-top: 24px; padding: 14px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.02); }
.sidebar-panel.compact { margin-top: 12px; }
.sidebar-panel-title { color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.12em; margin-bottom:9px; }
.objective { font-size:12px; line-height:1.5; }
.objective strong { color:var(--accent-2); }
.queue-summary { display:grid; gap:6px; font-size:11px; color:#c1c8d1; }
.queue-row { display:flex; justify-content:space-between; }

.view-root { padding: 28px; min-width: 0; }
.view-header { display:flex; justify-content:space-between; align-items:flex-end; gap:20px; margin-bottom:22px; }
.view-header h1 { margin:0; font-size:32px; letter-spacing:-.03em; }
.view-header p { margin:7px 0 0; color:var(--muted); max-width:760px; line-height:1.5; font-size:13px; }
.header-meta { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }

.card { background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.01)); border:1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel { padding:18px; }
.grid-2 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.grid-3 { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
.grid-4 { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; }
.section-title { font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.13em; margin: 0 0 12px; }

.primary-btn, .secondary-btn, .ghost-btn, .danger-btn, .tiny-btn { border-radius:10px; cursor:pointer; transition:.15s ease; }
.primary-btn { background: var(--accent); color:#14110b; border:1px solid var(--accent); padding:11px 15px; font-weight:800; }
.primary-btn:hover { background:var(--accent-2); transform:translateY(-1px); }
.secondary-btn { background:#222832; border:1px solid #343d49; padding:10px 14px; }
.secondary-btn:hover { border-color:#4c5867; background:#282f3a; }
.ghost-btn { background:transparent; border:1px solid var(--line); padding:9px 12px; color:#c7ced8; }
.ghost-btn:hover { border-color:#596372; color:#fff; }
.danger-btn { background:rgba(235,107,107,.1); color:#ff9b9b; border:1px solid rgba(235,107,107,.3); padding:9px 12px; }
.tiny-btn { padding:6px 9px; border:1px solid var(--line); background:#20262e; font-size:11px; }
button:disabled { opacity:.4; cursor:not-allowed; transform:none !important; }

.badge { display:inline-flex; align-items:center; gap:5px; padding:5px 8px; border:1px solid var(--line); border-radius:999px; font-size:10px; color:#c4cbd5; background:rgba(255,255,255,.025); }
.badge.accent { border-color:rgba(217,175,99,.35); color:var(--accent-2); background:rgba(217,175,99,.08); }
.badge.good { color:#9ce2b9; border-color:rgba(111,207,151,.28); background:rgba(111,207,151,.07); }
.badge.warn { color:#f8dc77; border-color:rgba(242,201,76,.28); background:rgba(242,201,76,.07); }
.badge.danger { color:#ff9a9a; border-color:rgba(235,107,107,.28); background:rgba(235,107,107,.07); }
.badge.blue { color:#a6c5ff; border-color:rgba(121,169,255,.28); background:rgba(121,169,255,.07); }

/* Raretés — teintes discrètes, cohérentes dans tout le jeu */
.badge.rarity-common { color:#aeb4bd; border-color:rgba(174,180,189,.22); background:rgba(174,180,189,.055); }
.badge.rarity-uncommon { color:#99d2aa; border-color:rgba(115,190,139,.30); background:rgba(115,190,139,.075); }
.badge.rarity-rare { color:#9fc2ff; border-color:rgba(103,158,242,.32); background:rgba(103,158,242,.08); }
.badge.rarity-mythic { color:#e8a5d0; border-color:rgba(218,121,181,.32); background:rgba(218,121,181,.08); }
.badge.rarity-unique { color:#e8c86f; border-color:rgba(220,177,70,.34); background:rgba(220,177,70,.085); }
.badge.rarity-legendary { color:#f0a08f; border-color:rgba(224,111,88,.34); background:rgba(224,111,88,.085); }

.inventory-table tr.rarity-common { --rarity-color:#8f969f; --rarity-wash:rgba(143,150,159,.018); }
.inventory-table tr.rarity-uncommon { --rarity-color:#67b980; --rarity-wash:rgba(103,185,128,.025); }
.inventory-table tr.rarity-rare { --rarity-color:#679ef2; --rarity-wash:rgba(103,158,242,.026); }
.inventory-table tr.rarity-mythic { --rarity-color:#d879b5; --rarity-wash:rgba(216,121,181,.026); }
.inventory-table tr.rarity-unique { --rarity-color:#dcb146; --rarity-wash:rgba(220,177,70,.028); }
.inventory-table tr.rarity-legendary { --rarity-color:#e06f58; --rarity-wash:rgba(224,111,88,.028); }
.inventory-table tr.rarity-row:not(.rarity-unknown) td:first-child { box-shadow:inset 3px 0 var(--rarity-color); }
.inventory-table tr.rarity-row:not(.rarity-unknown):hover td { background:var(--rarity-wash); }

.city-map { position:relative; min-height:620px; overflow:hidden; border-radius:22px; border:1px solid var(--line); background:
  linear-gradient(32deg, transparent 44%, rgba(255,255,255,.025) 44%, rgba(255,255,255,.025) 46%, transparent 46%),
  linear-gradient(150deg, transparent 63%, rgba(255,255,255,.025) 63%, rgba(255,255,255,.025) 65%, transparent 65%),
  radial-gradient(circle at 30% 22%, rgba(217,175,99,.09), transparent 21%),
  #11151b;
}
.city-map::before, .city-map::after { content:""; position:absolute; background:#1d232b; opacity:.9; }
.city-map::before { width:160%; height:58px; left:-25%; top:48%; transform:rotate(-12deg); border-top:1px solid #2a313a; border-bottom:1px solid #2a313a; }
.city-map::after { height:150%; width:52px; left:58%; top:-25%; transform:rotate(21deg); border-left:1px solid #2a313a; border-right:1px solid #2a313a; }
.map-district { position:absolute; border:1px solid #252c35; background:rgba(255,255,255,.015); color:#525b68; text-transform:uppercase; letter-spacing:.18em; font-size:9px; padding:8px 10px; border-radius:8px; z-index:1; }
.map-node { position:absolute; z-index:3; width:184px; min-height:92px; padding:13px; border-radius:14px; border:1px solid #343c47; background:rgba(17,21,27,.92); box-shadow:0 12px 35px rgba(0,0,0,.35); cursor:pointer; text-align:left; }
.map-node:hover { transform:translateY(-2px); border-color:#687484; }
.map-node .node-kicker { color:var(--accent); font-size:9px; text-transform:uppercase; letter-spacing:.14em; }
.map-node strong { display:block; margin-top:5px; font-size:14px; }
.map-node small { display:block; margin-top:6px; color:var(--muted); line-height:1.35; }
.map-node.current { border-color:rgba(217,175,99,.7); box-shadow:0 0 0 1px rgba(217,175,99,.2), 0 15px 40px rgba(0,0,0,.4); }
.map-legend { position:absolute; bottom:18px; right:18px; z-index:4; width:250px; padding:14px; border-radius:14px; border:1px solid var(--line); background:rgba(10,12,15,.88); }

.auction-list { display:grid; gap:16px; }
.lot-card { display:grid; grid-template-columns:105px 1fr auto; gap:18px; align-items:center; padding:18px; }
.lot-level { width:92px; height:92px; border:1px solid rgba(217,175,99,.35); background:linear-gradient(145deg,rgba(217,175,99,.15),rgba(217,175,99,.03)); border-radius:17px; display:grid; place-items:center; }
.lot-level span { font-size:10px; color:var(--muted); text-transform:uppercase; letter-spacing:.12em; }
.lot-level strong { display:block; font-size:34px; text-align:center; margin-top:-3px; color:var(--accent-2); }
.lot-info h3 { margin:0 0 8px; font-size:18px; }
.lot-info p { color:var(--muted); margin:0; font-size:12px; line-height:1.5; }
.lot-tags { margin-top:11px; display:flex; gap:7px; flex-wrap:wrap; }
.lot-action { width:170px; text-align:right; }
.lot-action .price { font-size:20px; font-weight:800; margin-bottom:8px; }

.bid-layout { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:16px; }
.bid-stage { padding:22px; }
.bid-price { text-align:center; padding:25px 10px; }
.bid-price span { display:block; color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.13em; }
.bid-price strong { display:block; font-size:52px; margin-top:6px; letter-spacing:-.04em; }
.bid-holder { text-align:center; color:var(--accent-2); font-size:13px; }
.bid-actions { display:flex; justify-content:center; gap:8px; margin-top:20px; flex-wrap:wrap; }
.bid-log { max-height:260px; overflow:auto; border-top:1px solid var(--line-soft); margin-top:20px; padding-top:13px; display:grid; gap:7px; }
.bid-log-row { display:flex; justify-content:space-between; color:#c5cbd4; font-size:11px; }
.bid-log-row em { color:var(--muted); font-style:normal; }
.bidder-list { display:grid; gap:9px; }
.bidder { padding:12px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.018); }
.bidder-top { display:flex; justify-content:space-between; gap:10px; align-items:center; }
.bidder strong { font-size:13px; }
.bidder small { display:block; margin-top:4px; color:var(--muted); }

.toolbar { display:flex; gap:9px; flex-wrap:wrap; margin-bottom:14px; }
.search-input, .select-input { background:#13171c; border:1px solid var(--line); color:#e6e8eb; border-radius:10px; padding:10px 11px; outline:none; }
.search-input { min-width:260px; flex:1; }
.search-input:focus, .select-input:focus { border-color:#687484; }
.table-wrap { overflow:auto; border:1px solid var(--line); border-radius:14px; }
.inventory-table { width:100%; border-collapse:collapse; min-width:980px; background:rgba(255,255,255,.01); }
.inventory-table th { position:sticky; top:0; z-index:1; text-align:left; font-size:9px; text-transform:uppercase; letter-spacing:.12em; color:#8f98a6; background:#15191f; padding:11px 12px; border-bottom:1px solid var(--line); }
.inventory-table td { padding:12px; border-bottom:1px solid var(--line-soft); vertical-align:middle; font-size:12px; }
.inventory-table tr:hover td { background:rgba(255,255,255,.018); }
.item-name { font-weight:700; color:#f1eee7; }
.item-sub { color:var(--muted); font-size:10px; margin-top:3px; }
.value { font-variant-numeric: tabular-nums; }
.actions-cell { display:flex; gap:6px; flex-wrap:wrap; }
.empty-state { padding:44px; text-align:center; color:var(--muted); border:1px dashed #303742; border-radius:16px; }
.empty-state strong { display:block; color:#e8e3d8; margin-bottom:6px; }

.service-grid { display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:16px; }
.service-list { display:grid; gap:10px; }
.service-item { display:grid; grid-template-columns:1fr auto; gap:15px; align-items:center; padding:14px; border:1px solid var(--line); border-radius:13px; background:rgba(255,255,255,.016); }
.service-item h4 { margin:0; font-size:13px; }
.service-item p { margin:5px 0 0; color:var(--muted); font-size:11px; }
.service-price { text-align:right; }
.service-price strong { display:block; font-size:14px; margin-bottom:6px; }
.queue-card { padding:16px; }
.queue-card h3 { margin:0 0 12px; font-size:15px; }
.queue-list { display:grid; gap:8px; }
.queue-entry { border:1px solid var(--line); border-radius:11px; padding:10px; }
.queue-entry strong { display:block; font-size:11px; }
.queue-entry span { color:var(--muted); font-size:10px; }
.progress { height:5px; border-radius:999px; background:#252b33; overflow:hidden; margin-top:8px; }
.progress i { display:block; height:100%; background:var(--accent); }

.trend-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-bottom:16px; }
.trend { padding:13px; border:1px solid var(--line); border-radius:12px; }
.trend span { display:block; color:var(--muted); font-size:10px; }
.trend strong { display:block; margin-top:5px; }
.trend.up strong { color:#98e5b7; }
.trend.down strong { color:#f58b8b; }
.market-actions { display:flex; gap:6px; }

.skill-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.skill-card { padding:17px; }
.skill-card-top { display:flex; justify-content:space-between; gap:14px; }
.skill-card h3 { margin:0; font-size:15px; }
.skill-card p { color:var(--muted); font-size:11px; line-height:1.5; min-height:48px; }
.skill-levels { display:flex; gap:5px; margin:12px 0; }
.skill-pip { width:25px; height:6px; border-radius:999px; background:#2b3139; }
.skill-pip.on { background:var(--accent); }
.skill-card-foot { display:flex; justify-content:space-between; align-items:center; }

.stats-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.big-stat { padding:17px; }
.big-stat span { color:var(--muted); text-transform:uppercase; letter-spacing:.11em; font-size:9px; }
.big-stat strong { display:block; margin-top:7px; font-size:24px; }
.history-list { display:grid; gap:8px; margin-top:10px; }
.history-row { display:grid; grid-template-columns:90px 1fr auto; gap:15px; align-items:center; padding:10px 0; border-bottom:1px solid var(--line-soft); font-size:11px; }
.history-row time { color:var(--muted); }

.modal-backdrop { position:fixed; inset:0; z-index:100; display:grid; place-items:center; background:rgba(3,5,8,.78); backdrop-filter:blur(7px); padding:22px; }
.modal { width:min(980px,96vw); max-height:92vh; overflow:auto; border:1px solid #3a424d; background:#11151a; border-radius:20px; box-shadow:0 30px 100px rgba(0,0,0,.65); }
.modal-head { padding:18px 20px; border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; }
.modal-head h2 { margin:0; font-size:18px; }
.modal-body { padding:20px; }
.modal-close { width:34px; height:34px; border:1px solid var(--line); border-radius:9px; background:#1a2027; cursor:pointer; }
.reveal-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:11px; }
.reveal-card { padding:14px; border:1px solid var(--line); border-radius:13px; background:rgba(255,255,255,.017); }
.reveal-card .index { color:#66707d; font-size:9px; }
.reveal-card h4 { margin:8px 0 7px; font-size:13px; line-height:1.3; }
.reveal-card p { color:var(--muted); font-size:10px; margin:0; }
.reveal-card .reveal-value { margin-top:10px; font-weight:800; }

.toast-root { position:fixed; right:20px; bottom:20px; z-index:150; display:grid; gap:8px; width:320px; pointer-events:none; }
.toast { padding:13px 14px; border:1px solid #37404c; background:#171c22; border-radius:12px; box-shadow:0 15px 45px rgba(0,0,0,.45); animation:toastIn .2s ease; }
.toast strong { display:block; font-size:12px; }
.toast span { color:var(--muted); font-size:10px; display:block; margin-top:3px; }
@keyframes toastIn { from { transform:translateY(10px); opacity:0; } to { transform:none; opacity:1; } }

.tutorial { display:grid; grid-template-columns:160px 1fr; gap:22px; }
.tutorial-index { border-right:1px solid var(--line); padding-right:18px; display:grid; gap:8px; align-content:start; }
.tutorial-step { width:100%; padding:10px 12px; border:1px solid transparent; border-radius:8px; background:transparent; color:var(--muted); font:inherit; font-size:11px; text-align:left; cursor:pointer; transition:background .15s ease,color .15s ease,border-color .15s ease,transform .15s ease; }
.tutorial-step:hover,.tutorial-step:focus-visible { color:var(--text); border-color:rgba(217,175,99,.18); background:rgba(255,255,255,.025); transform:translateX(2px); outline:none; }
.tutorial-step.active { background:rgba(217,175,99,.1); border-color:rgba(217,175,99,.16); color:var(--accent-2); }
.tutorial-content h3 { margin-top:0; font-size:23px; }
.tutorial-content p { color:#b0b8c3; line-height:1.7; font-size:13px; }

@media (max-width: 1250px) {
  body { min-width: 960px; }
  .topbar { grid-template-columns:230px 1fr auto; }
  .stat-chip { min-width:95px; }
  .main-layout { grid-template-columns:235px 1fr; }
  .grid-4, .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* v2 — boutique & finance */
.day-date-chip{min-width:128px}
.stat-chip small{display:block;margin-top:2px;color:var(--muted);font-size:9px;white-space:nowrap}
.finance-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(300px,.75fr);gap:16px}
.loan-form{display:grid;grid-template-columns:minmax(150px,1fr) minmax(190px,1fr);gap:12px;align-items:end;margin-top:18px}
.loan-form label{display:flex;flex-direction:column;gap:7px;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.08em}
.loan-form .primary-btn{min-height:42px}
.loan-preview{grid-column:1/-1;display:flex;align-items:baseline;gap:10px;padding:14px 16px;border:1px solid var(--line);background:rgba(255,255,255,.025)}
.loan-preview span,.loan-preview small{color:var(--muted);font-size:11px}.loan-preview strong{font-size:22px}
.shop-price-input{width:110px;background:var(--panel-2);border:1px solid var(--line);color:var(--text);padding:9px 10px;border-radius:8px;font:inherit}
.compact-stats{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:14px}
@media (max-width:1000px){.finance-grid{grid-template-columns:1fr}.loan-form{grid-template-columns:1fr}}

/* Enchères temps réel */
.auction-clock { margin:0 auto 22px; max-width:680px; padding:14px 16px; border:1px solid var(--line); border-radius:13px; background:rgba(255,255,255,.018); }
.auction-clock-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:9px; }
.auction-clock-head span { color:var(--muted); font-size:10px; text-transform:uppercase; letter-spacing:.12em; }
.auction-clock-head strong { font-size:14px; font-variant-numeric:tabular-nums; color:var(--accent-2); }
.auction-clock-track { height:11px; overflow:hidden; border-radius:999px; background:#242a32; border:1px solid rgba(255,255,255,.035); }
.auction-clock-track i { display:block; width:100%; height:100%; background:var(--accent); border-radius:inherit; transition:width .05s linear; }
.auction-clock small { display:block; margin-top:9px; color:var(--muted); font-size:10px; line-height:1.4; }
.auction-clock.urgent { border-color:rgba(225,95,95,.42); }
.auction-clock.urgent .auction-clock-head strong { color:#f58b8b; }
.auction-clock.urgent .auction-clock-track i { background:#d95b5b; }
.bidder.leading { border-color:rgba(217,175,99,.62); background:rgba(217,175,99,.055); }
.bid-actions button:disabled { opacity:.38; cursor:not-allowed; filter:saturate(.5); }


/* v0.4 — Premium visual redesign */
:root {
  --bg: #080a0d;
  --panel: rgba(15, 18, 24, .88);
  --panel-2: rgba(18, 22, 29, .92);
  --panel-3: rgba(24, 29, 38, .96);
  --line: rgba(207, 177, 117, .16);
  --line-soft: rgba(255,255,255,.06);
  --text: #f6f1e8;
  --muted: #9da5b4;
  --accent: #cfa55f;
  --accent-2: #efd39b;
  --shadow: 0 24px 70px rgba(0,0,0,.42);
  --radius: 20px;
}

html {
  scrollbar-color: rgba(207,165,95,.35) rgba(255,255,255,.04);
}
body {
  background:
    radial-gradient(circle at top, rgba(207,165,95,.08), transparent 28%),
    linear-gradient(180deg, #090b0f 0%, #07090c 100%);
}
.app-shell {
  background:
    radial-gradient(circle at 82% -5%, rgba(207,165,95,.12), transparent 28%),
    radial-gradient(circle at 18% 16%, rgba(91,107,145,.08), transparent 26%),
    linear-gradient(180deg, #0c0f13 0%, #080a0d 100%);
}
.topbar {
  height: 108px;
  grid-template-columns: 300px 1fr auto;
  padding: 0 30px;
  border-bottom: 1px solid rgba(207,165,95,.18);
  box-shadow: 0 10px 40px rgba(0,0,0,.22);
  background: linear-gradient(180deg, rgba(9,11,15,.96), rgba(9,11,15,.88));
  backdrop-filter: blur(18px);
}
.brand-block { gap: 18px; }
.brand-mark {
  width: 78px;
  height: 78px;
  flex-basis: 78px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(207,165,95,.34);
  background:
    linear-gradient(145deg, rgba(207,165,95,.11), rgba(255,255,255,.02)),
    rgba(14,17,22,.94);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.04),
    inset 0 0 0 1px rgba(255,255,255,.02),
    0 14px 35px rgba(0,0,0,.34);
}
.brand-mark::after {
  inset: 5px;
  border-radius: 11px;
  border: 1px solid rgba(207,165,95,.15);
}
.brand-logo {
  filter: drop-shadow(0 0 12px rgba(207,165,95,.08));
}
.brand-title {
  font-size: 28px;
  letter-spacing: .26em;
  font-weight: 900;
}
.top-stats { gap: 12px; }
.stat-chip {
  min-width: 124px;
  padding: 13px 15px;
  border-radius: 18px;
  border: 1px solid rgba(207,165,95,.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015)),
    rgba(15,18,24,.78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.stat-chip strong { font-size: 18px; font-weight: 800; }
.xp-chip { width: 170px; }
.xp-bar { height: 6px; background: rgba(255,255,255,.06); }
.xp-bar i { box-shadow: 0 0 12px rgba(207,165,95,.22); }
.header-actions { gap: 10px; }
.city-alert.visible {
  min-height: 48px;
  padding-inline: 30px;
  background: linear-gradient(90deg, rgba(207,165,95,.14), rgba(207,165,95,.05) 55%, rgba(255,255,255,.01));
  border-bottom-color: rgba(207,165,95,.18);
  color: #ead8b5;
  font-size: 13px;
}
.main-layout {
  grid-template-columns: 294px 1fr;
  min-height: calc(100vh - 108px);
}
.sidebar {
  top: 108px;
  height: calc(100vh - 108px);
  padding: 24px 18px;
  background:
    linear-gradient(180deg, rgba(15,18,24,.92), rgba(11,14,19,.86));
  border-right: 1px solid rgba(207,165,95,.12);
}
.sidebar-title,
.sidebar-panel-title,
.section-title,
.stat-chip span,
.sidebar-title,
.view-header p,
.view-header h1 + p { letter-spacing: .16em; }
.nav-list { gap: 8px; }
.nav-btn {
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: linear-gradient(180deg, rgba(255,255,255,.018), rgba(255,255,255,0));
}
.nav-btn span { font-size: 11px; color: #7e8898; }
.nav-btn:hover {
  border-color: rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.018));
}
.nav-btn.active {
  color: var(--accent-2);
  border-color: rgba(207,165,95,.22);
  background: linear-gradient(90deg, rgba(207,165,95,.19), rgba(207,165,95,.05) 60%, rgba(255,255,255,.02));
  box-shadow: inset 3px 0 0 var(--accent), 0 8px 20px rgba(0,0,0,.18);
}
.sidebar-panel {
  border-radius: 16px;
  border: 1px solid rgba(207,165,95,.13);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.012));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.view-root { padding: 34px; }
.view-header { margin-bottom: 26px; }
.view-header h1 {
  font-size: 42px;
  line-height: 1.02;
  letter-spacing: -.045em;
}
.view-header p {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: #a9b1bf;
}
.card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(207,165,95,.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.012)),
    rgba(14,17,22,.88);
  box-shadow: 0 22px 60px rgba(0,0,0,.33);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent 24%);
}
.panel { padding: 22px; }
.primary-btn, .secondary-btn, .ghost-btn, .danger-btn, .tiny-btn {
  border-radius: 12px;
  font-weight: 700;
  transition: transform .16s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.primary-btn {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 10px 24px rgba(207,165,95,.22), inset 0 1px 0 rgba(255,255,255,.28);
}
.primary-btn:hover {
  background: linear-gradient(180deg, #f2d9a8, #d8af67);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(207,165,95,.28), inset 0 1px 0 rgba(255,255,255,.32);
}
.secondary-btn {
  background: linear-gradient(180deg, rgba(44,52,65,.92), rgba(33,39,49,.96));
  border: 1px solid rgba(255,255,255,.08);
}
.secondary-btn:hover {
  border-color: rgba(207,165,95,.18);
  background: linear-gradient(180deg, rgba(54,62,76,.95), rgba(38,44,55,.98));
}
.ghost-btn {
  background: linear-gradient(180deg, rgba(255,255,255,.018), rgba(255,255,255,.01));
  border-color: rgba(255,255,255,.08);
}
.ghost-btn:hover {
  border-color: rgba(207,165,95,.22);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
}
.tiny-btn { background: linear-gradient(180deg, rgba(39,46,57,.95), rgba(30,36,45,.98)); }
.badge {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.03);
  border-color: rgba(255,255,255,.08);
}
.city-map {
  min-height: 660px;
  border-radius: 26px;
  border-color: rgba(207,165,95,.12);
  background:
    linear-gradient(32deg, transparent 44%, rgba(255,255,255,.02) 44%, rgba(255,255,255,.02) 46%, transparent 46%),
    linear-gradient(150deg, transparent 63%, rgba(255,255,255,.018) 63%, rgba(255,255,255,.018) 65%, transparent 65%),
    radial-gradient(circle at 24% 18%, rgba(207,165,95,.11), transparent 22%),
    radial-gradient(circle at 70% 68%, rgba(89,104,133,.08), transparent 24%),
    #10141a;
}
.map-node {
  width: 196px;
  min-height: 98px;
  border-radius: 16px;
  border-color: rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(21,26,33,.96), rgba(15,19,25,.96));
  box-shadow: 0 18px 40px rgba(0,0,0,.36);
}
.map-node:hover { border-color: rgba(207,165,95,.26); box-shadow: 0 22px 45px rgba(0,0,0,.42); }
.map-node.current { border-color: rgba(207,165,95,.55); box-shadow: 0 0 0 1px rgba(207,165,95,.12), 0 18px 42px rgba(0,0,0,.46); }
.map-legend {
  width: 270px;
  border-radius: 16px;
  border-color: rgba(207,165,95,.12);
  background: linear-gradient(180deg, rgba(12,15,20,.95), rgba(10,12,17,.92));
}
.auction-list { gap: 18px; }
.lot-card {
  grid-template-columns: 118px 1fr auto;
  gap: 22px;
  padding: 22px;
}
.lot-level {
  width: 102px;
  height: 102px;
  border-radius: 22px;
  border-color: rgba(207,165,95,.28);
  background: linear-gradient(150deg, rgba(207,165,95,.18), rgba(207,165,95,.04));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.lot-level strong { font-size: 38px; }
.lot-info h3 { font-size: 21px; margin-bottom: 10px; }
.lot-info p { font-size: 13px; line-height: 1.65; color: #aab2bf; }
.lot-action { width: 190px; }
.lot-action .price { font-size: 24px; }
.bid-layout { grid-template-columns: minmax(0,1fr) 336px; gap: 18px; }
.bid-stage { padding: 26px; }
.bid-price strong { font-size: 58px; }
.bid-log {
  border-top-color: rgba(255,255,255,.06);
  margin-top: 24px;
  padding-top: 16px;
}
.bidder {
  border-color: rgba(255,255,255,.07);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
}
.toolbar { gap: 10px; margin-bottom: 16px; }
.search-input, .select-input, .shop-price-input {
  background: linear-gradient(180deg, rgba(16,20,26,.98), rgba(13,17,22,.98));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 11px 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}
.search-input:focus, .select-input:focus, .shop-price-input:focus {
  border-color: rgba(207,165,95,.26);
  box-shadow: 0 0 0 4px rgba(207,165,95,.08);
}
.table-wrap {
  border-radius: 18px;
  border-color: rgba(207,165,95,.10);
  background: rgba(10,12,16,.46);
}
.inventory-table {
  background: rgba(255,255,255,.008);
}
.inventory-table th {
  background: rgba(21,24,30,.98);
  color: #97a0af;
  border-bottom-color: rgba(207,165,95,.10);
}
.inventory-table td {
  padding: 14px 12px;
  border-bottom-color: rgba(255,255,255,.05);
}
.inventory-table tr:hover td { background: rgba(255,255,255,.022); }
.item-name { font-size: 13px; }
.service-grid { grid-template-columns: minmax(0,1fr) 360px; gap: 18px; }
.service-item, .queue-entry, .trend {
  border-radius: 15px;
  border-color: rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
}
.queue-card h3 { font-size: 16px; }
.trend-grid { gap: 12px; }
.skill-grid { gap: 16px; }
.skill-card h3 { font-size: 17px; }
.skill-card p { font-size: 12px; line-height: 1.65; }
.skill-pip { height: 8px; width: 28px; }
.stats-grid { gap: 14px; }
.big-stat {
  padding: 20px;
  border-radius: 18px;
}
.big-stat strong { font-size: 28px; }
.history-row {
  grid-template-columns: 100px 1fr auto;
  padding: 12px 0;
  font-size: 12px;
}
.modal {
  border-radius: 24px;
  border-color: rgba(207,165,95,.16);
  background: linear-gradient(180deg, rgba(16,19,25,.98), rgba(12,15,21,.98));
  box-shadow: 0 36px 120px rgba(0,0,0,.62);
}
.modal-head {
  padding: 20px 22px;
  border-bottom-color: rgba(255,255,255,.06);
}
.modal-head h2 { font-size: 20px; }
.modal-body { padding: 24px; }
.modal-close {
  background: linear-gradient(180deg, rgba(28,34,42,.95), rgba(21,26,33,.98));
  border-color: rgba(255,255,255,.08);
}
.reveal-card {
  border-radius: 15px;
  border-color: rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.022), rgba(255,255,255,.012));
}
.toast {
  border-radius: 14px;
  border-color: rgba(207,165,95,.14);
  background: linear-gradient(180deg, rgba(23,28,34,.98), rgba(18,22,28,.98));
}
.auction-clock {
  max-width: 760px;
  border-radius: 16px;
  border-color: rgba(207,165,95,.14);
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
}
.auction-clock-track {
  height: 12px;
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.05);
}
.auction-clock-track i {
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 16px rgba(207,165,95,.20);
}
.loan-preview,
.trend,
.queue-entry,
.service-item,
.bidder,
.big-stat,
.skill-card,
.reveal-card {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}
@media (max-width: 1250px) {
  .topbar { grid-template-columns: 260px 1fr auto; }
  .main-layout { grid-template-columns: 248px 1fr; }
  .view-header h1 { font-size: 36px; }
}

/* v0.4.1 — Auction House / premium realism */
:root {
  --bg:#090a0b;
  --panel:#111315;
  --panel-2:#15171a;
  --panel-3:#1a1d21;
  --line:rgba(236,229,216,.11);
  --line-soft:rgba(236,229,216,.055);
  --text:#f0ece3;
  --muted:#969ca5;
  --accent:#b89a63;
  --accent-2:#d8bd88;
  --good:#78b991;
  --warn:#c7a45d;
  --danger:#c87972;
  --blue:#7899c5;
  --shadow:0 14px 38px rgba(0,0,0,.27);
  --radius:12px;
}

html, body {
  background:#090a0b;
  color:var(--text);
  font-family:"Avenir Next", Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-feature-settings:"kern" 1, "tnum" 1;
}
body::before {
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:9999;
  opacity:.16;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,.008) 0, rgba(255,255,255,.008) 1px, transparent 1px, transparent 3px);
  mix-blend-mode:soft-light;
}
.app-shell {
  background:
    radial-gradient(circle at 78% -18%, rgba(184,154,99,.075), transparent 34%),
    linear-gradient(180deg,#0c0d0f 0%,#090a0b 100%);
}

.topbar {
  height:96px;
  grid-template-columns:280px 1fr auto;
  gap:26px;
  padding:0 30px;
  border-bottom:1px solid rgba(216,189,136,.16);
  background:rgba(10,11,13,.96);
  box-shadow:0 10px 28px rgba(0,0,0,.18);
  backdrop-filter:blur(14px);
}
.brand-block { gap:16px; }
.brand-mark {
  width:64px;
  height:64px;
  flex-basis:64px;
  padding:5px;
  border-radius:10px;
  border:1px solid rgba(216,189,136,.32);
  background:#0e1012;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.025), 0 8px 22px rgba(0,0,0,.24);
}
.brand-mark::after {
  inset:3px;
  border-radius:7px;
  border-color:rgba(216,189,136,.10);
}
.brand-logo { filter:none; }
.brand-title {
  font-size:18px;
  letter-spacing:.31em;
  font-weight:750;
  color:#f3efe6;
}
.top-stats {
  justify-content:flex-end;
  gap:0;
  height:58px;
}
.stat-chip {
  min-width:118px;
  padding:8px 18px;
  border:0;
  border-left:1px solid rgba(236,229,216,.09);
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.stat-chip:first-child { border-left:0; }
.stat-chip span {
  color:#878e98;
  font-size:9px;
  letter-spacing:.18em;
}
.stat-chip strong {
  margin-top:5px;
  font-size:18px;
  font-weight:650;
  color:#f4f0e8;
}
.stat-chip small { margin-top:2px; color:#777f8a; }
.xp-chip { width:148px; }
.xp-bar { height:3px; margin-top:9px; background:rgba(255,255,255,.065); }
.xp-bar i { background:var(--accent); box-shadow:none; }
.header-actions { gap:8px; }
.header-actions .ghost-btn { min-width:100px; }

.city-alert.visible {
  min-height:44px;
  padding:0 30px;
  color:#d9cfbb;
  background:#17150f;
  border-bottom-color:rgba(184,154,99,.26);
  font-size:12px;
}

.main-layout {
  grid-template-columns:260px 1fr;
  min-height:calc(100vh - 96px);
}
.sidebar {
  top:96px;
  height:calc(100vh - 96px);
  padding:26px 17px;
  background:#0e1012;
  border-right:1px solid rgba(236,229,216,.08);
}
.sidebar-title {
  padding:0 12px 14px;
  color:#777e88;
  font-size:9px;
  letter-spacing:.22em;
}
.nav-list { gap:3px; }
.nav-btn {
  position:relative;
  padding:13px 12px;
  border-radius:7px;
  border:0;
  background:transparent;
  color:#aeb4bd;
  font-weight:520;
}
.nav-btn span { width:26px; color:#5f6670; font-size:10px; }
.nav-btn:hover { background:#15181b; color:#e8e3da; }
.nav-btn.active {
  color:#e0c28c;
  background:#171714;
  border:0;
  box-shadow:none;
}
.nav-btn.active::before {
  content:"";
  position:absolute;
  left:0;
  top:9px;
  bottom:9px;
  width:2px;
  background:#b89a63;
}
.sidebar-panel {
  margin-top:24px;
  padding:15px;
  border-radius:9px;
  border-color:rgba(236,229,216,.075);
  background:#121416;
  box-shadow:none;
}
.sidebar-panel-title { color:#747b85; font-size:9px; letter-spacing:.18em; }

.view-root { padding:38px 42px 46px; }
.view-header { align-items:flex-end; margin-bottom:30px; }
.view-header h1 {
  font-size:38px;
  line-height:1.05;
  letter-spacing:-.035em;
  font-weight:620;
  color:#f4f0e8;
}
.view-header p {
  max-width:820px;
  margin-top:10px;
  color:#979eaa;
  font-size:13px;
  line-height:1.65;
  letter-spacing:0;
}
.header-meta { gap:7px; }
.section-title {
  color:#777f89;
  font-size:9px;
  letter-spacing:.2em;
}

.card {
  overflow:hidden;
  border-radius:12px;
  border:1px solid rgba(236,229,216,.085);
  background:#111315;
  box-shadow:var(--shadow);
}
.card::before { display:none; }
.panel { padding:21px; }
.grid-2,.grid-3,.grid-4,.stats-grid { gap:14px; }

.primary-btn,.secondary-btn,.ghost-btn,.danger-btn,.tiny-btn {
  border-radius:8px;
  font-weight:620;
  box-shadow:none;
  transition:background .16s ease,border-color .16s ease,color .16s ease,transform .16s ease;
}
.primary-btn {
  background:#b89a63;
  color:#11100d;
  border:1px solid #c3a56e;
  padding:10px 15px;
}
.primary-btn:hover {
  background:#c7aa72;
  transform:translateY(-1px);
  box-shadow:none;
}
.secondary-btn {
  background:#1b1e22;
  border:1px solid rgba(236,229,216,.095);
  color:#ddd8ce;
}
.secondary-btn:hover { background:#22262b; border-color:rgba(216,189,136,.22); }
.ghost-btn {
  background:transparent;
  border:1px solid rgba(236,229,216,.10);
  color:#afb5be;
}
.ghost-btn:hover { background:#15181b; border-color:rgba(216,189,136,.22); color:#eee9df; }
.tiny-btn { background:#1a1d21; border-color:rgba(236,229,216,.08); }

.badge {
  padding:5px 9px;
  border-radius:6px;
  font-size:9px;
  letter-spacing:.02em;
  background:#171a1e;
  border-color:rgba(236,229,216,.085);
}
.badge.accent { border-color:rgba(184,154,99,.30); color:#d7bd8c; background:#191711; }

.city-map {
  min-height:640px;
  border-radius:14px;
  border-color:rgba(236,229,216,.08);
  background:
    linear-gradient(32deg,transparent 44%,rgba(255,255,255,.014) 44%,rgba(255,255,255,.014) 46%,transparent 46%),
    linear-gradient(150deg,transparent 63%,rgba(255,255,255,.014) 63%,rgba(255,255,255,.014) 65%,transparent 65%),
    radial-gradient(circle at 28% 22%,rgba(184,154,99,.05),transparent 24%),
    #101214;
}
.city-map::before,.city-map::after { background:#181b1f; opacity:.72; }
.map-district {
  border-color:rgba(236,229,216,.06);
  background:rgba(255,255,255,.008);
  color:#535b65;
  border-radius:5px;
}
.map-node {
  width:190px;
  min-height:92px;
  padding:14px;
  border-radius:9px;
  border-color:rgba(236,229,216,.09);
  background:#14171a;
  box-shadow:0 10px 26px rgba(0,0,0,.25);
}
.map-node:hover { transform:translateY(-1px); border-color:rgba(184,154,99,.28); }
.map-node .node-kicker { color:#ad9160; }
.map-node strong { font-size:13px; font-weight:650; }
.map-node.current { border-color:rgba(184,154,99,.48); box-shadow:0 10px 28px rgba(0,0,0,.28); }
.map-legend {
  border-radius:9px;
  border-color:rgba(236,229,216,.08);
  background:rgba(12,14,16,.94);
}

.auction-list { gap:13px; }
.lot-card {
  grid-template-columns:104px 1fr 180px;
  gap:20px;
  padding:20px;
  border-radius:11px;
  transition:border-color .16s ease,background .16s ease;
}
.lot-card:hover { border-color:rgba(184,154,99,.20); background:#131517; }
.lot-level {
  width:88px;
  height:88px;
  border-radius:8px;
  border-color:rgba(184,154,99,.32);
  background:#17150f;
  box-shadow:none;
}
.lot-level span { font-size:9px; }
.lot-level strong { font-size:33px; color:#d7b870; font-weight:650; }
.lot-info h3 { margin-bottom:8px; font-size:18px; font-weight:640; }
.lot-info p { color:#969eaa; font-size:12px; line-height:1.6; }
.lot-action .price { font-size:21px; font-weight:650; }

.bid-layout { grid-template-columns:minmax(0,1fr) 315px; gap:14px; }
.bid-stage { padding:24px; }
.bid-price { padding:22px 10px 18px; }
.bid-price strong { font-size:50px; font-weight:620; letter-spacing:-.045em; }
.bid-holder { color:#cfb47f; }
.auction-clock {
  border-radius:9px;
  border-color:rgba(236,229,216,.08);
  background:#15181b;
}
.auction-clock-track { height:8px; background:#24272b; border:0; }
.auction-clock-track i { background:#b89a63; box-shadow:none; }
.bid-log { border-top-color:rgba(236,229,216,.06); }
.bidder {
  border-radius:9px;
  border-color:rgba(236,229,216,.075);
  background:#14171a;
  box-shadow:none;
}
.bidder.leading { border-color:rgba(184,154,99,.35); background:#181712; }

.toolbar { gap:8px; }
.search-input,.select-input,.shop-price-input {
  background:#111417;
  border-color:rgba(236,229,216,.09);
  color:#eae5db;
  border-radius:7px;
  box-shadow:none;
}
.search-input:focus,.select-input:focus,.shop-price-input:focus {
  border-color:rgba(184,154,99,.40);
  box-shadow:0 0 0 2px rgba(184,154,99,.07);
}
.table-wrap { border-radius:9px; border-color:rgba(236,229,216,.08); background:#0f1113; }
.inventory-table { background:#0f1113; }
.inventory-table th {
  background:#15171a;
  color:#858d98;
  border-bottom-color:rgba(236,229,216,.08);
  padding:12px;
}
.inventory-table td { padding:13px 12px; border-bottom-color:rgba(236,229,216,.045); }
.inventory-table tr:hover td { background:#141619; }
.item-name { color:#ece7dd; font-weight:620; }
.item-sub { color:#858d98; }

.service-grid { grid-template-columns:minmax(0,1fr) 330px; gap:14px; }
.service-item,.queue-entry,.trend {
  border-radius:8px;
  border-color:rgba(236,229,216,.075);
  background:#141619;
  box-shadow:none;
}
.skill-card,.big-stat,.reveal-card { box-shadow:none; }
.skill-card h3 { font-weight:630; }
.skill-pip { height:5px; border-radius:1px; background:#2a2d31; }
.skill-pip.on { background:#b89a63; }
.big-stat span { color:#858c96; }
.big-stat strong { font-size:25px; font-weight:620; }
.history-row { border-bottom-color:rgba(236,229,216,.05); }

.modal-backdrop { background:rgba(3,4,5,.82); backdrop-filter:blur(5px); }
.modal {
  border-radius:12px;
  border-color:rgba(216,189,136,.15);
  background:#101214;
  box-shadow:0 30px 90px rgba(0,0,0,.60);
}
.modal-head { padding:18px 20px; border-bottom-color:rgba(236,229,216,.07); }
.modal-head h2 { font-size:18px; font-weight:640; }
.modal-close { border-radius:7px; background:#171a1e; }
.reveal-card { border-radius:8px; border-color:rgba(236,229,216,.075); background:#141619; }
.toast { border-radius:8px; border-color:rgba(236,229,216,.09); background:#171a1d; }

.finance-grid { gap:14px; }
.loan-preview { border-radius:8px; background:#141619; border-color:rgba(236,229,216,.075); }
.empty-state { border-color:rgba(236,229,216,.10); border-radius:9px; }

@media (max-width:1250px) {
  .topbar { grid-template-columns:245px 1fr auto; padding-inline:22px; }
  .brand-title { font-size:16px; }
  .main-layout { grid-template-columns:235px 1fr; }
  .view-root { padding:32px 28px 40px; }
  .view-header h1 { font-size:34px; }
}

/* v0.4.3 — Collection + mobile paysage */
.collection-progress {
  height: 4px;
  margin: -10px 0 18px;
  overflow: hidden;
  background: rgba(236,229,216,.06);
  border-radius: 999px;
}
.collection-progress i {
  display: block;
  height: 100%;
  min-width: 2px;
  background: #b89a63;
}
.collection-toolbar .search-input { min-width: 260px; }
.collection-table-wrap { margin-top: 2px; }
.collection-table { min-width: 720px; }
.collection-table td:first-child { width: 62%; }
.collection-slot { font-weight: 620; color: #ece7dd; }
.collection-unknown td { color: #626a75; }
.collection-unknown .collection-slot {
  color: #6b737e;
  letter-spacing: .16em;
  font-weight: 600;
}
.collection-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 2px 0;
  color: var(--muted);
  font-size: 11px;
}
.collection-pagination strong { color: var(--text); font-weight: 620; }

.orientation-gate { display: none; }

/* Tablettes et téléphones : LOT 49 est pensé exclusivement en paysage. */
@media (max-width: 980px) and (orientation: landscape) {
  html, body { min-width: 0; width: 100%; overflow-x: hidden; }
  body { font-size: 13px; }
  .app-shell { min-height: 100svh; }

  .topbar {
    position: sticky;
    top: 0;
    height: 66px;
    grid-template-columns: 154px minmax(0,1fr) auto;
    gap: 10px;
    padding: 6px 10px;
  }
  .brand-block { gap: 9px; min-width: 0; }
  .brand-mark { width: 48px; height: 48px; flex-basis: 48px; padding: 5px; border-radius: 8px; }
  .brand-mark::after { inset: 3px; border-radius: 5px; }
  .brand-title { font-size: 13px; letter-spacing: .18em; white-space: nowrap; }

  .top-stats {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(5,minmax(58px,1fr));
    gap: 4px;
  }
  .stat-chip {
    min-width: 0 !important;
    padding: 5px 7px;
    border-radius: 6px;
    overflow: hidden;
  }
  .stat-chip span { font-size: 7px; letter-spacing: .08em; white-space: nowrap; }
  .stat-chip strong { font-size: 11px; margin-top: 2px; white-space: nowrap; }
  .stat-chip small { font-size: 7px; overflow: hidden; text-overflow: ellipsis; }
  .xp-chip { width: auto; }
  .xp-bar { margin-top: 4px; height: 3px; }
  .header-actions { gap: 4px; }
  .header-actions .ghost-btn { padding: 7px 8px; font-size: 9px; border-radius: 6px; }

  .city-alert.visible {
    min-height: 34px;
    padding: 6px 12px;
    font-size: 10px;
  }

  .main-layout { display: block; min-height: calc(100svh - 66px); }
  .sidebar {
    position: sticky;
    top: 66px;
    z-index: 18;
    width: 100%;
    height: auto;
    padding: 5px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid rgba(236,229,216,.08);
    background: rgba(12,14,16,.97);
    backdrop-filter: blur(14px);
    scrollbar-width: none;
  }
  .sidebar::-webkit-scrollbar { display: none; }
  .sidebar-title, .sidebar-panel { display: none; }
  .nav-list { flex-direction: row; gap: 4px; width: max-content; }
  .nav-btn {
    flex: 0 0 auto;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 10px;
    white-space: nowrap;
  }
  .nav-btn span { display: none; }
  .nav-btn.active { box-shadow: inset 0 -2px 0 #b89a63; }

  .view-root { padding: 14px 14px 28px; }
  .view-header { align-items: flex-start; gap: 10px; margin-bottom: 14px; }
  .view-header h1 { font-size: 25px; line-height: 1.05; }
  .view-header p { margin-top: 6px; max-width: 620px; font-size: 10px; line-height: 1.5; letter-spacing: 0; }
  .header-meta { gap: 5px; max-width: 42%; }
  .badge { padding: 4px 6px; font-size: 8px; border-radius: 5px; }

  .card { border-radius: 9px; box-shadow: 0 12px 28px rgba(0,0,0,.24); }
  .panel { padding: 13px; }
  .grid-2, .skill-grid { gap: 9px; }
  .grid-3 { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
  .grid-4, .stats-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
  .section-title { margin-bottom: 8px; font-size: 8px; }

  .primary-btn, .secondary-btn, .ghost-btn, .danger-btn { padding: 8px 10px; font-size: 10px; border-radius: 6px; }
  .tiny-btn { padding: 5px 7px; font-size: 9px; border-radius: 5px; }

  .city-map { min-height: 470px; border-radius: 10px; }
  .map-node { width: 150px; min-height: 72px; padding: 9px; border-radius: 6px; }
  .map-node .node-kicker { font-size: 7px; }
  .map-node strong { margin-top: 3px; font-size: 10px; }
  .map-node small { margin-top: 4px; font-size: 8px; }
  .map-legend { width: 205px; padding: 10px; bottom: 10px; right: 10px; border-radius: 6px; }
  .map-district { padding: 5px 7px; font-size: 7px; }

  .auction-list { gap: 8px; }
  .lot-card { grid-template-columns: 70px minmax(0,1fr) 120px; gap: 10px; padding: 10px; border-radius: 7px; }
  .lot-level { width: 62px; height: 62px; border-radius: 6px; }
  .lot-level span { font-size: 7px; }
  .lot-level strong { font-size: 25px; }
  .lot-info h3 { margin-bottom: 4px; font-size: 13px; }
  .lot-info p { font-size: 9px; line-height: 1.4; }
  .lot-tags { margin-top: 6px; gap: 4px; }
  .lot-action { width: 120px; }
  .lot-action .price { margin-bottom: 5px; font-size: 15px; }

  .bid-layout { grid-template-columns: minmax(0,1fr) 230px; gap: 8px; }
  .bid-stage { padding: 12px; }
  .bid-price { padding: 8px 6px; }
  .bid-price strong { font-size: 36px; }
  .bid-holder { font-size: 10px; }
  .auction-clock { margin-bottom: 10px; padding: 8px 10px; border-radius: 6px; }
  .auction-clock-head { margin-bottom: 5px; }
  .auction-clock-head span { font-size: 7px; }
  .auction-clock-head strong { font-size: 11px; }
  .auction-clock small { margin-top: 5px; font-size: 8px; }
  .bid-actions { gap: 5px; margin-top: 9px; }
  .bid-log { max-height: 150px; margin-top: 10px; padding-top: 8px; }
  .bid-log-row { font-size: 8px; }
  .bidder-list { gap: 5px; }
  .bidder { padding: 8px; border-radius: 6px; }
  .bidder strong { font-size: 10px; }
  .bidder small { margin-top: 2px; font-size: 8px; }

  .toolbar { gap: 5px; margin-bottom: 9px; }
  .search-input, .select-input, .shop-price-input { min-width: 0; padding: 7px 8px; font-size: 9px; border-radius: 5px; }
  .search-input { flex: 1 1 180px; }
  .table-wrap { border-radius: 6px; }
  .inventory-table { min-width: 760px; }
  .inventory-table th { padding: 7px 8px; font-size: 7px; }
  .inventory-table td { padding: 8px; font-size: 9px; }
  .item-name, .collection-slot { font-size: 10px; }
  .item-sub { font-size: 8px; }

  .service-grid { grid-template-columns: minmax(0,1fr) 260px; gap: 8px; }
  .service-list { gap: 6px; }
  .service-item { gap: 8px; padding: 9px; border-radius: 6px; }
  .service-item h4 { font-size: 10px; }
  .service-item p { margin-top: 3px; font-size: 8px; }
  .service-price strong { font-size: 11px; }
  .queue-card { padding: 10px; }
  .queue-card h3 { font-size: 11px; }
  .queue-entry { padding: 7px; border-radius: 5px; }

  .trend-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; margin-bottom: 10px; }
  .trend { padding: 8px; border-radius: 5px; }
  .skill-card { padding: 10px; }
  .skill-card h3 { font-size: 11px; }
  .skill-card p { min-height: 32px; font-size: 8px; line-height: 1.4; }
  .skill-levels { margin: 7px 0; }
  .skill-pip { width: 18px; }
  .big-stat { padding: 10px; }
  .big-stat strong { margin-top: 4px; font-size: 17px; }
  .history-row { grid-template-columns: 78px 1fr auto; gap: 8px; padding: 7px 0; font-size: 8px; }

  .finance-grid { grid-template-columns: minmax(0,1.1fr) minmax(240px,.9fr); gap: 8px; }
  .loan-form { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
  .loan-preview { padding: 8px 10px; }
  .loan-preview strong { font-size: 14px; }

  .modal-backdrop { padding: 8px; align-items: center; }
  .modal { width: min(900px,98vw); max-height: 94svh; border-radius: 8px; }
  .modal-head { padding: 10px 12px; }
  .modal-head h2 { font-size: 13px; }
  .modal-body { padding: 12px; }
  .modal-close { width: 28px; height: 28px; }
  .reveal-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
  .reveal-card { padding: 9px; border-radius: 5px; }
  .reveal-card h4 { margin: 5px 0; font-size: 9px; }
  .reveal-card p, .reveal-card .index { font-size: 7px; }
  .tutorial { grid-template-columns: 118px 1fr; gap: 12px; }
  .tutorial-content h3 { font-size: 16px; }
  .tutorial-content p { font-size: 9px; line-height: 1.5; }

  .collection-progress { margin: -5px 0 10px; }
  .collection-toolbar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .collection-toolbar .search-input { min-width: 210px; }
  .collection-toolbar .select-input { flex: 0 0 auto; }
  .collection-table { min-width: 600px; }
  .collection-pagination { padding-top: 8px; font-size: 8px; }
}

/* Écran portrait : le jeu n'affiche pas son interface tant que l'appareil n'est pas tourné. */
@media (max-width: 980px) and (orientation: portrait) and (pointer: coarse) {
  html, body { min-width: 0; width: 100%; height: 100%; overflow: hidden; background: #090b0d; }
  .app-shell, #modalRoot, #toastRoot { display: none !important; }
  .orientation-gate {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 28px;
    background:
      radial-gradient(circle at 50% 35%, rgba(184,154,99,.09), transparent 34%),
      #090b0d;
    color: #eee9df;
  }
  .orientation-gate-inner {
    width: min(360px,88vw);
    display: grid;
    justify-items: center;
    text-align: center;
  }
  .orientation-gate img {
    width: 78px;
    height: 78px;
    object-fit: contain;
    padding: 8px;
    border: 1px solid rgba(184,154,99,.30);
    border-radius: 9px;
    background: #111315;
  }
  .orientation-gate strong { margin-top: 20px; font-size: 18px; font-weight: 620; }
  .orientation-gate span { margin-top: 8px; color: #8f97a2; font-size: 12px; }
}
@media (max-width: 980px) and (orientation: landscape) {
  #saveBtn { display:none; }
}

/* v0.4.4 — DIES NOX identity, service results and market cap */
.brand-copy { display:grid; gap:3px; align-content:center; }
.brand-studio {
  color:#8f969f;
  font-size:9px;
  font-weight:650;
  letter-spacing:.34em;
  line-height:1;
}
.brand-title { line-height:1.05; }

.service-pickup-actions {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  white-space:nowrap;
}
.service-pickup-btn {
  padding:7px 10px;
  min-width:0;
  border-radius:6px;
  font-size:11px;
  font-weight:650;
  box-shadow:none;
}
.service-pickup-btn:hover { box-shadow:none; }

.service-result-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.service-result-card {
  position:relative;
  overflow:hidden;
  padding:18px;
  border:1px solid rgba(236,229,216,.09);
  border-radius:9px;
  background:#141619;
}
.service-result-card::before {
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:3px;
  background:#727984;
}
.service-result-card.rarity-common::before { background:#8f969f; }
.service-result-card.rarity-uncommon::before { background:#67b980; }
.service-result-card.rarity-rare::before { background:#679ef2; }
.service-result-card.rarity-mythic::before { background:#d879b5; }
.service-result-card.rarity-unique::before { background:#dcb146; }
.service-result-card.rarity-legendary::before { background:#e06f58; }
.service-result-kicker {
  color:#7f8792;
  font-size:8px;
  font-weight:650;
  letter-spacing:.18em;
}
.service-result-card h3 {
  margin:7px 0 4px;
  font-size:18px;
  font-weight:650;
  line-height:1.25;
}
.service-result-card > p {
  margin:0;
  color:var(--muted);
  font-size:11px;
}
.service-result-facts {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:17px;
  padding-top:14px;
  border-top:1px solid rgba(236,229,216,.065);
}
.service-result-facts div { min-width:0; }
.service-result-facts span:not(.badge) {
  display:block;
  color:#777f89;
  font-size:8px;
  text-transform:uppercase;
  letter-spacing:.12em;
}
.service-result-facts strong {
  display:block;
  margin-top:5px;
  color:#eee9df;
  font-size:12px;
  font-weight:620;
}
.service-result-footer {
  display:flex;
  justify-content:flex-end;
  margin-top:16px;
}

@media (max-width:980px) and (orientation:landscape) {
  .brand-copy { gap:2px; }
  .brand-studio { font-size:6px; letter-spacing:.22em; }
  .brand-title { font-size:12px; }
  .service-pickup-actions { gap:5px; }
  .service-pickup-btn { padding:5px 7px; font-size:8px; border-radius:5px; }
  .service-result-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
  .service-result-card { padding:10px; border-radius:6px; }
  .service-result-card h3 { margin-top:4px; font-size:11px; }
  .service-result-card > p { font-size:8px; }
  .service-result-facts { gap:6px; margin-top:9px; padding-top:8px; }
  .service-result-facts span:not(.badge) { font-size:6px; }
  .service-result-facts strong { margin-top:3px; font-size:8px; }
}

/* v0.4.5 — Signature DIES NOX et appréciation qualitative des box */
.brand-block {
  gap: 13px;
  min-width: 0;
}
.brand-mark {
  width: 58px;
  height: 58px;
  flex-basis: 58px;
  padding: 4px;
  border-radius: 8px;
  border-color: rgba(216,189,136,.26);
  box-shadow: 0 7px 20px rgba(0,0,0,.22);
}
.brand-mark::after { display:none; }
.brand-copy {
  display:grid;
  align-content:center;
  gap:5px;
  padding-left:15px;
  border-left:1px solid rgba(216,189,136,.20);
}
.brand-studio {
  color:#9a9fa7;
  font-size:8px;
  font-weight:620;
  letter-spacing:.38em;
  line-height:1;
  white-space:nowrap;
}
.brand-title {
  margin:0;
  color:#f2ede3;
  font-family: Georgia, "Times New Roman", serif;
  font-size:20px;
  font-weight:600;
  letter-spacing:.09em;
  line-height:1;
  white-space:nowrap;
}

.lot-appraisal {
  margin:0 0 7px !important;
  color:#ded4c1 !important;
  font-family:Georgia, "Times New Roman", serif;
  font-size:14px !important;
  font-style:italic;
  line-height:1.55 !important;
}
.lot-visual {
  margin:0 !important;
  color:var(--muted) !important;
}

@media (max-width:980px) and (orientation:landscape) {
  .brand-block { gap:7px; }
  .brand-mark {
    width:42px;
    height:42px;
    flex-basis:42px;
    padding:3px;
    border-radius:6px;
  }
  .brand-copy {
    gap:2px;
    padding-left:8px;
  }
  .brand-studio {
    font-size:5px;
    letter-spacing:.28em;
  }
  .brand-title {
    font-size:10px;
    letter-spacing:.08em;
  }
  .lot-appraisal {
    margin-bottom:4px !important;
    font-size:8px !important;
    line-height:1.35 !important;
  }
}


/* v0.4.5b — header rollback + compact service results */
.brand-block { gap: 14px; }
.brand-copy {
  display:flex;
  align-items:center;
  padding-left:0;
  border-left:0;
}
.brand-title {
  margin:0;
  color:#f3eee4;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 19px;
  font-weight: 850;
  letter-spacing: .18em;
  line-height:1;
  white-space:nowrap;
}
.brand-studio { display:none !important; }
@media (max-width:980px) and (orientation:landscape) {
  .brand-copy { padding-left:0; }
  .brand-title { font-size: 11px; letter-spacing:.14em; }
}

.modal.service-modal { width:min(760px, 92vw); }
.modal.service-modal .modal-head { padding:16px 18px; }
.modal.service-modal .modal-head h2 { font-size:17px; }
.modal.service-modal .modal-body { padding:18px; }
.service-result-shell { max-width: 100%; }
.service-result-grid { grid-template-columns: 1fr; gap:10px; }
.service-result-shell.count-multi .service-result-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.service-result-card { padding:14px 15px; border-radius:10px; }
.service-result-kicker { font-size:8px; }
.service-result-card h3 { margin:5px 0 3px; font-size:16px; line-height:1.2; }
.service-result-card > p { font-size:10px; }
.service-result-facts { gap:8px 12px; margin-top:13px; padding-top:11px; }
.service-result-facts span:not(.badge) { font-size:8px; }
.service-result-facts strong { margin-top:4px; font-size:11px; }
.service-result-footer { margin-top:12px; }
.service-result-footer .primary-btn { padding:10px 14px; }
@media (max-width:980px) and (orientation:landscape) {
  .modal.service-modal { width:min(94vw, 680px); }
  .modal.service-modal .modal-body { padding:14px; }
  .service-result-shell.count-multi .service-result-grid { grid-template-columns: 1fr; }
  .service-result-card { padding:11px; }
}


/* v0.4.5c — rareté visible à l'ouverture des box */
.reveal-card { position:relative; overflow:hidden; }
.reveal-card::before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:rgba(255,255,255,.08); }
.reveal-card.rarity-common::before { background:#8f969f; }
.reveal-card.rarity-uncommon::before { background:#67b980; }
.reveal-card.rarity-rare::before { background:#679ef2; }
.reveal-card.rarity-mythic::before { background:#d879b5; }
.reveal-card.rarity-unique::before { background:#dcb146; }
.reveal-card.rarity-legendary::before { background:#e06f58; }
.reveal-card p { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.reveal-card p .badge { transform:translateY(-1px); }


/* v0.4.8b — type d'objet visible à l'ouverture */
.reveal-card .index-sub { color:#8b95a6; font-weight:600; letter-spacing:.02em; text-transform:none; }


/* v0.4.9b — alerte avant vente d'un objet cassé */
.broken-sale-modal-wrap { width:min(620px, 92vw); }
.broken-sale-modal { display:grid; gap:14px; }
.broken-sale-card {
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  padding:16px;
  background:linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
}
.broken-sale-kicker { color:#9ea7b5; font-size:10px; letter-spacing:.16em; text-transform:uppercase; font-weight:800; }
.broken-sale-card h3 { margin:6px 0 8px; font-size:20px; }
.broken-sale-card p { color:#aeb6c2; font-size:13px; line-height:1.6; }
.broken-sale-facts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:14px; padding-top:14px; border-top:1px solid rgba(255,255,255,.06); }
.broken-sale-facts span { display:block; color:#8d96a6; font-size:10px; letter-spacing:.12em; text-transform:uppercase; }
.broken-sale-facts strong { display:block; margin-top:5px; font-size:18px; }
.broken-sale-actions { display:flex; justify-content:flex-end; gap:10px; }
@media (max-width:980px) and (orientation:landscape) {
  .broken-sale-facts { grid-template-columns:1fr; }
  .broken-sale-actions { flex-direction:column-reverse; }
  .broken-sale-actions > * { width:100%; }
}


/* v0.4.10 — estimation probabiliste des box */
.lot-probabilities {
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
  margin:0 0 10px;
}
.lot-probabilities-title {
  color:#8e97a5;
  font-size:9px;
  text-transform:uppercase;
  letter-spacing:.14em;
  margin-right:2px;
}
.lot-probability {
  display:inline-flex;
  align-items:baseline;
  gap:6px;
  padding:6px 9px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(255,255,255,.02);
  color:#aeb6c2;
  font-size:10px;
  white-space:nowrap;
}
.lot-probability b { font-size:11px; color:#ece7dd; }
.lot-probability.rarity-rare { border-color:rgba(103,158,242,.26); }
.lot-probability.rarity-rare b { color:#9fc2ff; }
.lot-probability.rarity-mythic { border-color:rgba(216,121,181,.26); }
.lot-probability.rarity-mythic b { color:#e8a5d0; }
.lot-probability.rarity-unique { border-color:rgba(220,177,70,.28); }
.lot-probability.rarity-unique b { color:#e8c86f; }
.lot-probability.rarity-legendary { border-color:rgba(224,111,88,.28); }
.lot-probability.rarity-legendary b { color:#f0a08f; }
@media (max-width:980px) and (orientation:landscape) {
  .lot-probabilities { gap:4px; margin-bottom:6px; }
  .lot-probabilities-title { font-size:6px; }
  .lot-probability { padding:4px 6px; gap:4px; font-size:7px; }
  .lot-probability b { font-size:8px; }
}


/* v0.4.10b — logo seul + date dans le header */
.brand-block { gap: 16px; }
.brand-copy {
  display:flex;
  align-items:center;
  padding-left:16px;
  border-left:1px solid rgba(217,175,99,.18);
  min-height: 42px;
}
.brand-title, .brand-studio { display:none !important; }
.brand-date {
  color:#f1eadc;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height:1;
  white-space:nowrap;
  font-variant-numeric: tabular-nums;
}
.day-date-chip { min-width: 94px; }
.day-date-chip small { display:none !important; }
.day-date-chip strong { margin-top: 6px; }
@media (max-width:980px) and (orientation:landscape) {
  .brand-block { gap: 9px; }
  .brand-copy { padding-left: 10px; min-height: 28px; }
  .brand-date { font-size: 11px; letter-spacing: .03em; }
  .day-date-chip { min-width: 74px; }
}


/* v0.4.12 — bilan immédiat après ouverture d'un box */
.reveal-summary {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
  margin:0 0 16px;
}
.reveal-summary-item {
  padding:12px 14px;
  border:1px solid rgba(255,255,255,.075);
  border-radius:10px;
  background:rgba(255,255,255,.018);
}
.reveal-summary-item span {
  display:block;
  color:var(--muted);
  font-size:9px;
  font-weight:750;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.reveal-summary-item strong {
  display:block;
  margin-top:5px;
  color:#f3eee4;
  font-size:20px;
  line-height:1;
}
.reveal-summary-item.highlight {
  border-color:rgba(217,175,99,.24);
  background:rgba(217,175,99,.055);
}
.reveal-summary-item.highlight strong { color:var(--accent-2); }
@media (max-width:980px) and (orientation:landscape) {
  .reveal-summary { gap:6px; margin-bottom:10px; }
  .reveal-summary-item { padding:8px 10px; }
  .reveal-summary-item span { font-size:7px; }
  .reveal-summary-item strong { font-size:14px; }
}


/* Ouverture des coffres uniquement au retrait chez Nalya */
.modal.locksmith-result-modal { width:min(980px, 94vw); }
.modal.locksmith-result-modal .modal-body { max-height:72vh; overflow:auto; }
@media (max-width:980px) and (orientation:landscape) {
  .modal.locksmith-result-modal { width:min(900px, 96vw); }
}


/* v0.4.14 — notifications persistantes des services */
.nav-btn .nav-notification {
  margin-left:auto;
  width:auto;
  min-width:18px;
  height:18px;
  padding:0 5px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  font-size:9px;
  line-height:1;
  font-weight:850;
  letter-spacing:0;
  color:#111315;
  background:#d8bb80;
  border:1px solid rgba(255,255,255,.18);
  box-shadow:0 0 0 3px rgba(216,187,128,.08), 0 4px 10px rgba(0,0,0,.28);
}
.nav-btn .nav-notification.ready {
  color:#08110c;
  background:#7fd6a2;
  border-color:rgba(127,214,162,.42);
  box-shadow:0 0 0 3px rgba(127,214,162,.08), 0 4px 10px rgba(0,0,0,.28);
}
.nav-btn .nav-notification.available {
  width:8px;
  min-width:8px;
  height:8px;
  padding:0;
  margin-right:5px;
  border:0;
  background:#d8bb80;
  box-shadow:0 0 0 3px rgba(216,187,128,.09);
}
.map-notification {
  position:absolute;
  z-index:4;
  right:9px;
  top:9px;
  min-width:18px;
  height:18px;
  padding:0 5px;
  border-radius:999px;
  display:grid;
  place-items:center;
  color:#111315;
  background:#d8bb80;
  border:1px solid rgba(255,255,255,.18);
  font-size:9px;
  font-weight:850;
  box-shadow:0 3px 10px rgba(0,0,0,.3);
}
.map-notification.ready { background:#7fd6a2; color:#08110c; border-color:rgba(127,214,162,.42); }
.map-notification.available { width:8px; min-width:8px; height:8px; padding:0; right:12px; top:12px; border:0; }
@media (max-width:980px) and (orientation:landscape) {
  .nav-btn { position:relative; }
  .nav-btn .nav-notification {
    position:absolute;
    right:3px;
    top:2px;
    min-width:14px;
    height:14px;
    padding:0 4px;
    font-size:7px;
    transform:translate(30%,-30%);
  }
  .nav-btn .nav-notification.available {
    width:7px;
    min-width:7px;
    height:7px;
    right:4px;
    top:3px;
  }
  .map-notification { min-width:14px; height:14px; font-size:7px; right:6px; top:6px; }
  .map-notification.available { width:7px; min-width:7px; height:7px; right:8px; top:8px; }
}


/* v0.4.16 — règle UI : actions finales des pop-up centrées */
.modal-action-footer,
.service-result-footer,
.broken-sale-actions {
  display:flex;
  justify-content:center !important;
  align-items:center;
  gap:10px;
  margin-top:17px;
  text-align:center;
}
.modal-action-footer > button,
.service-result-footer > button {
  min-width:120px;
}
@media (max-width:980px) and (orientation:landscape) {
  .modal-action-footer,
  .service-result-footer {
    margin-top:10px;
  }
  .broken-sale-actions {
    align-items:stretch;
  }
}

/* v0.4.19 — compte Dies Nox partagé */
.account-btn {
  min-width:104px;
  min-height:38px;
  padding:9px 12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:1px solid rgba(216,189,136,.18);
  border-radius:7px;
  background:rgba(216,189,136,.045);
  color:#d8d1c5;
  cursor:pointer;
  font:inherit;
  font-size:11px;
  font-weight:700;
  white-space:nowrap;
  transition:.15s ease;
}
.account-btn:hover { border-color:rgba(216,189,136,.34); background:rgba(216,189,136,.075); color:#f3eee4; }
.account-dot {
  width:7px;
  height:7px;
  border-radius:50%;
  background:#737a84;
  box-shadow:0 0 0 3px rgba(115,122,132,.09);
  flex:0 0 auto;
}
.account-btn.is-connected .account-dot { background:#7fd6a2; box-shadow:0 0 0 3px rgba(127,214,162,.10); }
.account-btn.is-unavailable .account-dot { background:#8c6262; box-shadow:0 0 0 3px rgba(140,98,98,.08); }

.modal.account-modal { width:min(560px,92vw); }
.modal.account-modal .modal-body { padding:22px; }
.dn-account-shell { display:grid; gap:16px; }
.dn-account-intro { display:flex; align-items:center; gap:14px; }
.dn-account-logo {
  width:62px;
  height:62px;
  object-fit:cover;
  border-radius:9px;
  border:1px solid rgba(216,189,136,.20);
}
.dn-account-intro > div { min-width:0; }
.dn-account-intro span,
.dn-account-profile-kicker {
  display:block;
  color:#918f8b;
  font-size:9px;
  font-weight:750;
  letter-spacing:.15em;
  text-transform:uppercase;
}
.dn-account-intro strong { display:block; margin-top:4px; font-size:22px; font-weight:680; color:#f0ece4; }
.dn-account-intro p { margin:5px 0 0; color:#949aa3; font-size:11px; }
.dn-account-tabs {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:4px;
  padding:4px;
  border:1px solid rgba(236,229,216,.07);
  border-radius:8px;
  background:#0d0f11;
}
.dn-account-tab {
  padding:9px 10px;
  border:0;
  border-radius:6px;
  background:transparent;
  color:#7f8791;
  cursor:pointer;
  font:inherit;
  font-size:10px;
  font-weight:750;
}
.dn-account-tab.active { background:#191b1e; color:#eee9df; box-shadow:inset 0 0 0 1px rgba(216,189,136,.12); }
.dn-account-form { display:grid; gap:11px; }
.dn-account-form label { display:grid; gap:6px; }
.dn-account-form label span { color:#9ca2ab; font-size:9px; font-weight:750; letter-spacing:.10em; text-transform:uppercase; }
.dn-account-form input {
  width:100%;
  padding:11px 12px;
  border:1px solid rgba(236,229,216,.10);
  border-radius:7px;
  outline:none;
  background:#15171a;
  color:#f1ede5;
  font:inherit;
  font-size:13px;
}
.dn-account-form input:focus { border-color:rgba(216,189,136,.40); box-shadow:0 0 0 3px rgba(216,189,136,.055); }
.dn-account-form small { margin-top:-5px; color:#737a84; font-size:9px; }
.dn-account-message { min-height:15px; margin:0; color:#d78181; text-align:center; font-size:10px; }
.dn-account-note {
  display:grid;
  gap:4px;
  padding:11px 12px;
  border-left:2px solid rgba(216,189,136,.42);
  background:rgba(216,189,136,.035);
}
.dn-account-note strong { color:#c9b991; font-size:10px; font-weight:750; }
.dn-account-note span { color:#858d97; font-size:10px; line-height:1.45; }
.dn-account-profile-card {
  padding:20px;
  text-align:center;
  border:1px solid rgba(127,214,162,.16);
  border-radius:9px;
  background:rgba(127,214,162,.035);
}
.dn-account-profile-card > strong { display:block; margin-top:7px; color:#f1ede5; font-size:25px; font-weight:680; }
.dn-account-profile-card p { margin:7px 0 0; color:#8f969f; font-size:11px; }
.dn-account-logout-note { margin:-8px 0 0; color:#6f7680; text-align:center; font-size:9px; }

@media (max-width:980px) and (orientation:landscape) {
  .header-actions .account-btn { min-width:68px; min-height:30px; padding:6px 7px; gap:5px; font-size:8px; border-radius:6px; }
  .account-dot { width:5px; height:5px; }
  .modal.account-modal { width:min(560px,88vw); }
  .modal.account-modal .modal-body { padding:12px; }
  .dn-account-shell { gap:10px; }
  .dn-account-logo { width:42px; height:42px; }
  .dn-account-intro strong { font-size:15px; }
  .dn-account-intro p { font-size:8px; }
  .dn-account-tab { padding:6px 8px; font-size:8px; }
  .dn-account-form { gap:7px; }
  .dn-account-form input { padding:7px 8px; font-size:10px; }
  .dn-account-profile-card { padding:12px; }
  .dn-account-profile-card > strong { font-size:18px; }
}

/* v0.5.0 — menu principal + compte Dies Nox obligatoire */
[hidden] { display:none !important; }

.main-menu,
.menu-subscreen {
  position:fixed;
  inset:0;
  min-width:1080px;
  min-height:100vh;
  overflow:hidden;
  color:var(--text);
  background:#090b0e;
}
.main-menu { z-index:60; }
.menu-subscreen { z-index:70; display:grid; place-items:center; padding:4vh 5vw; }

.main-menu::before,
.menu-subscreen::before {
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg, rgba(6,7,9,.96) 0%, rgba(6,7,9,.83) 33%, rgba(6,7,9,.42) 64%, rgba(6,7,9,.64) 100%),
    linear-gradient(0deg, rgba(4,5,7,.72), transparent 55%),
    url("lot49.webp") center center / cover no-repeat;
  transform:scale(1.01);
}
.main-menu::after,
.menu-subscreen::after {
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(circle at 22% 45%, rgba(217,175,99,.08), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,.025), transparent 16%, transparent 84%, rgba(0,0,0,.24));
}
.main-menu-backdrop,
.menu-subscreen-backdrop { position:absolute; inset:0; }

.main-menu-content {
  position:relative;
  z-index:2;
  width:min(470px,42vw);
  height:100%;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:7vh 0 6vh max(52px,6vw);
}
.main-menu-brand { width:290px; margin-bottom:25px; }
.main-menu-logo { display:block; width:142px; height:142px; object-fit:contain; }
.main-menu-place {
  margin-top:14px;
  color:#a5a9ae;
  font-family:Georgia,"Times New Roman",serif;
  font-size:12px;
  font-weight:700;
  letter-spacing:.15em;
}
.main-menu-account-state {
  width:min(365px,100%);
  display:flex;
  align-items:center;
  gap:9px;
  margin:0 0 13px;
  color:#9aa0a9;
  font-size:10px;
  font-weight:720;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.main-menu-account-state i {
  width:7px;
  height:7px;
  flex:0 0 7px;
  border-radius:50%;
  background:#777e87;
  box-shadow:0 0 0 4px rgba(119,126,135,.08);
}
.main-menu-account-state.connected { color:#b9c8bd; }
.main-menu-account-state.connected i { background:#77c695; box-shadow:0 0 0 4px rgba(119,198,149,.10); }
.main-menu-account-state.unavailable { color:#ba8c8c; }
.main-menu-account-state.unavailable i { background:#c26f6f; box-shadow:0 0 0 4px rgba(194,111,111,.10); }
.main-menu-account-state.loading i { animation:lot49MenuPulse 1.2s ease-in-out infinite; }
@keyframes lot49MenuPulse { 50% { opacity:.35; transform:scale(.72); } }

.main-menu-actions {
  width:min(390px,100%);
  display:grid;
  gap:7px;
}
.main-menu-btn {
  position:relative;
  min-height:58px;
  display:grid;
  grid-template-columns:1fr auto;
  align-items:center;
  gap:12px;
  padding:11px 18px 11px 20px;
  overflow:hidden;
  border:1px solid rgba(236,229,216,.105);
  border-radius:7px;
  background:rgba(15,17,20,.68);
  color:#d8d8d4;
  text-align:left;
  cursor:pointer;
  backdrop-filter:blur(10px);
  transition:border-color .16s ease, background .16s ease, transform .16s ease, color .16s ease;
}
.main-menu-btn::before {
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:2px;
  background:rgba(217,175,99,.18);
  transition:.16s ease;
}
.main-menu-btn > span {
  position:relative;
  z-index:1;
  font-size:13px;
  font-weight:830;
  letter-spacing:.10em;
}
.main-menu-btn > small {
  position:relative;
  z-index:1;
  color:#777e87;
  font-size:9px;
  letter-spacing:.03em;
}
.main-menu-btn:hover:not(:disabled),
.main-menu-btn:focus-visible:not(:disabled) {
  transform:translateX(5px);
  border-color:rgba(217,175,99,.30);
  background:rgba(27,28,29,.86);
  color:#fff;
  outline:none;
}
.main-menu-btn:hover:not(:disabled)::before,
.main-menu-btn:focus-visible:not(:disabled)::before { width:5px; background:var(--accent); }
.main-menu-btn.is-primary {
  border-color:rgba(217,175,99,.32);
  background:linear-gradient(90deg,rgba(217,175,99,.16),rgba(18,19,21,.82) 62%);
  color:#f2eadb;
}
.main-menu-btn.is-primary::before { background:var(--accent); }
.main-menu-btn:disabled,
.main-menu-btn.is-locked { cursor:not-allowed; opacity:.47; filter:saturate(.5); }
.main-menu-version {
  margin-top:18px;
  color:#626871;
  font-size:8px;
  font-weight:700;
  letter-spacing:.16em;
  text-transform:uppercase;
}

.menu-subscreen-panel {
  position:relative;
  z-index:2;
  width:min(900px,86vw);
  max-height:88vh;
  overflow:auto;
  border:1px solid rgba(217,175,99,.16);
  border-radius:13px;
  background:rgba(12,14,17,.93);
  box-shadow:0 30px 100px rgba(0,0,0,.58);
  backdrop-filter:blur(18px);
}
.menu-subscreen-head {
  position:sticky;
  top:0;
  z-index:3;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:18px 22px;
  border-bottom:1px solid rgba(255,255,255,.07);
  background:rgba(12,14,17,.94);
}
.menu-subscreen-head span {
  color:#9b8b69;
  font-size:8px;
  font-weight:800;
  letter-spacing:.20em;
}
.menu-subscreen-head h2 {
  margin:3px 0 0;
  color:#f1eee7;
  font-size:23px;
  letter-spacing:.04em;
}
.menu-close {
  width:36px;
  height:36px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:7px;
  background:#171a1e;
  color:#bbb;
  font-size:20px;
  cursor:pointer;
}
.menu-close:hover { color:#fff; border-color:rgba(217,175,99,.30); }
.menu-subscreen-footer {
  display:flex;
  justify-content:center;
  padding:18px 22px 22px;
  border-top:1px solid rgba(255,255,255,.055);
}

.menu-options-list { display:grid; gap:10px; padding:22px; }
.menu-option-card {
  min-height:88px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:22px;
  padding:16px 18px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:10px;
  background:rgba(255,255,255,.018);
}
.menu-option-card > div { display:grid; grid-template-columns:34px 1fr; align-items:center; column-gap:8px; }
.menu-option-card > div > span { grid-row:1 / span 2; color:#7d7058; font-size:11px; font-weight:850; }
.menu-option-card strong { font-size:12px; letter-spacing:.07em; }
.menu-option-card p { grid-column:2; margin:5px 0 0; color:#89909a; font-size:10px; line-height:1.5; }
.menu-option-card > button { flex:0 0 auto; min-width:122px; }
.menu-option-card.danger { border-color:rgba(235,107,107,.13); }

.menu-rules-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:11px; padding:22px; }
.menu-rules-grid article {
  position:relative;
  min-height:150px;
  padding:18px 18px 17px 60px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:10px;
  background:rgba(255,255,255,.018);
}
.menu-rules-grid b { position:absolute; left:18px; top:18px; color:#8a7652; font-size:12px; }
.menu-rules-grid h3 { margin:0 0 8px; font-size:12px; letter-spacing:.08em; }
.menu-rules-grid p { margin:0; color:#9ba1aa; font-size:11px; line-height:1.65; }

.credits-panel-main { width:min(720px,80vw); }
.menu-credits-main { display:grid; justify-items:center; padding:30px 34px 26px; }
.menu-credits-main > img { width:96px; height:96px; object-fit:contain; margin-bottom:24px; }
.menu-credit-row {
  width:min(520px,100%);
  display:flex;
  justify-content:space-between;
  gap:20px;
  padding:12px 2px;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.menu-credit-row span { color:#7f8790; font-size:9px; font-weight:760; letter-spacing:.08em; }
.menu-credit-row strong { color:#e6e1d8; font-size:10px; letter-spacing:.07em; text-align:right; }
.menu-credits-main p { max-width:520px; margin:23px 0 0; color:#7f8790; font-size:10px; line-height:1.65; text-align:center; }

.game-account-chip {
  min-width:104px;
  padding:7px 11px;
  border-left:1px solid rgba(217,175,99,.18);
}
.game-account-chip span { display:block; color:#777f89; font-size:8px; font-weight:750; letter-spacing:.11em; text-transform:uppercase; }
.game-account-chip strong { display:block; max-width:125px; margin-top:3px; overflow:hidden; color:#dcd8cf; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }

/* Le fichier lot49.webp peut être remplacé sans toucher au code. */
@media (max-width:980px) and (orientation:landscape) {
  .main-menu,
  .menu-subscreen { min-width:0; min-height:100svh; }
  .main-menu-content { width:48vw; min-height:100svh; padding:5vh 0 4vh 5vw; }
  .main-menu-brand { margin-bottom:10px; }
  .main-menu-logo { width:72px; height:72px; }
  .main-menu-place { margin-top:7px; font-size:7px; }
  .main-menu-account-state { margin-bottom:7px; font-size:6px; }
  .main-menu-account-state i { width:5px; height:5px; flex-basis:5px; }
  .main-menu-actions { gap:4px; width:min(300px,100%); }
  .main-menu-btn { min-height:35px; padding:6px 11px 6px 13px; border-radius:5px; }
  .main-menu-btn > span { font-size:8px; }
  .main-menu-btn > small { font-size:6px; }
  .main-menu-version { margin-top:8px; font-size:5px; }
  .menu-subscreen { padding:3vh 4vw; }
  .menu-subscreen-panel { width:min(880px,92vw); max-height:92svh; }
  .menu-subscreen-head { padding:9px 12px; }
  .menu-subscreen-head h2 { font-size:14px; }
  .menu-close { width:27px; height:27px; font-size:16px; }
  .menu-options-list, .menu-rules-grid { padding:11px; gap:6px; }
  .menu-option-card { min-height:55px; padding:8px 10px; }
  .menu-option-card strong, .menu-rules-grid h3 { font-size:8px; }
  .menu-option-card p, .menu-rules-grid p { font-size:7px; line-height:1.45; }
  .menu-option-card > button { min-width:85px; padding:6px 9px; font-size:7px; }
  .menu-rules-grid article { min-height:92px; padding:10px 10px 10px 38px; }
  .menu-rules-grid b { left:11px; top:11px; font-size:8px; }
  .menu-subscreen-footer { padding:9px 12px 11px; }
  .credits-panel-main { width:min(650px,82vw); }
  .menu-credits-main { padding:15px 20px 12px; }
  .menu-credits-main > img { width:58px; height:58px; margin-bottom:10px; }
  .menu-credit-row { padding:7px 1px; }
  .menu-credit-row span,.menu-credit-row strong,.menu-credits-main p { font-size:7px; }
  .game-account-chip { min-width:70px; padding:4px 7px; }
  .game-account-chip span { font-size:5px; }
  .game-account-chip strong { max-width:80px; font-size:7px; }
}

@media (max-width:980px) and (orientation:portrait) and (pointer:coarse) {
  .main-menu, .menu-subscreen { display:none !important; }
}

/* v0.5.4 — menu réellement placé sous le logo intégré à lot49.webp */
.main-menu::before {
  background:
    linear-gradient(90deg, rgba(2,4,7,.06) 0%, rgba(2,4,7,.04) 57%, rgba(2,4,7,.10) 74%, rgba(2,4,7,.18) 100%),
    linear-gradient(0deg, rgba(2,4,7,.14), transparent 34%),
    url("lot49.webp") center center / cover no-repeat;
  transform:none;
}
.main-menu::after {
  background:
    radial-gradient(circle at 85% 56%, rgba(217,175,99,.035), transparent 22%),
    linear-gradient(180deg, rgba(0,0,0,.02), transparent 72%, rgba(0,0,0,.16));
}

/* Le logo est déjà dessiné dans l'image de fond : aucun doublon HTML. */
.main-menu-brand { display:none !important; }

/* Colonne de droite, immédiatement sous le logo du fond. */
.main-menu-content {
  position:absolute;
  z-index:2;
  right:6.4vw;
  top:38.5vh;
  width:min(350px,25vw);
  height:auto;
  min-height:0;
  display:block;
  padding:0;
}
.main-menu-account-state {
  width:100%;
  margin:0 0 10px;
  padding:0 2px;
  color:#9299a2;
  font-size:9px;
  letter-spacing:.075em;
}
.main-menu-actions {
  width:100%;
  gap:6px;
}
.main-menu-btn {
  min-height:48px;
  padding:9px 15px 9px 17px;
  border-color:rgba(236,229,216,.085);
  background:rgba(8,10,13,.62);
  box-shadow:0 8px 24px rgba(0,0,0,.15);
}
.main-menu-btn > span { font-size:11px; }
.main-menu-btn > small { font-size:8px; }
.main-menu-version {
  margin-top:12px;
  padding-left:2px;
  font-size:7px;
  color:#59616b;
}

.menu-subscreen::before {
  background:
    linear-gradient(rgba(4,6,9,.64),rgba(4,6,9,.64)),
    url("lot49.webp") center center / cover no-repeat;
  transform:none;
}

@media (max-width:1200px) and (orientation:landscape) {
  .main-menu-content {
    right:5.3vw;
    top:37.5vh;
    width:min(310px,28vw);
  }
  .main-menu-btn { min-height:43px; padding:7px 12px 7px 14px; }
  .main-menu-btn > span { font-size:9px; }
  .main-menu-btn > small { font-size:7px; }
  .main-menu-account-state { font-size:7px; margin-bottom:7px; }
}

@media (max-width:980px) and (orientation:landscape) {
  .main-menu-content {
    right:5.5vw;
    top:36.5vh;
    width:min(250px,30vw);
    padding:0;
    min-height:0;
  }
  .main-menu-actions { gap:4px; width:100%; }
  .main-menu-btn { min-height:33px; padding:5px 9px 5px 11px; }
  .main-menu-btn > span { font-size:7px; }
  .main-menu-btn > small { font-size:5.5px; }
  .main-menu-account-state { margin-bottom:5px; font-size:5.5px; }
  .main-menu-version { margin-top:6px; font-size:5px; }
}

.world-map {
  background:
    radial-gradient(circle at 18% 22%, rgba(193,155,86,.09), transparent 24%),
    radial-gradient(circle at 78% 66%, rgba(193,155,86,.08), transparent 22%),
    linear-gradient(180deg, rgba(255,255,255,.018), rgba(255,255,255,.006));
}

.npc-hero {
  display:grid;
  grid-template-columns: 108px 1fr;
  gap:16px;
  align-items:center;
  margin-bottom:16px;
  padding:16px 18px;
}

.npc-portrait-wrap {
  position:relative;
  width:108px;
  height:108px;
  border-radius:22px;
  overflow:hidden;
  border:1px solid var(--line);
  background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

.npc-portrait,
.npc-portrait-fallback {
  width:100%;
  height:100%;
  object-fit:cover;
}

.npc-portrait-fallback {
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:40px;
  font-weight:800;
  color:var(--text);
  letter-spacing:.08em;
  background:linear-gradient(135deg, rgba(193,155,86,.22), rgba(255,255,255,.06));
}

.npc-hero-copy {
  min-width:0;
}

.npc-hero-copy h3 {
  margin:2px 0 8px;
  font-size:24px;
}

.npc-hero-copy p {
  margin:0;
  color:var(--muted);
  line-height:1.65;
}

@media (max-width: 980px) {
  .npc-hero {
    grid-template-columns: 86px 1fr;
    gap:12px;
    padding:14px;
  }

  .npc-portrait-wrap {
    width:86px;
    height:86px;
    border-radius:18px;
  }

  .npc-hero-copy h3 {
    font-size:20px;
  }
}


/* v1.1 — Menu principal & Notes de mise à jour
   Structure alignée sur The Last Horizon / Void Match. */
.main-menu-content {
  top:42.2vh;
}

.lot-patch-toggle {
  position:fixed;
  top:max(22px, calc(env(safe-area-inset-top) + 14px));
  left:max(24px, calc(env(safe-area-inset-left) + 14px));
  z-index:140;
  display:inline-flex;
  align-items:center;
  gap:9px;
  padding:9px 14px;
  border:1px solid rgba(202,166,102,.34);
  border-radius:999px;
  color:rgba(239,230,211,.88);
  background:rgba(8,10,13,.62);
  box-shadow:0 12px 30px rgba(0,0,0,.28);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  font-family:Georgia,"Times New Roman",serif;
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.14em;
  line-height:1;
  text-transform:uppercase;
  cursor:pointer;
  touch-action:manipulation;
  transition:border-color .2s ease,color .2s ease,background .2s ease,transform .2s ease;
}
.lot-patch-toggle:hover,
.lot-patch-toggle:focus-visible,
.lot-patch-toggle[aria-expanded="true"] {
  border-color:rgba(229,194,129,.72);
  color:#fff;
  background:rgba(30,25,18,.84);
  outline:none;
  transform:translateY(-1px);
}
.lot-patch-toggle-dot {
  width:7px;
  height:7px;
  flex:0 0 auto;
  border-radius:50%;
  background:#d7af69;
  box-shadow:0 0 12px rgba(215,175,105,.88);
}

.lot-patch-backdrop {
  position:fixed;
  inset:0;
  z-index:2400;
  background:rgba(3,4,6,.72);
  backdrop-filter:blur(5px);
  -webkit-backdrop-filter:blur(5px);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .22s ease,visibility .22s ease;
}
.lot-patch-panel {
  position:fixed;
  left:50%;
  top:50%;
  z-index:2410;
  width:min(720px,calc(100vw - 48px));
  max-height:min(78dvh,780px);
  padding:30px 32px 28px;
  overflow:hidden;
  border:1px solid rgba(202,166,102,.42);
  color:#f4efe5;
  background:
    linear-gradient(120deg,rgba(181,135,72,.14),transparent 38%),
    linear-gradient(180deg,rgba(19,20,22,.985),rgba(8,10,13,.995));
  box-shadow:
    0 34px 100px rgba(0,0,0,.72),
    inset 4px 0 0 rgba(181,135,72,.72),
    inset 0 1px 0 rgba(255,255,255,.035);
  clip-path:polygon(0 0,calc(100% - 28px) 0,100% 28px,100% 100%,20px 100%,0 calc(100% - 20px));
  transform:translate(-50%,-47%) scale(.985);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .22s ease,transform .22s ease,visibility .22s ease;
  touch-action:pan-y;
}
.main-menu.notes-open .lot-patch-backdrop {
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}
.main-menu.notes-open .lot-patch-panel {
  transform:translate(-50%,-50%) scale(1);
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}
.lot-patch-panel-head {
  position:relative;
  padding:0 48px 18px 0;
  border-bottom:1px solid rgba(202,166,102,.20);
}
.lot-patch-kicker {
  display:block;
  margin-bottom:8px;
  color:#d8b679;
  font-family:Georgia,"Times New Roman",serif;
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.22em;
}
.lot-patch-panel h2 {
  margin:0;
  color:#fff;
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(1.22rem,3vw,1.7rem);
  font-weight:700;
  letter-spacing:.08em;
  line-height:1.2;
}
.lot-patch-close {
  position:absolute;
  top:16px;
  right:18px;
  z-index:2;
  width:38px;
  height:38px;
  padding:0;
  border:1px solid rgba(202,166,102,.32);
  border-radius:50%;
  color:rgba(240,232,218,.76);
  background:rgba(255,255,255,.025);
  font-family:Arial,sans-serif;
  font-size:1.55rem;
  line-height:1;
  cursor:pointer;
  touch-action:manipulation;
  transition:border-color .2s ease,color .2s ease,background .2s ease,transform .2s ease;
}
.lot-patch-close:hover,
.lot-patch-close:focus-visible {
  border-color:rgba(229,194,129,.72);
  color:#fff;
  background:rgba(202,166,102,.10);
  outline:none;
  transform:rotate(3deg);
}
.lot-patch-scroll {
  max-height:calc(min(78dvh,780px) - 112px);
  margin-top:20px;
  padding:0 12px 6px 0;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:rgba(202,166,102,.52) rgba(255,255,255,.04);
}
.lot-patch-loading,
.lot-patch-error {
  margin:18px 0;
  color:#969da8;
  line-height:1.65;
}
.lot-patch-version {
  margin:26px 0 12px;
  color:#f1e7d4;
  font-family:Georgia,"Times New Roman",serif;
  font-size:.88rem;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.lot-patch-version:first-child { margin-top:0; }
.lot-patch-version span {
  margin-left:8px;
  color:#747b85;
  font-family:Inter,system-ui,sans-serif;
  font-size:.68rem;
  font-weight:700;
  letter-spacing:.08em;
}
.lot-patch-scroll ul {
  margin:0;
  padding-left:20px;
  color:#b1b6bf;
  line-height:1.65;
}
.lot-patch-scroll li { margin-bottom:11px; }
.lot-patch-scroll li strong { color:#eadbc0; font-weight:800; }
.lot-patch-separator {
  height:1px;
  margin:26px 0;
  border:0;
  background:linear-gradient(90deg,transparent,rgba(202,166,102,.30),transparent);
}

@media (max-width:1200px) and (orientation:landscape) {
  .main-menu-content { top:43.5vh; }
  .lot-patch-toggle { top:16px;left:18px;padding:8px 12px;font-size:.62rem; }
  .lot-patch-panel { width:min(660px,calc(100vw - 38px));max-height:82dvh;padding:24px 26px 22px; }
  .lot-patch-scroll { max-height:calc(82dvh - 104px); }
}
@media (max-width:980px) and (orientation:landscape) {
  .main-menu-content { top:45vh; }
  .lot-patch-toggle { top:12px;left:14px;padding:7px 10px;font-size:.54rem;gap:7px; }
  .lot-patch-toggle-dot { width:6px;height:6px; }
  .lot-patch-panel { width:min(610px,calc(100vw - 28px));max-height:86dvh;padding:20px 22px 18px; }
  .lot-patch-scroll { max-height:calc(86dvh - 96px);font-size:.86rem; }
}

/* v1.1c — carte du réseau structurée + boutique personnalisable */
.network-map {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  align-items:start;
}
.network-city {
  min-width:0;
  border:1px solid rgba(236,229,216,.075);
  border-radius:14px;
  background:linear-gradient(180deg,rgba(20,23,28,.76),rgba(12,15,19,.76));
  overflow:hidden;
  box-shadow:0 14px 34px rgba(0,0,0,.18);
}
.network-city:first-child { grid-column:span 2; }
.network-city.has-current { border-color:rgba(217,175,99,.24); }
.network-city-head {
  display:flex;
  align-items:center;
  gap:10px;
  padding:11px 13px;
  border-bottom:1px solid rgba(236,229,216,.06);
  background:rgba(255,255,255,.012);
}
.network-city-head span {
  display:grid;
  place-items:center;
  width:23px;
  height:23px;
  border-radius:7px;
  border:1px solid rgba(217,175,99,.18);
  color:#a88e65;
  font-size:8px;
  font-weight:850;
  letter-spacing:.08em;
}
.network-city-head h3 {
  margin:0;
  font-size:13px;
  letter-spacing:.13em;
  text-transform:uppercase;
  color:#d9d5cc;
}
.network-venues {
  display:grid;
  gap:8px;
  padding:9px;
}
.network-city:first-child .network-venues { grid-template-columns:repeat(3,minmax(0,1fr)); }
.network-venue {
  position:relative;
  min-width:0;
  min-height:112px;
  padding:13px 13px 12px;
  border:1px solid rgba(236,229,216,.07);
  border-radius:10px;
  background:rgba(9,12,16,.62);
  color:#e7e2d8;
  text-align:left;
  cursor:pointer;
  transition:transform .14s ease,border-color .14s ease,background .14s ease;
}
.network-venue:hover,
.network-venue:focus-visible {
  transform:translateY(-2px);
  border-color:rgba(217,175,99,.27);
  background:rgba(20,23,28,.82);
  outline:none;
}
.network-venue.current {
  border-color:rgba(217,175,99,.48);
  box-shadow:inset 3px 0 0 rgba(217,175,99,.72);
}
.network-venue.player-shop {
  background:linear-gradient(145deg,rgba(217,175,99,.075),rgba(9,12,16,.72) 54%);
}
.network-venue .node-kicker {
  display:block;
  padding-right:26px;
  color:#a88e65;
  font-size:8px;
  font-weight:800;
  letter-spacing:.14em;
  text-transform:uppercase;
}
.network-venue strong {
  display:block;
  margin-top:6px;
  font-size:13px;
  line-height:1.22;
}
.network-venue em {
  display:block;
  margin-top:6px;
  color:#777f8b;
  font-size:8px;
  font-style:normal;
  letter-spacing:.04em;
}
.network-venue small {
  display:block;
  margin-top:8px;
  color:#9ca3ad;
  font-size:9px;
  line-height:1.42;
}
.network-shop-cta {
  grid-column:span 2;
  min-height:92px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  padding:15px 18px;
  border:1px dashed rgba(217,175,99,.24);
  border-radius:14px;
  background:rgba(217,175,99,.035);
  color:#ddd8ce;
  text-align:left;
  cursor:pointer;
}
.network-shop-cta:hover { border-color:rgba(217,175,99,.48); background:rgba(217,175,99,.07); }
.network-shop-cta span { color:#a88e65; font-size:8px; font-weight:850; letter-spacing:.14em; }
.network-shop-cta strong { margin-top:5px; font-size:14px; }
.network-shop-cta small { margin-top:5px; color:#8e96a1; font-size:9px; }

.nav-dynamic-label {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font:inherit;
  font-weight:inherit;
}

.shop-city-list {
  display:grid;
  gap:8px;
  margin-bottom:18px;
}
.shop-city-list > div {
  padding:9px 0;
  border-bottom:1px solid rgba(236,229,216,.06);
}
.shop-city-list strong {
  display:block;
  color:#e6e1d7;
  font-size:11px;
}
.shop-city-list span {
  display:block;
  margin-top:4px;
  color:#848d99;
  font-size:9px;
  line-height:1.5;
}
.shop-unconfigured { max-width:720px; }
.shop-unconfigured h2 { margin:9px 0 5px; }
.shop-unconfigured p { color:var(--muted); line-height:1.65; }
.shop-setup-modal { width:min(760px,92vw); }
.shop-setup { display:grid; gap:16px; }
.shop-setup-intro h3 { margin:4px 0 7px; font-size:23px; }
.shop-setup-intro p { margin:0; color:var(--muted); line-height:1.6; }
.shop-setup-grid {
  display:grid;
  grid-template-columns:1.2fr 1fr 1fr;
  gap:10px;
}
.shop-setup-grid label {
  display:grid;
  gap:6px;
  color:#9da4ae;
  font-size:9px;
  font-weight:750;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.shop-setup-grid input,
.shop-setup-grid select { width:100%; }
.shop-setup-preview {
  padding:13px 14px;
  border:1px solid rgba(217,175,99,.16);
  border-radius:10px;
  background:rgba(217,175,99,.045);
}
.shop-setup-preview span {
  display:block;
  color:#8f97a2;
  font-size:8px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.shop-setup-preview strong {
  display:block;
  margin-top:5px;
  color:#e9e2d4;
  font-size:15px;
}
.shop-setup-error {
  min-height:18px;
  color:#e99a9a;
  font-size:10px;
  text-align:center;
}

@media (max-width:1250px) and (orientation:landscape) {
  .network-map { grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
  .network-city:first-child { grid-column:span 3; }
  .network-city:first-child .network-venues { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .network-venue { min-height:92px; padding:10px; }
  .network-shop-cta { grid-column:span 3; }
}
@media (max-width:980px) and (orientation:landscape) {
  .network-map { grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
  .network-city:first-child { grid-column:span 2; }
  .network-city:first-child .network-venues { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .network-city-head { padding:7px 9px; }
  .network-city-head span { width:18px; height:18px; font-size:6px; }
  .network-city-head h3 { font-size:9px; }
  .network-venues { padding:6px; gap:5px; }
  .network-venue { min-height:72px; padding:7px; border-radius:7px; }
  .network-venue .node-kicker { font-size:6px; }
  .network-venue strong { margin-top:3px; font-size:9px; }
  .network-venue em { margin-top:3px; font-size:6px; }
  .network-venue small { margin-top:4px; font-size:7px; }
  .network-shop-cta { grid-column:span 2; min-height:66px; padding:10px; }
  .network-shop-cta strong { font-size:10px; }
  .network-shop-cta small { font-size:7px; }
  .shop-setup-grid { grid-template-columns:1fr 1fr; }
  .shop-setup-grid label:first-child { grid-column:span 2; }
}


/* v1.1 — optimisation mobile paysage */
@media (max-width:980px) and (orientation:landscape) and (pointer:coarse) {
  html,
  body {
    width:100%;
    min-width:0;
    min-height:100dvh;
    margin:0;
    overflow-x:hidden;
    overscroll-behavior:none;
    background:#090b0d;
  }

  body {
    font-size:12px;
    -webkit-text-size-adjust:100%;
    touch-action:manipulation;
  }

  button,
  select,
  input { touch-action:manipulation; }

  /* MENU PRINCIPAL — compact sans devenir minuscule. */
  .main-menu,
  .menu-subscreen {
    width:100dvw;
    height:100dvh;
    min-width:0;
    min-height:0;
    overflow:hidden;
  }

  .main-menu::before {
    background:
      linear-gradient(90deg, rgba(6,7,9,.62) 0%, rgba(6,7,9,.28) 48%, rgba(6,7,9,.18) 66%, rgba(6,7,9,.48) 100%),
      linear-gradient(0deg, rgba(4,5,7,.68), transparent 64%),
      url("lot49.webp") center center / cover no-repeat;
    transform:none;
  }

  .main-menu-content {
    left:auto;
    right:max(14px,calc(env(safe-area-inset-right) + 10px));
    top:auto;
    bottom:max(10px,calc(env(safe-area-inset-bottom) + 7px));
    width:min(46vw,370px);
    height:auto;
    min-height:0;
    padding:0;
  }

  .main-menu-account-state {
    width:100%;
    min-height:18px;
    margin:0 0 7px;
    padding:0 2px;
    gap:7px;
    font-size:8px;
    letter-spacing:.075em;
  }
  .main-menu-account-state i {
    width:7px;
    height:7px;
    flex-basis:7px;
  }

  .main-menu-actions {
    width:100%;
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:5px;
  }
  #mainMenuPlay,
  #mainMenuAccount { grid-column:1 / -1; }

  .main-menu-btn {
    min-width:0;
    min-height:37px;
    padding:7px 10px 7px 12px;
    gap:6px;
    border-radius:7px;
    background:rgba(8,10,13,.72);
    backdrop-filter:blur(8px);
    -webkit-backdrop-filter:blur(8px);
  }
  #mainMenuPlay,
  #mainMenuAccount {
    min-height:41px;
    grid-template-columns:minmax(0,1fr) auto;
    padding-inline:13px;
  }
  .main-menu-btn > span {
    min-width:0;
    overflow:hidden;
    font-size:9px;
    letter-spacing:.085em;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .main-menu-btn > small {
    max-width:120px;
    overflow:hidden;
    font-size:7px;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .main-menu-actions .main-menu-btn:not(#mainMenuPlay):not(#mainMenuAccount) {
    display:flex;
    justify-content:center;
    text-align:center;
    padding-inline:7px;
  }
  .main-menu-version {
    margin-top:5px;
    padding-left:2px;
    font-size:6px;
  }

  .lot-patch-toggle {
    left:max(12px,calc(env(safe-area-inset-left) + 8px));
    top:max(10px,calc(env(safe-area-inset-top) + 8px));
    padding:8px 11px;
    gap:7px;
    font-size:9px;
    letter-spacing:.13em;
  }
  .lot-patch-toggle-dot { width:7px;height:7px; }
  .lot-patch-panel {
    width:calc(100dvw - max(28px,calc(env(safe-area-inset-left) + env(safe-area-inset-right) + 16px)));
    max-width:690px;
    max-height:calc(100dvh - 14px);
    padding:18px 20px 16px;
  }
  .lot-patch-panel-head { padding:0 42px 11px 0; }
  .lot-patch-panel h2 { font-size:19px; }
  .lot-patch-kicker { margin-bottom:5px;font-size:9px; }
  .lot-patch-close { top:10px;right:12px;width:32px;height:32px;font-size:20px; }
  .lot-patch-scroll {
    max-height:calc(100dvh - 92px);
    margin-top:12px;
    font-size:11px;
    line-height:1.48;
  }
  .lot-patch-version { margin:15px 0 8px;font-size:11px; }
  .lot-patch-scroll li { margin-bottom:7px; }
  .lot-patch-separator { margin:16px 0; }

  /* Sous-menus du menu principal. */
  .menu-subscreen {
    padding:max(6px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));
  }
  .menu-subscreen-panel {
    width:min(920px,100%);
    max-height:calc(100dvh - 12px);
    border-radius:10px;
  }
  .menu-subscreen-head { padding:9px 12px; }
  .menu-subscreen-head h2 { font-size:15px; }
  .menu-subscreen-head span { font-size:7px; }
  .menu-close { width:30px;height:30px;font-size:18px; }
  .menu-options-list {
    grid-template-columns:repeat(3,minmax(0,1fr));
    padding:10px;
    gap:7px;
  }
  .menu-option-card {
    min-height:104px;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    padding:10px;
  }
  .menu-option-card > div { flex:1; }
  .menu-option-card strong { font-size:9px; }
  .menu-option-card p { font-size:8px;line-height:1.4; }
  .menu-option-card > button { width:100%;min-width:0;padding:7px 8px;font-size:8px; }
  .menu-rules-grid {
    grid-template-columns:repeat(3,minmax(0,1fr));
    padding:9px;
    gap:6px;
  }
  .menu-rules-grid article {
    min-height:96px;
    padding:9px 9px 9px 34px;
  }
  .menu-rules-grid b { left:9px;top:10px;font-size:8px; }
  .menu-rules-grid h3 { margin-bottom:5px;font-size:9px; }
  .menu-rules-grid p { font-size:8px;line-height:1.38; }
  .menu-subscreen-footer { padding:7px 10px 9px; }
  .credits-panel-main { width:min(650px,88vw); }
  .menu-credits-main { padding:12px 18px 10px; }
  .menu-credits-main > img { width:54px;height:54px;margin-bottom:7px; }
  .menu-credit-row { padding:6px 1px; }
  .menu-credit-row span,
  .menu-credit-row strong,
  .menu-credits-main p { font-size:8px; }

  /* JEU — récupération de hauteur dans Safari paysage. */
  .app-shell { min-height:100dvh; }
  .topbar {
    height:54px;
    grid-template-columns:132px minmax(0,1fr) auto;
    gap:7px;
    padding:4px max(8px,calc(env(safe-area-inset-right) + 5px)) 4px max(8px,calc(env(safe-area-inset-left) + 5px));
  }
  .brand-block { gap:7px; }
  .brand-mark {
    width:42px;
    height:42px;
    flex-basis:42px;
    padding:4px;
  }
  .brand-copy { padding-left:7px;min-height:25px; }
  .brand-date { font-size:10px; }
  .top-stats {
    grid-template-columns:repeat(5,minmax(52px,1fr));
    gap:3px;
  }
  .stat-chip { padding:4px 6px; }
  .stat-chip span { font-size:7px; }
  .stat-chip strong { font-size:10px; }
  .header-actions { gap:3px; }
  .game-account-chip { display:none; }
  .header-actions .ghost-btn {
    min-height:32px;
    padding:6px 8px;
    font-size:8px;
  }

  .main-layout { min-height:calc(100dvh - 54px); }
  .sidebar {
    top:54px;
    padding:4px max(6px,calc(env(safe-area-inset-right) + 3px)) 4px max(6px,calc(env(safe-area-inset-left) + 3px));
  }
  .nav-list { gap:3px; }
  .nav-btn {
    min-height:32px;
    padding:6px 9px;
    font-size:9px;
  }
  .view-root {
    padding:10px max(10px,calc(env(safe-area-inset-right) + 7px)) max(18px,calc(env(safe-area-inset-bottom) + 12px)) max(10px,calc(env(safe-area-inset-left) + 7px));
  }
  .view-header { margin-bottom:10px;gap:8px; }
  .view-header h1 { font-size:20px; }
  .view-header p { margin-top:4px;font-size:10px;line-height:1.42; }
  .header-meta { max-width:46%;gap:4px; }
  .badge { padding:4px 6px;font-size:8px; }

  /* Carte réseau : trois colonnes lisibles, plus de texte microscopique. */
  .network-map {
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:7px;
  }
  .network-city:first-child { grid-column:span 3; }
  .network-city:first-child .network-venues { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .network-city-head { padding:7px 9px; }
  .network-city-head h3 { font-size:10px; }
  .network-city-head span { width:20px;height:20px;font-size:7px; }
  .network-venues { padding:6px;gap:5px; }
  .network-venue { min-height:78px;padding:8px; }
  .network-venue .node-kicker { font-size:7px; }
  .network-venue strong { font-size:10px; }
  .network-venue em { font-size:7px; }
  .network-venue small { font-size:8px;line-height:1.3; }
  .network-shop-cta { grid-column:span 3;min-height:66px;padding:10px 12px; }

  /* Commerçants. */
  .npc-hero {
    grid-template-columns:68px 1fr;
    gap:10px;
    margin-bottom:10px;
    padding:9px 11px;
  }
  .npc-portrait-wrap { width:68px;height:68px;border-radius:13px; }
  .npc-hero-copy h3 { margin:1px 0 4px;font-size:17px; }
  .npc-hero-copy p { font-size:10px;line-height:1.4; }

  /* Services / enchères : conserver de vraies zones tactiles. */
  .primary-btn,
  .secondary-btn,
  .ghost-btn,
  .danger-btn { min-height:32px;padding:6px 9px;font-size:9px; }
  .service-grid { grid-template-columns:minmax(0,1fr) 250px;gap:7px; }
  .service-item { padding:8px; }
  .service-item h4 { font-size:10px; }
  .service-item p { font-size:8px; }
  .lot-card { grid-template-columns:62px minmax(0,1fr) 112px;gap:8px;padding:8px; }
  .lot-level { width:56px;height:56px; }
  .lot-info h3 { font-size:12px; }
  .lot-info p { font-size:9px; }
  .lot-action { width:112px; }
  .bid-layout { grid-template-columns:minmax(0,1fr) 210px;gap:7px; }
  .bid-price strong { font-size:32px; }
  .bidder { padding:7px; }

  /* Modales : presque plein écran, texte réellement lisible. */
  .modal-backdrop {
    padding:max(5px,env(safe-area-inset-top)) max(6px,env(safe-area-inset-right)) max(5px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));
  }
  .modal,
  .modal.service-modal,
  .modal.locksmith-result-modal,
  .modal.account-modal,
  .shop-setup-modal {
    width:min(940px,calc(100dvw - 12px));
    max-height:calc(100dvh - 10px);
    border-radius:9px;
  }
  .modal-head { padding:9px 12px; }
  .modal-head h2 { font-size:14px; }
  .modal-body,
  .modal.service-modal .modal-body,
  .modal.account-modal .modal-body { padding:10px 12px; }
  .modal-close { width:30px;height:30px; }

  .tutorial {
    grid-template-columns:132px minmax(0,1fr);
    gap:13px;
  }
  .tutorial-index { padding-right:10px;gap:5px; }
  .tutorial-step { min-height:35px;padding:7px 8px;font-size:9px; }
  .tutorial-content h3 { margin-bottom:9px;font-size:18px;line-height:1.12; }
  .tutorial-content p { margin:0 0 9px;font-size:10.5px;line-height:1.46; }
  .modal-action-footer { margin-top:10px; }

  .reveal-grid { grid-template-columns:repeat(3,minmax(0,1fr));gap:6px; }
  .reveal-card { padding:8px; }
  .reveal-card h4 { font-size:9px; }
  .reveal-card p,
  .reveal-card .index { font-size:7px; }

  .shop-setup { gap:10px; }
  .shop-setup-intro h3 { font-size:17px; }
  .shop-setup-intro p { font-size:10px; }
  .shop-setup-grid { grid-template-columns:1.15fr 1fr 1fr;gap:7px; }
  .shop-setup-grid label:first-child { grid-column:auto; }
  .shop-setup-preview { padding:9px 10px; }

  /* Tables : elles défilent à l'intérieur sans élargir toute la page. */
  .table-wrap { overflow-x:auto;-webkit-overflow-scrolling:touch; }
  .inventory-table { min-width:720px; }
  .collection-table { min-width:620px; }
}

/* Téléphones particulièrement bas (Safari avec barres visibles). */
@media (max-width:980px) and (orientation:landscape) and (pointer:coarse) and (max-height:430px) {
  .main-menu-content {
    bottom:max(6px,calc(env(safe-area-inset-bottom) + 4px));
    width:min(47vw,360px);
  }
  .main-menu-account-state { margin-bottom:5px;font-size:7px; }
  .main-menu-btn { min-height:33px;padding-block:5px; }
  #mainMenuPlay,
  #mainMenuAccount { min-height:36px; }
  .main-menu-btn > span { font-size:8px; }
  .main-menu-btn > small { font-size:6.5px; }
  .main-menu-version { display:none; }

  .topbar { height:50px;grid-template-columns:120px minmax(0,1fr) auto; }
  .brand-mark { width:38px;height:38px;flex-basis:38px; }
  .main-layout { min-height:calc(100dvh - 50px); }
  .sidebar { top:50px; }
  .nav-btn { min-height:29px;padding-block:5px; }
  .view-root { padding-top:8px; }

  .menu-option-card { min-height:92px; }
  .menu-rules-grid article { min-height:84px; }
  .menu-rules-grid p { font-size:7.5px; }

  .tutorial-content p { font-size:9.5px;line-height:1.4; }
  .npc-portrait-wrap { width:60px;height:60px; }
  .npc-hero { grid-template-columns:60px 1fr; }
}


/* Notifications brèves et non bloquantes */
.toast-root,
.toast {
  pointer-events:none !important;
}
.toast {
  transition:opacity .32s ease, transform .32s ease;
}
.toast.leaving {
  opacity:0;
  transform:translateY(6px);
}


/* Spinners blancs pour les champs numériques sur fond sombre */
input[type="number"] {
  color-scheme: dark;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: inner-spin-button;
  appearance: auto;
  opacity: 1;
  min-height: 1.8em;
  filter: invert(1) brightness(2.4) contrast(1.2);
}


/* v1.1 — boutique : retrait manuel et négociation avec les visiteurs */
.shop-tabs { display:flex; gap:8px; margin:0 0 16px; padding:5px; width:max-content; max-width:100%; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.018); }
.shop-tab { display:inline-flex; align-items:center; gap:8px; min-height:38px; padding:8px 15px; border:0; border-radius:8px; background:transparent; color:var(--muted); font-weight:500; letter-spacing:.06em; cursor:pointer; }
.shop-tab:hover,.shop-tab:focus-visible { color:var(--text); outline:none; }
.shop-tab.active { background:rgba(217,175,99,.10); color:#eee5d5; box-shadow:inset 0 0 0 1px rgba(217,175,99,.20); }
.shop-tab span { display:inline-flex; align-items:center; justify-content:center; min-width:20px; height:20px; padding:0 6px; border-radius:999px; background:rgba(255,255,255,.08); font-size:9px; font-weight:700; }
.shop-tab .visitor-count { background:#d8bb80; color:#111315; }
.shop-listing-grid { display:grid; gap:9px; }
.shop-listing-card { display:grid; grid-template-columns:minmax(220px,1.35fr) minmax(140px,.65fr) minmax(150px,.7fr) auto; gap:14px; align-items:center; padding:13px 14px; border:1px solid var(--line); border-radius:10px; background:rgba(255,255,255,.018); }
.shop-listing-copy,.shop-listing-price,.shop-listing-time { display:grid; gap:4px; min-width:0; }
.shop-listing-copy span,.shop-listing-price span,.shop-listing-time span { color:var(--muted); font-size:8px; text-transform:uppercase; letter-spacing:.08em; }
.shop-listing-price strong,.shop-listing-time strong { font-size:13px; }
.shop-listing-price small,.shop-listing-time small { color:var(--muted); font-size:9px; }
.shop-item-link,.shop-item-inline { border:0; padding:0; background:none; color:#f1eee7; font:inherit; font-weight:800; text-align:left; cursor:pointer; text-decoration:underline; text-decoration-color:rgba(217,175,99,.32); text-underline-offset:3px; }
.shop-item-link:hover,.shop-item-inline:hover { color:var(--accent-2); text-decoration-color:currentColor; }
.shop-item-inline { display:inline; font-weight:850; }
.visitor-waiting { color:#d8bb80 !important; font-weight:800; }
.shop-withdraw-btn { min-height:34px; padding:6px 11px; }
.visitor-list { display:grid; gap:14px; }
.visitor-card { display:grid; gap:14px; }
.visitor-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.visitor-card-head h3 { margin:4px 0 0; font-size:22px; }
.visitor-line { margin:0; color:#c1c6ce; line-height:1.7; font-size:14px; }
.visitor-line strong { color:#eee5d5; }
.visitor-actions { display:grid; grid-template-columns:auto minmax(300px,1fr) auto; gap:10px; align-items:end; }
.visitor-counter { display:grid; grid-template-columns:minmax(160px,1fr) auto; gap:8px; align-items:end; }
.visitor-counter label { display:grid; gap:5px; color:var(--muted); font-size:8px; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.visitor-counter .shop-price-input { width:100%; min-width:0; }
.shop-item-info-modal { width:min(620px,90vw); }
.shop-item-info-card { display:grid; gap:16px; padding:4px 2px; }
.shop-item-info-title h3 { margin:5px 0 3px; font-size:24px; }
.shop-item-info-title p { margin:0; color:var(--muted); }
.shop-item-info-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; }
.shop-item-info-grid > div { display:grid; gap:4px; padding:11px 12px; border:1px solid var(--line); border-radius:9px; background:rgba(255,255,255,.018); }
.shop-item-info-grid span { color:var(--muted); font-size:8px; text-transform:uppercase; letter-spacing:.07em; }
.shop-item-info-grid strong { font-size:12px; }
.nav-btn .nav-notification.available.visitor { background:#e0bd6e; box-shadow:0 0 0 4px rgba(224,189,110,.11),0 4px 10px rgba(0,0,0,.28); }

@media (max-width:1100px) and (orientation:landscape) {
  .shop-listing-card { grid-template-columns:minmax(170px,1.2fr) minmax(110px,.55fr) minmax(120px,.6fr) auto; gap:8px; padding:9px 10px; }
  .shop-listing-copy span,.shop-listing-price span,.shop-listing-time span { font-size:6.5px; }
  .shop-listing-price strong,.shop-listing-time strong { font-size:10px; }
  .shop-listing-price small,.shop-listing-time small { font-size:7px; }
  .shop-item-link { font-size:10px; }
  .visitor-card { gap:9px; padding:11px 12px; }
  .visitor-card-head h3 { font-size:16px; }
  .visitor-line { font-size:10px; line-height:1.5; }
  .visitor-actions { grid-template-columns:auto minmax(260px,1fr) auto; gap:7px; }
  .visitor-counter { grid-template-columns:minmax(120px,1fr) auto; }
  .visitor-actions .primary-btn,.visitor-actions .secondary-btn,.visitor-actions .ghost-btn { min-height:34px; padding:6px 9px; font-size:8px; }
  .shop-tabs { margin-bottom:10px; }
  .shop-tab { min-height:31px; padding:6px 10px; font-size:8px; }
  .shop-item-info-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
}


/* v1.1 — lisibilité des champs numériques de la boutique */
.shop-price-input,
input.shop-price-input,
input[type="number"].shop-price-input {
  color: #f3efe6 !important;
  -webkit-text-fill-color: #f3efe6 !important;
  caret-color: #f3efe6 !important;
}

.shop-price-input::placeholder,
input.shop-price-input::placeholder {
  color: rgba(243,239,230,.56) !important;
  -webkit-text-fill-color: rgba(243,239,230,.56) !important;
}


/* v1.1 — correctif Safari/iOS : texte des champs numériques bien blanc */
input[type="number"],
input[type="number"]:focus,
input[type="number"]:active,
.shop-price-input,
.shop-price-input:focus,
.shop-price-input:active {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: 0 0 0 #ffffff !important;
  caret-color: #ffffff !important;
  opacity: 1 !important;
}


/* v1.1 — correctif final Safari : flèches blanches sans inverser le texte */
input[type="number"] {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff !important;
  opacity: 1 !important;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  opacity: 1 !important;
  filter: invert(1) brightness(2.4) contrast(1.15);
}


/* v1.1 — boutique visiteurs restaurée + steppers blancs lisibles */
.shop-stepper {
  display:inline-flex;
  align-items:center;
  gap:10px;
  min-width:180px;
  padding:10px 14px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(8,12,18,.86);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.03);
}
.shop-stepper .shop-price-input {
  width:100%;
  min-width:0;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
  caret-color:#ffffff !important;
  font-size:28px;
  font-weight:700;
  line-height:1;
  padding:0 !important;
  opacity:1 !important;
}
.shop-stepper .shop-price-input:focus {
  outline:none;
  color:#ffffff !important;
  -webkit-text-fill-color:#ffffff !important;
}
.shop-stepper-buttons {
  display:flex;
  flex-direction:column;
  gap:6px;
  flex:0 0 auto;
}
.shop-stepper-btn {
  width:34px;
  height:28px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.12);
  color:#ffffff;
  font-size:17px;
  line-height:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.shop-stepper-btn:hover { background:rgba(255,255,255,.18); }
.shop-stepper-btn:active { transform:translateY(1px); }
.visitor-counter .shop-stepper { width:100%; }
.visitor-counter .shop-price-input { width:100%; min-width:0; }


/* PATCH FINAL — suppression totale des flèches de prix */
input[type="number"] {
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: none !important;
  margin: 0 !important;
  opacity: 0 !important;
}

/* Les boutons ▲/▼ ajoutés par l'ancien correctif ne doivent plus exister visuellement. */
.shop-stepper-buttons,
.shop-stepper-btn {
  display: none !important;
}

/* Retour au champ compact d'origine, sans wrapper surdimensionné. */
.shop-stepper {
  display: block !important;
  min-width: 0 !important;
  width: auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.shop-stepper .shop-price-input,
.visitor-counter .shop-stepper .shop-price-input {
  width: 110px !important;
  min-width: 0 !important;
  padding: 9px 10px !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  background: var(--panel-2) !important;
  box-shadow: none !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff !important;
  font: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  line-height: normal !important;
}
.visitor-counter .shop-stepper {
  width: auto !important;
}
.visitor-counter .shop-stepper .shop-price-input {
  width: 100% !important;
}

/* Patch — champ de contre-offre aligné sur les boutons */
.visitor-counter .shop-stepper .shop-price-input {
  min-height: 52px !important;
  height: 52px !important;
  padding: 0 14px !important;
  font-size: 15px !important;
  font-weight: 650 !important;
  line-height: 52px !important;
  box-sizing: border-box !important;
}

@media (max-width:1100px) and (orientation:landscape) {
  .visitor-counter .shop-stepper .shop-price-input {
    min-height: 34px !important;
    height: 34px !important;
    padding: 0 10px !important;
    font-size: 11px !important;
    line-height: 34px !important;
  }
}

/* PATCH — coffres mieux distingués, actions marché alignées, familles visibles en enchère */
.market-actions {
  display:inline-flex !important;
  flex-wrap:nowrap !important;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}
.market-actions .tiny-btn {
  white-space:nowrap;
  flex:0 0 auto;
}
.actions-cell .market-actions {
  justify-content:flex-start;
}
.auction-family-badge {
  border-color: rgba(103,185,128,.28);
  background: rgba(103,185,128,.10);
  color: #b8e3c5;
}
.reveal-safe-card {
  border-color: rgba(220,177,70,.30) !important;
  background: #141619 !important;
  box-shadow: none !important;
}
.reveal-safe-card::before {
  width: 3px;
  background: #dcb146 !important;
}
.reveal-safe-kicker {
  margin-bottom: 18px;
  color: #eed48f;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .10em;
  text-transform: uppercase;
}
.reveal-safe-card .reveal-value {
  margin-top: 0;
  color: #f1eee7;
  font-size: 20px;
  font-weight: 800;
}
.reveal-safe-foot {
  margin-top: 22px;
  color: #c6b27a;
  font-size: 12px;
}

@media (max-width:1100px) and (orientation:landscape) {
  .market-actions { gap:5px; }
  .market-actions .tiny-btn { font-size:9px; padding:5px 6px; }
  .reveal-safe-kicker { margin-bottom:10px; font-size:8px; }
  .reveal-safe-card .reveal-value { font-size:13px; }
  .reveal-safe-foot { margin-top:12px; font-size:8px; }
}

/* PATCH — satisfaction et fidélité des visiteurs de la boutique */
.visitor-relation {
  display:block;
  margin-top:5px;
  color:var(--muted);
  font-size:10px;
  font-weight:500;
  letter-spacing:.02em;
}
.customer-ledger {
  display:grid;
  gap:16px;
}
.customer-ledger-summary {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.customer-ledger-summary > div {
  display:grid;
  gap:5px;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:10px;
  background:rgba(255,255,255,.018);
}
.customer-ledger-summary span,
.customer-metric span,
.customer-satisfaction-head span {
  color:var(--muted);
  font-size:8px;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.customer-ledger-summary strong {
  font-size:19px;
}
.customer-list {
  display:grid;
  gap:8px;
}
.customer-row {
  display:grid;
  grid-template-columns:minmax(150px,.85fr) minmax(220px,1.25fr) 90px 90px 130px;
  gap:14px;
  align-items:center;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:10px;
  background:rgba(255,255,255,.014);
}
.customer-name,
.customer-metric {
  display:grid;
  gap:4px;
}
.customer-name strong {
  font-size:14px;
}
.customer-name span {
  color:var(--muted);
  font-size:10px;
}
.customer-metric strong {
  font-size:12px;
}
.customer-satisfaction {
  display:grid;
  gap:7px;
}
.customer-satisfaction-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.customer-satisfaction-head strong {
  font-size:11px;
}
.customer-satisfaction-track {
  height:7px;
  overflow:hidden;
  border-radius:999px;
  background:rgba(255,255,255,.07);
}
.customer-satisfaction-track i {
  display:block;
  height:100%;
  border-radius:inherit;
  background:#b59a62;
}
.customer-satisfaction-track i.good { background:#67b980; }
.customer-satisfaction-track i.bad { background:#d86f6f; }
.customer-ledger-note {
  margin:0;
  color:var(--muted);
  font-size:10px;
  line-height:1.5;
}

@media (max-width:1100px) and (orientation:landscape) {
  .visitor-relation { font-size:7px; margin-top:3px; }
  .customer-ledger { gap:10px; }
  .customer-ledger-summary { gap:6px; }
  .customer-ledger-summary > div { padding:8px 9px; border-radius:7px; }
  .customer-ledger-summary span,
  .customer-metric span,
  .customer-satisfaction-head span { font-size:6px; }
  .customer-ledger-summary strong { font-size:13px; }
  .customer-row {
    grid-template-columns:minmax(100px,.85fr) minmax(145px,1.2fr) 55px 55px 85px;
    gap:7px;
    padding:8px 9px;
    border-radius:7px;
  }
  .customer-name strong { font-size:10px; }
  .customer-name span { font-size:7px; }
  .customer-metric strong,
  .customer-satisfaction-head strong { font-size:8px; }
  .customer-satisfaction-track { height:5px; }
  .customer-ledger-note { font-size:7px; }
}

/* v1.1 — règles du jeu : présentation éditoriale */
.rules-panel-main {
  width:min(1040px,90vw);
}
.rules-manual {
  padding:22px;
}
.rules-manual-intro {
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(260px,.65fr);
  gap:22px;
  align-items:stretch;
  padding:22px;
  border:1px solid rgba(217,175,99,.16);
  border-radius:12px;
  background:linear-gradient(135deg,rgba(217,175,99,.075),rgba(255,255,255,.012) 58%);
}
.rules-eyebrow,
.rules-chapter-kicker {
  display:block;
  color:#a48d65;
  font-size:8px;
  font-weight:800;
  letter-spacing:.18em;
  text-transform:uppercase;
}
.rules-manual-intro h3 {
  max-width:650px;
  margin:8px 0 10px;
  color:#f0ece4;
  font-size:22px;
  line-height:1.22;
  letter-spacing:-.015em;
}
.rules-manual-intro p {
  max-width:700px;
  margin:0;
  color:#929aa5;
  font-size:11px;
  line-height:1.65;
}
.rules-keypoints {
  display:grid;
  align-content:center;
  gap:7px;
}
.rules-keypoints span {
  position:relative;
  padding:10px 12px 10px 28px;
  border:1px solid rgba(255,255,255,.065);
  border-radius:8px;
  background:rgba(7,9,12,.32);
  color:#c5c9cf;
  font-size:9px;
  font-weight:700;
  letter-spacing:.025em;
}
.rules-keypoints span::before {
  content:'•';
  position:absolute;
  left:12px;
  top:8px;
  color:#d2ae6b;
  font-size:13px;
}
.rules-manual-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) 290px;
  gap:16px;
  margin-top:16px;
}
.rules-chapters {
  overflow:hidden;
  border:1px solid rgba(255,255,255,.07);
  border-radius:11px;
  background:rgba(255,255,255,.012);
}
.rules-chapter {
  display:grid;
  grid-template-columns:52px minmax(0,1fr);
  gap:15px;
  padding:17px 20px;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.rules-chapter:last-child { border-bottom:0; }
.rules-chapter > b {
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding-top:2px;
  color:#756a57;
  font-size:15px;
  font-weight:650;
  font-variant-numeric:tabular-nums;
}
.rules-chapter > div {
  min-width:0;
}
.rules-chapter h3 {
  margin:4px 0 6px;
  color:#ebe8e1;
  font-size:12px;
  letter-spacing:.055em;
}
.rules-chapter p {
  margin:0;
  color:#9299a3;
  font-size:10px;
  line-height:1.58;
}
.rules-reference {
  align-self:start;
  display:grid;
  gap:0;
  padding:18px;
  border:1px solid rgba(217,175,99,.12);
  border-radius:11px;
  background:rgba(217,175,99,.035);
}
.rules-reference > .rules-eyebrow {
  margin-bottom:10px;
}
.rules-reference-item {
  display:grid;
  grid-template-columns:26px minmax(0,1fr);
  gap:9px;
  padding:12px 0;
  border-top:1px solid rgba(255,255,255,.055);
}
.rules-reference-item:first-of-type { border-top:0; }
.rules-reference-item b {
  color:#a48d65;
  font-size:9px;
  font-weight:800;
}
.rules-reference-item p {
  margin:0;
  color:#9ba1aa;
  font-size:9px;
  line-height:1.55;
}

@media (max-width:1100px) and (orientation:landscape) {
  .rules-panel-main { width:min(940px,94vw); }
  .rules-manual { padding:11px; }
  .rules-manual-intro {
    grid-template-columns:minmax(0,1.45fr) minmax(210px,.55fr);
    gap:12px;
    padding:13px 14px;
    border-radius:8px;
  }
  .rules-manual-intro h3 { margin:5px 0 6px; font-size:14px; }
  .rules-manual-intro p { font-size:8px; line-height:1.45; }
  .rules-eyebrow,.rules-chapter-kicker { font-size:6px; }
  .rules-keypoints { gap:4px; }
  .rules-keypoints span { padding:6px 7px 6px 20px; border-radius:5px; font-size:6.5px; }
  .rules-keypoints span::before { left:8px; top:4px; font-size:10px; }
  .rules-manual-layout { grid-template-columns:minmax(0,1fr) 230px; gap:8px; margin-top:8px; }
  .rules-chapter { grid-template-columns:34px minmax(0,1fr); gap:8px; padding:9px 11px; }
  .rules-chapter > b { font-size:9px; }
  .rules-chapter h3 { margin:2px 0 3px; font-size:8px; }
  .rules-chapter p { font-size:7px; line-height:1.38; }
  .rules-reference { padding:10px; border-radius:7px; }
  .rules-reference > .rules-eyebrow { margin-bottom:5px; }
  .rules-reference-item { grid-template-columns:20px minmax(0,1fr); gap:5px; padding:7px 0; }
  .rules-reference-item b,.rules-reference-item p { font-size:6.5px; }
  .rules-reference-item p { line-height:1.38; }
}

@media (max-width:760px) and (orientation:landscape) {
  .rules-manual-intro { grid-template-columns:1fr; }
  .rules-keypoints { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .rules-manual-layout { grid-template-columns:1fr; }
  .rules-reference { grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:14px; }
  .rules-reference > .rules-eyebrow { grid-column:1/-1; }
}


/* v1.1 — musique d'ambiance */
.menu-option-card.menu-option-audio {
  align-items: stretch;
}
.menu-option-audio > div:first-child {
  align-self: center;
}
.menu-audio-controls {
  flex: 0 0 min(330px, 42%);
  display: grid;
  grid-template-columns: 122px minmax(140px,1fr);
  align-items: center;
  gap: 14px;
}
.menu-audio-controls .secondary-btn {
  min-width: 0;
  width: 100%;
}
.menu-audio-controls .secondary-btn.is-off {
  color: #9198a2;
  border-color: rgba(255,255,255,.08);
  background: rgba(255,255,255,.025);
}
.menu-volume-control {
  display: grid;
  gap: 8px;
  min-width: 0;
}
.menu-volume-control > span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #8d949e;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.menu-volume-control b {
  color: #ddd6c8;
  font-weight: 750;
}
.menu-volume-control input[type="range"] {
  width: 100%;
  margin: 0;
  accent-color: #c9a867;
  cursor: pointer;
}

@media (max-width:1100px) and (orientation:landscape) {
  .menu-options-list {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .menu-audio-controls {
    flex: 0 0 auto;
    width: 100%;
    grid-template-columns: 82px minmax(0,1fr);
    gap: 8px;
  }
  .menu-volume-control { gap: 5px; }
  .menu-volume-control > span { font-size: 6.5px; }
}


/* Correctif mise en page — option Musique */
.menu-option-card.menu-option-audio {
  align-items: center;
}

.menu-option-card.menu-option-audio > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0,1fr);
  align-items: center;
  column-gap: 8px;
}

.menu-option-card.menu-option-audio > .menu-audio-controls {
  flex: 0 0 430px;
  width: 430px;
  min-width: 0;
  display: grid;
  grid-template-columns: 142px minmax(0,1fr);
  align-items: center;
  gap: 20px;
}

.menu-option-card.menu-option-audio .menu-audio-controls .secondary-btn {
  width: 142px;
  min-width: 142px;
  min-height: 48px;
  padding: 9px 12px;
  white-space: nowrap;
}

.menu-option-card.menu-option-audio .menu-volume-control {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
}

.menu-option-card.menu-option-audio .menu-volume-control > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.menu-option-card.menu-option-audio .menu-volume-control input[type="range"] {
  display: block;
  width: 100%;
  height: 18px;
  margin: 0;
}

@media (max-width:1100px) and (orientation:landscape) {
  .menu-option-card.menu-option-audio {
    grid-column: span 2;
    min-height: 82px;
    flex-direction: row;
    align-items: center;
  }

  .menu-option-card.menu-option-audio > .menu-audio-controls {
    flex: 0 0 330px;
    width: 330px;
    grid-template-columns: 96px minmax(0,1fr);
    gap: 10px;
  }

  .menu-option-card.menu-option-audio .menu-audio-controls .secondary-btn {
    width: 96px;
    min-width: 96px;
    min-height: 34px;
    padding: 6px 8px;
    font-size: 8px;
  }

  .menu-option-card.menu-option-audio .menu-volume-control {
    gap: 5px;
  }
}

/* v1.1 — compétences détaillées et compétence Boutique */
.skill-card {
  display:flex;
  flex-direction:column;
}
.skill-card-top > div {
  min-width:0;
}
.skill-card-top .badge {
  flex:0 0 auto;
}
.skill-effects {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin:12px 0 14px;
}
.skill-effects > div {
  min-width:0;
  padding:10px 11px;
  border:1px solid rgba(236,229,216,.075);
  border-radius:8px;
  background:rgba(255,255,255,.018);
}
.skill-effects > div.next {
  border-color:rgba(217,175,99,.18);
  background:rgba(217,175,99,.045);
}
.skill-effects span {
  display:block;
  margin-bottom:5px;
  color:#7f8792;
  font-size:8px;
  font-weight:750;
  letter-spacing:.11em;
  text-transform:uppercase;
}
.skill-effects > div.next span {
  color:#b49a68;
}
.skill-effects strong {
  display:block;
  color:#c7cbd2;
  font-size:10px;
  font-weight:500;
  line-height:1.45;
}
.skill-card-foot {
  margin-top:auto;
}
.skill-card-foot small {
  color:var(--muted);
}
.skill-card-locked {
  opacity:.62;
  border-color:rgba(236,229,216,.055) !important;
}
.skill-card-locked .skill-effects,
.skill-card-locked .skill-levels {
  filter:saturate(.25);
}
.skill-card-locked .primary-btn {
  background:#1a1d21 !important;
  border-color:rgba(236,229,216,.08) !important;
  color:#737982 !important;
  opacity:1 !important;
}

@media (max-width:1100px) and (orientation:landscape) {
  .skill-effects {
    gap:5px;
    margin:7px 0 8px;
  }
  .skill-effects > div {
    padding:6px 7px;
    border-radius:5px;
  }
  .skill-effects span {
    margin-bottom:3px;
    font-size:6px;
  }
  .skill-effects strong {
    font-size:7px;
    line-height:1.35;
  }
}


/* v1.1 — événement du jour compact dans le header mobile */
.mobile-city-event-info {
  display:none;
}

@media (orientation:landscape) and (pointer:coarse) and (max-height:520px) {
  /* Le bandeau événement desktop disparaît pour libérer une ligne complète. */
  .city-alert,
  .city-alert.visible {
    display:none !important;
    min-height:0 !important;
    max-height:0 !important;
    height:0 !important;
    padding:0 !important;
    border:0 !important;
  }

  .cash-stat-with-event {
    position:relative;
    padding-right:28px !important;
    overflow:visible !important;
  }

  .mobile-city-event-info {
    position:absolute;
    right:5px;
    top:50%;
    transform:translateY(-50%);
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:18px;
    height:18px;
    padding:0;
    border:1px solid rgba(211,177,103,.42);
    border-radius:50%;
    background:rgba(211,177,103,.10);
    color:#d8bb7b;
    font-family:Georgia,serif;
    font-size:11px;
    font-weight:700;
    font-style:italic;
    line-height:1;
    cursor:pointer;
    z-index:4;
  }

  .mobile-city-event-info:active {
    transform:translateY(-50%) scale(.94);
    background:rgba(211,177,103,.18);
  }

  .mobile-city-event-info[hidden] {
    display:none !important;
  }

  .mobile-city-event-modal {
    max-width:520px;
    margin:0 auto;
    padding:3px 1px;
  }

  .mobile-city-event-modal p {
    margin:8px 0 0;
    color:var(--muted);
    font-size:10px;
    line-height:1.55;
  }
}

/* v1.1 — header mobile simplifié : jour/heure dans le bouton info */
@media (orientation:landscape) and (pointer:coarse) and (max-height:520px) {
  /* Le bandeau événement reste supprimé sur mobile. */
  .city-alert,
  .city-alert.visible {
    display:none !important;
    height:0 !important;
    min-height:0 !important;
    max-height:0 !important;
    padding:0 !important;
    margin:0 !important;
    border:0 !important;
  }

  /* Barre compacte et stable : aucun élément ne doit étirer sa hauteur. */
  .topbar {
    height:46px !important;
    min-height:46px !important;
    max-height:46px !important;
    align-items:center !important;
    overflow:visible !important;
  }

  .top-stats {
    height:38px !important;
    min-height:38px !important;
    max-height:38px !important;
    display:grid !important;
    grid-template-columns:minmax(96px,1fr) minmax(90px,1fr) minmax(118px,1.25fr) !important;
    align-items:center !important;
    gap:8px !important;
    overflow:visible !important;
  }

  /* Sur mobile, Jour et Heure sont regroupés dans le bouton d'information. */
  .top-stats .stat-chip:nth-child(3),
  .top-stats .stat-chip:nth-child(4) {
    display:none !important;
  }

  /* Suppression des séparations verticales desktop qui débordaient. */
  .top-stats .stat-chip,
  .top-stats .stat-chip:first-child,
  .top-stats .stat-chip:last-child {
    position:relative !important;
    height:36px !important;
    min-height:36px !important;
    max-height:36px !important;
    min-width:0 !important;
    margin:0 !important;
    padding:3px 8px !important;
    border:0 !important;
    border-left:0 !important;
    border-right:0 !important;
    border-top:0 !important;
    border-bottom:0 !important;
    border-radius:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    align-self:center !important;
    overflow:visible !important;
  }

  .top-stats .stat-chip::before,
  .top-stats .stat-chip::after {
    content:none !important;
    display:none !important;
  }

  .top-stats .stat-chip span {
    font-size:6.5px !important;
    line-height:1 !important;
  }

  .top-stats .stat-chip strong {
    margin-top:3px !important;
    font-size:10.5px !important;
    line-height:1 !important;
  }

  .top-stats .xp-chip {
    padding-right:4px !important;
  }

  .top-stats .xp-chip .xp-bar {
    margin-top:5px !important;
    height:3px !important;
  }

  /* Le i appartient visuellement au Solde, sans créer de colonne ni modifier sa largeur. */
  .cash-stat-with-event {
    padding-right:29px !important;
  }

  .mobile-city-event-info {
    position:absolute !important;
    right:5px !important;
    top:50% !important;
    transform:translateY(-50%) !important;
    width:18px !important;
    height:18px !important;
    min-width:18px !important;
    min-height:18px !important;
    margin:0 !important;
    padding:0 !important;
    border:1px solid rgba(211,177,103,.40) !important;
    border-radius:50% !important;
    background:rgba(211,177,103,.08) !important;
    color:#d8bb7b !important;
    box-shadow:none !important;
    font-family:Georgia,serif !important;
    font-size:11px !important;
    font-weight:700 !important;
    font-style:italic !important;
    line-height:16px !important;
    text-align:center !important;
    z-index:3 !important;
  }

  /* La navigation remonte immédiatement sous le header. */
  .main-layout {
    min-height:calc(100dvh - 46px) !important;
  }

  .sidebar {
    top:46px !important;
    height:34px !important;
    min-height:34px !important;
    max-height:34px !important;
    padding:0 max(6px,calc(env(safe-area-inset-right) + 3px)) 0 max(6px,calc(env(safe-area-inset-left) + 3px)) !important;
    border-top:1px solid rgba(236,229,216,.055) !important;
    border-bottom:1px solid rgba(236,229,216,.07) !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
  }

  .nav-list {
    height:33px !important;
    min-height:33px !important;
    max-height:33px !important;
    align-items:stretch !important;
  }

  .nav-btn {
    height:33px !important;
    min-height:33px !important;
    max-height:33px !important;
    padding:0 10px !important;
    border-top:0 !important;
    border-left:0 !important;
    border-right:0 !important;
    border-radius:0 !important;
  }

  .nav-btn::before,
  .nav-btn::after {
    max-height:33px !important;
  }

  /* Fenêtre du i : informations temporelles + événement. */
  .mobile-city-event-modal {
    width:min(520px,100%) !important;
    margin:0 auto !important;
    padding:2px !important;
  }

  .mobile-day-facts {
    display:grid;
    grid-template-columns:1.6fr .7fr .9fr;
    gap:6px;
    margin-bottom:10px;
  }

  .mobile-day-facts > div {
    min-width:0;
    padding:8px 9px;
    border:1px solid rgba(236,229,216,.08);
    border-radius:7px;
    background:rgba(255,255,255,.018);
  }

  .mobile-day-facts span {
    display:block;
    color:var(--muted);
    font-size:6.5px;
    letter-spacing:.09em;
    text-transform:uppercase;
  }

  .mobile-day-facts strong {
    display:block;
    margin-top:3px;
    color:var(--text);
    font-size:10px;
    line-height:1.15;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
  }

  .mobile-event-copy {
    padding:9px 10px;
    border:1px solid rgba(211,177,103,.16);
    border-radius:8px;
    background:rgba(211,177,103,.035);
  }

  .mobile-event-copy h3 {
    margin:3px 0 5px;
    font-size:13px;
    line-height:1.15;
  }

  .mobile-event-copy p {
    margin:0;
    color:var(--muted);
    font-size:9px;
    line-height:1.45;
  }
}

@media (orientation:landscape) and (pointer:coarse) and (max-height:390px) {
  .topbar {
    height:42px !important;
    min-height:42px !important;
    max-height:42px !important;
  }

  .top-stats {
    height:34px !important;
    min-height:34px !important;
    max-height:34px !important;
    grid-template-columns:minmax(88px,1fr) minmax(82px,1fr) minmax(105px,1.2fr) !important;
    gap:5px !important;
  }

  .top-stats .stat-chip {
    height:32px !important;
    min-height:32px !important;
    max-height:32px !important;
    padding:2px 6px !important;
  }

  .main-layout {
    min-height:calc(100dvh - 42px) !important;
  }

  .sidebar {
    top:42px !important;
    height:31px !important;
    min-height:31px !important;
    max-height:31px !important;
  }

  .nav-list,
  .nav-btn {
    height:30px !important;
    min-height:30px !important;
    max-height:30px !important;
  }
}

/* =========================================================
   v1.1 — mobile paysage : header/navigation nettoyés v2
   ========================================================= */
@media (orientation:landscape) and (pointer:coarse) and (max-height:520px) {
  /* La date ne figure plus dans le header mobile : elle est consultable via le i. */
  .brand-copy,
  .brand-date {
    display:none !important;
  }

  .topbar {
    height:48px !important;
    min-height:48px !important;
    max-height:48px !important;
    grid-template-columns:42px minmax(0,1fr) auto !important;
    gap:8px !important;
    overflow:visible !important;
  }

  .brand-block {
    width:42px !important;
    min-width:42px !important;
    max-width:42px !important;
    gap:0 !important;
    overflow:visible !important;
  }

  .brand-mark {
    width:38px !important;
    height:38px !important;
    flex:0 0 38px !important;
    margin:0 !important;
  }

  /* Solde + patrimoine + niveau uniquement. Jour, heure et date sont dans le i. */
  .top-stats {
    height:40px !important;
    min-height:40px !important;
    max-height:40px !important;
    grid-template-columns:minmax(108px,1fr) minmax(96px,.9fr) minmax(132px,1.2fr) !important;
    gap:7px !important;
    overflow:visible !important;
  }

  .top-stats .stat-chip:nth-child(3),
  .top-stats .stat-chip:nth-child(4) {
    display:none !important;
  }

  .top-stats .stat-chip {
    height:36px !important;
    min-height:36px !important;
    max-height:36px !important;
    padding:3px 7px !important;
    overflow:visible !important;
  }

  .cash-stat-with-event {
    padding-right:31px !important;
  }

  .mobile-city-event-info {
    right:6px !important;
    z-index:60 !important;
  }

  /* Menu et Jour suivant deviennent des actions légères, sans cadres. */
  .header-actions #menuBtn,
  .header-actions #nextDayBtn {
    border:0 !important;
    outline:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    border-radius:0 !important;
  }

  .header-actions #menuBtn:hover,
  .header-actions #nextDayBtn:hover,
  .header-actions #menuBtn:focus-visible,
  .header-actions #nextDayBtn:focus-visible {
    border:0 !important;
    background:rgba(255,255,255,.035) !important;
    box-shadow:none !important;
  }

  /* Navigation un peu plus haute et respirante. */
  .main-layout {
    min-height:calc(100dvh - 48px) !important;
  }

  .sidebar {
    top:48px !important;
    height:42px !important;
    min-height:42px !important;
    max-height:42px !important;
    padding:2px max(6px,calc(env(safe-area-inset-right) + 3px)) 2px max(6px,calc(env(safe-area-inset-left) + 3px)) !important;
    z-index:45 !important;
  }

  .nav-list {
    height:38px !important;
    min-height:38px !important;
    max-height:38px !important;
    align-items:stretch !important;
    overflow:visible !important;
  }

  .nav-btn {
    position:relative !important;
    z-index:46 !important;
    height:38px !important;
    min-height:38px !important;
    max-height:38px !important;
    padding:0 11px !important;
    overflow:visible !important;
  }

  /* Les pastilles restent entièrement dans la zone visible, au-dessus de la nav. */
  .nav-btn .nav-notification {
    top:2px !important;
    right:3px !important;
    transform:translate(30%,0) !important;
    z-index:80 !important;
    pointer-events:none !important;
  }

  .nav-btn .nav-notification.available {
    top:3px !important;
    right:4px !important;
    transform:translate(25%,0) !important;
    z-index:80 !important;
  }
}

@media (orientation:landscape) and (pointer:coarse) and (max-height:390px) {
  .topbar {
    height:45px !important;
    min-height:45px !important;
    max-height:45px !important;
  }

  .top-stats {
    height:37px !important;
    min-height:37px !important;
    max-height:37px !important;
    grid-template-columns:minmax(96px,1fr) minmax(88px,.9fr) minmax(116px,1.15fr) !important;
  }

  .main-layout {
    min-height:calc(100dvh - 45px) !important;
  }

  .sidebar {
    top:45px !important;
    height:39px !important;
    min-height:39px !important;
    max-height:39px !important;
  }

  .nav-list,
  .nav-btn {
    height:35px !important;
    min-height:35px !important;
    max-height:35px !important;
  }
}


/* v1.1 — mobile : informations du jour déplacées entre Menu et Jour suivant */
@media (orientation:landscape) and (pointer:coarse) and (max-height:520px) {
  .cash-stat-with-event {
    padding-right:7px !important;
  }

  .header-actions {
    display:flex !important;
    align-items:center !important;
    gap:8px !important;
    overflow:visible !important;
  }

  .header-actions .mobile-city-event-info {
    position:relative !important;
    inset:auto !important;
    transform:none !important;
    flex:0 0 24px !important;
    width:24px !important;
    height:24px !important;
    min-width:24px !important;
    min-height:24px !important;
    margin:0 2px !important;
    padding:0 !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    border:1px solid rgba(211,177,103,.42) !important;
    border-radius:50% !important;
    background:rgba(211,177,103,.08) !important;
    color:#d8bb7b !important;
    box-shadow:none !important;
    font-family:Georgia,serif !important;
    font-size:13px !important;
    font-weight:700 !important;
    font-style:italic !important;
    line-height:1 !important;
    z-index:70 !important;
  }

  .header-actions .mobile-city-event-info:active {
    transform:scale(.94) !important;
    background:rgba(211,177,103,.16) !important;
  }
}

@media (orientation:landscape) and (pointer:coarse) and (max-height:390px) {
  .header-actions {
    gap:6px !important;
  }
  .header-actions .mobile-city-event-info {
    flex-basis:22px !important;
    width:22px !important;
    height:22px !important;
    min-width:22px !important;
    min-height:22px !important;
    margin-inline:1px !important;
    font-size:12px !important;
  }
}


/* =========================================================
   v1.1 — mobile : i tout à droite + pop-ups plein écran
   ========================================================= */
@media (orientation:landscape) and (pointer:coarse) and (max-height:520px) {
  /* Ordre final du header : Menu · Jour suivant · i */
  .header-actions {
    display:flex !important;
    align-items:center !important;
    justify-content:flex-end !important;
    gap:8px !important;
    overflow:visible !important;
  }

  .header-actions #menuBtn { order:1 !important; }
  .header-actions #nextDayBtn { order:2 !important; }
  .header-actions .mobile-city-event-info {
    order:3 !important;
    position:relative !important;
    inset:auto !important;
    transform:none !important;
    flex:0 0 25px !important;
    width:25px !important;
    height:25px !important;
    min-width:25px !important;
    min-height:25px !important;
    margin:0 0 0 3px !important;
    padding:0 !important;
    z-index:90 !important;
  }

  .header-actions .mobile-city-event-info:active {
    transform:scale(.94) !important;
  }

  /*
   * Sur téléphone les pop-ups deviennent de vrais écrans secondaires.
   * Plus de largeur calculée ni de centrage pouvant les décaler sur Safari.
   */
  .modal-backdrop {
    position:fixed !important;
    inset:0 !important;
    width:100dvw !important;
    height:100dvh !important;
    margin:0 !important;
    padding:0 !important;
    display:block !important;
    overflow:hidden !important;
    background:#090c10 !important;
    backdrop-filter:none !important;
    z-index:1000 !important;
  }

  .modal,
  .modal.service-modal,
  .modal.locksmith-result-modal,
  .modal.account-modal,
  .shop-setup-modal,
  .shop-item-info-modal {
    position:absolute !important;
    inset:0 !important;
    width:100% !important;
    height:100% !important;
    min-width:0 !important;
    min-height:0 !important;
    max-width:none !important;
    max-height:none !important;
    margin:0 !important;
    border:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;
    display:flex !important;
    flex-direction:column !important;
    overflow:hidden !important;
    box-sizing:border-box !important;
    background:#0f1216 !important;
  }

  .modal-head,
  .modal.service-modal .modal-head,
  .modal.account-modal .modal-head {
    position:relative !important;
    flex:0 0 auto !important;
    min-height:44px !important;
    padding:
      8px max(12px,calc(env(safe-area-inset-right) + 8px))
      8px max(12px,calc(env(safe-area-inset-left) + 8px)) !important;
    border-bottom:1px solid rgba(255,255,255,.07) !important;
    background:#0f1216 !important;
    z-index:2 !important;
  }

  .modal-head h2 {
    max-width:calc(100% - 44px) !important;
    margin:0 !important;
    font-size:14px !important;
    line-height:1.2 !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }

  .modal-close {
    flex:0 0 30px !important;
    width:30px !important;
    height:30px !important;
    min-width:30px !important;
    min-height:30px !important;
  }

  .modal-body,
  .modal.service-modal .modal-body,
  .modal.locksmith-result-modal .modal-body,
  .modal.account-modal .modal-body,
  .shop-setup-modal .modal-body,
  .shop-item-info-modal .modal-body {
    flex:1 1 auto !important;
    min-width:0 !important;
    min-height:0 !important;
    max-height:none !important;
    margin:0 !important;
    padding:
      10px max(14px,calc(env(safe-area-inset-right) + 10px))
      max(12px,calc(env(safe-area-inset-bottom) + 8px))
      max(14px,calc(env(safe-area-inset-left) + 10px)) !important;
    overflow-x:hidden !important;
    overflow-y:auto !important;
    -webkit-overflow-scrolling:touch !important;
    box-sizing:border-box !important;
  }

  /* Les résultats d'expertise/réparation utilisent toute la largeur disponible. */
  .service-result-card,
  .service-result-detail,
  .expertise-result,
  .locksmith-result {
    max-width:none !important;
    width:100% !important;
    margin-inline:0 !important;
  }

  .modal-action-footer {
    padding-bottom:max(2px,env(safe-area-inset-bottom)) !important;
  }
}

@media (orientation:landscape) and (pointer:coarse) and (max-height:390px) {
  .header-actions {
    gap:6px !important;
  }
  .header-actions .mobile-city-event-info {
    flex-basis:23px !important;
    width:23px !important;
    height:23px !important;
    min-width:23px !important;
    min-height:23px !important;
    margin-left:2px !important;
  }
  .modal-head,
  .modal.service-modal .modal-head,
  .modal.account-modal .modal-head {
    min-height:40px !important;
    padding-top:6px !important;
    padding-bottom:6px !important;
  }
  .modal-body,
  .modal.service-modal .modal-body,
  .modal.locksmith-result-modal .modal-body,
  .modal.account-modal .modal-body {
    padding-top:7px !important;
  }
}
