/* Учебная площадка: окно берёт шрифт, стекло, кнопки и палитру охоты из style.css. */
#hc-lab { position:fixed; z-index:9000; left:max(12px,var(--sal)); top:max(12px,var(--sat)); max-width:270px; max-height:calc(100% - 24px); overflow-y:auto; box-sizing:border-box; padding:8px 12px; border:1px solid var(--edge); border-radius:12px; color:#eaf3ff; background:#101520ec; font:12px/1.4 var(--font); }
#hc-lab summary { cursor:pointer; } #hc-lab p { font:13px/1.4 Arial,sans-serif; } #hc-lab button { margin:3px; font:12px var(--font); padding:8px; }
#hc-shade { position:fixed; inset:0; z-index:10001; background:#06040a99; }
#hc-panel { position:fixed; z-index:10002; left:50%; top:50%; transform:translate(-50%,-50%); width:min(860px,calc(100vw - var(--sal) - var(--sar) - 32px)); max-height:calc(100dvh - var(--sat) - var(--sab) - 32px); display:flex; flex-direction:column; gap:10px; padding:20px; }
#hc-panel[hidden], #hc-hud[hidden] { display:none; }
#hc-panel .bs-head { display:flex; align-items:center; gap:18px; flex:none; }
#hc-panel h3 { flex:1; margin:0; font:24px var(--font); color:var(--acc1); letter-spacing:.5px; }
#hc-panel .bs-x { width:42px; height:42px; padding:0; flex:none; font-size:20px; }
#hc-panel .bs-body { flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding-right:6px; }
#hc-panel .hc-wallet { color:var(--acc1); font:16px var(--font); padding:8px 12px; border:1px solid var(--edge); border-radius:10px; background:var(--glass-in); }
#hc-panel .hc-say { margin:2px 0 14px; padding:10px 14px; border-left:3px solid var(--acc); background:var(--glass-in); border-radius:0 10px 10px 0; }
#hc-panel .hc-say strong { font:14px var(--font); color:var(--acc); }
#hc-panel .hc-say p { margin:5px 0 0; color:#c9d1dc; font:14px/1.4 Arial,sans-serif; }
#hc-panel .hc-row { grid-template-columns:92px minmax(0,1fr) 132px; padding:10px; gap:14px; border:1px solid transparent; margin-bottom:8px; }
#hc-panel .hc-selected { border-color:var(--edge-hi); background:var(--ctl-sel); }
#hc-panel .hc-tool-icon { width:92px; height:92px; border-radius:10px; background:radial-gradient(ellipse,#46678155,#10162066); }
#hc-panel .hc-speed { display:inline-block; margin:7px 8px 5px 0; color:#83e4d4; font:12px var(--font); }
#hc-panel .hc-price { display:inline-flex; color:var(--acc1); font:13px var(--font); }
#hc-panel select { display:block; max-width:100%; margin-top:5px; padding:7px 9px; border:1px solid var(--edge); border-radius:8px; background:#182131; color:#eaf3ff; font:13px Arial,sans-serif; }
#hc-panel .hc-foot { display:flex; align-items:center; gap:18px; flex:none; border-top:1px solid var(--edge); padding-top:10px; }
#hc-panel .hc-note { flex:1; margin:0; color:var(--dim); font:12px/1.4 Arial,sans-serif; }
#hc-panel .hc-foot .btn { flex:none; }
#hc-hud { position:fixed; z-index:9001; right:max(18px,var(--sar)); top:260px; width:225px; padding:12px; border:1px solid #8db5d96b; border-radius:14px; color:#d5eaf7; background:linear-gradient(150deg,#142734ee,#11141cee); box-shadow:0 7px 24px #0005; font:12px/1.4 var(--font); pointer-events:none; }
#hc-hud strong { color:#bceeff; font-size:14px; } #hc-hud .hc-balance { margin:5px 0; color:#9daebb; font:12px Arial,sans-serif; }
#hc-hud progress { display:block; width:100%; height:8px; margin:9px 0; border:0; border-radius:6px; overflow:hidden; background:#071016; accent-color:#89e7e8; }
#hc-hud progress::-webkit-progress-bar { background:#071016; } #hc-hud progress::-webkit-progress-value { background:linear-gradient(90deg,#458da9,#b6fbef); border-radius:6px; }
#hc-hud button { pointer-events:auto; width:100%; min-height:44px; touch-action:none; user-select:none; font-size:13px; padding:8px; }
body.hc-shopping #prompt { visibility:hidden; }
#money.gem-line { display:flex; flex-wrap:wrap; max-width:270px; gap:7px; font-size:15px; }
body.touch #money.gem-line { max-width:210px; font-size:12px; }
/* На учебной площадке чужие вводные задания не перекрывают новую подсказку. */
body.hc-lab-active #goal, body.hc-lab-active #hunt-card { display:none !important; }
body.touch #prompt.hc-context { padding:10px 12px; font-size:16px; line-height:1.25; }
body.touch #prompt.hc-context::before { content:'ЖМИ'; display:block; width:max-content; margin:0 auto 5px; padding:2px 6px; font-size:10px; }
body.touch #prompt.hc-mining { touch-action:none; }
body.touch #prompt.hc-mining::before { content:'УДЕРЖИВАЙ'; }
@media(max-width:900px) {
  #hc-panel { padding:12px; gap:7px; }
  #hc-panel h3 { font-size:16px; }
  #hc-panel .bs-x { width:34px; height:34px; min-height:34px; font-size:18px; }
  #hc-panel.hc-equipped .hc-say { display:none; }
  #hc-panel .hc-row { grid-template-columns:64px minmax(0,1fr) 104px; gap:10px; padding:7px; }
  #hc-panel .hc-tool-icon { width:64px; height:70px; }
  #hc-panel .bs-tx b { font-size:14px; }
  #hc-panel .hc-say { margin-bottom:8px; padding:7px 10px; }
  #hc-panel .hc-say p { font-size:12px; }
  #hc-panel .hc-wallet { font-size:13px; padding:6px 10px; }
  #hc-panel .hc-foot { gap:10px; padding-top:7px; }
  #hc-panel .hc-foot .btn { min-height:38px; font-size:11px; padding:8px; }
  #hc-panel .hc-row .btn { min-height:38px; font-size:12px; }
  #hc-hud { top:132px; right:max(12px,var(--sar)); width:158px; padding:8px; font-size:10px; line-height:1.3; }
  #hc-hud strong { font-size:11px; } #hc-hud .hc-balance { font-size:10px; margin:3px 0; }
  #hc-hud progress { margin:6px 0; height:6px; } #hc-hud button { display:none; }
  #hc-hud .hc-balance, #hc-hud .hc-status { display:none; }
  #hc-lab { top:max(52px,calc(var(--sat) + 52px)); max-width:180px; max-height:calc(100% - 64px); padding:6px 8px; font-size:10px; }
}

/* При открытых панелях браузера список кирок получает всю высоту справа. */
@media (orientation:landscape) and (max-height:480px) {
  #hc-panel {
    top:calc(var(--sat) + 4px); left:calc(var(--sal) + 4px); right:calc(var(--sar) + 4px);
    width:auto; max-width:960px; margin-inline:auto; transform:none;
    height:calc(100dvh - var(--sat) - var(--sab) - 8px); max-height:none;
    display:grid; grid-template-columns:clamp(158px,25%,196px) minmax(0,1fr);
    grid-template-rows:auto auto minmax(0,1fr); grid-template-areas:"head tools" "wallet tools" "foot tools";
    gap:8px 12px; padding:8px; border-radius:12px;
  }
  #hc-panel .bs-head { grid-area:head; gap:4px; }
  #hc-panel h3 { font-size:15px; line-height:1.2; }
  #hc-panel .bs-x { width:44px; height:44px; min-height:44px; }
  #hc-panel .hc-wallet { grid-area:wallet; align-self:start; gap:4px 8px; padding:6px; font-size:13px; }
  #hc-panel .hc-foot {
    grid-area:foot; flex-direction:column; align-items:stretch; justify-content:flex-end; gap:6px;
    min-height:0; border:0; padding:0;
  }
  #hc-panel .hc-note { flex:0 1 auto; min-height:0; overflow:auto; }
  #hc-panel .hc-foot .back { min-height:44px; padding:5px; font-size:12px; }
  #hc-panel .bs-body { grid-area:tools; min-width:0; padding:0 0 0 8px; border-left:1px solid var(--edge); }
  #hc-panel .hc-say { padding:6px 8px; margin:0 0 6px; }
  #hc-panel .hc-say strong, #hc-panel .hc-say p { display:inline; font-size:12px; }
  #hc-panel .hc-say strong { margin-right:5px; }
  #hc-panel .hc-row { grid-template-columns:44px minmax(0,1fr) minmax(70px,auto); gap:7px; padding:6px; margin-bottom:5px; }
  #hc-panel .hc-tool-icon { width:44px; height:48px; }
  #hc-panel .bs-tx { min-width:0; }
  #hc-panel .hc-row .btn { min-height:44px; }
}
@media (orientation:landscape) and (max-height:480px) and (max-width:620px) {
  #hc-panel .hc-row { grid-template-columns:minmax(0,1fr) 82px; gap:3px 8px; }
  #hc-panel .hc-row .bs-tx { grid-column:1; grid-row:1 / span 2; }
  #hc-panel .hc-tool-icon { grid-area:1 / 2; place-self:end center; width:36px; height:36px; }
  #hc-panel .hc-buy { grid-area:2 / 2; align-self:start; }
}

#hc-hud .hc-contribution { display:block; margin-top:4px; color:#b8d4d8; font-size:11px; }
#hc-hud .hc-contribution[hidden] { display:none; }
.hc-exchange { display:flex; flex-wrap:wrap; gap:8px; padding:12px; border-top:1px solid #567580; }
.hc-exchange h4, .hc-exchange p { width:100%; margin:0; }
.hc-exchange p { color:#b8d4d8; font-size:12px; }
#rp-box .hc-vehicle { grid-template-columns:minmax(0,1fr) auto; }
#rp-box .hc-vehicle .btn { grid-column:2; grid-row:auto; width:auto; min-width:144px; padding:8px 14px; }
body.hc-lab-active:has(#s-rpg.on, #s-bots.on, #s-arsenal.on, #s-camp.on, #s-style.on, #s-cafe.on) #hc-lab { visibility:hidden; }
@media(max-width:900px) {
  #hc-hud.hc-field { padding:6px; line-height:1.15; }
  #hc-hud.hc-field .hc-contribution { margin-top:1px; font:10px/1.1 Arial,sans-serif; }
  #hc-hud.hc-field progress { height:5px; margin:4px 0; }
}
/* Подбор — короткая анимация поверх HUD, без новых источников света и игрового цикла. */
.hc-pickup-gem{position:fixed;left:0;top:0;width:24px;height:32px;z-index:80;pointer-events:none;filter:drop-shadow(0 0 7px currentColor);will-change:transform,opacity}
#money .gem-amount{transform-origin:center;}
