  /* Active "applied items" badges — top-right corner of game tiles/cards.
     One chip per active record; reads the remaining-resource label. */
  .my-tile .frame .applied-badges,
  .game-card .applied-badges {
    position: absolute;
    right: 8px; top: 8px;
    display: flex; flex-direction: column; gap: 4px;
    align-items: flex-end;
    z-index: 5;
    pointer-events: none;
    max-width: 60%;
  }
  .applied-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 7px 2px 5px;
    border-radius: 999px;
    border: 1px solid rgba(110,180,160,0.4);
    background: rgba(20, 50, 42, 0.85);
    color: #d8efe5;
    font-size: 10px; font-weight: 700; letter-spacing: 0.3px;
    text-transform: uppercase;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.45);
    pointer-events: auto;
    white-space: nowrap;
  }
  .applied-badge .ic { width: 12px; height: 12px; display: inline-flex; color: #aedccc; }
  .applied-badge .ic svg { width: 12px; height: 12px; display: block; }
  .applied-badge .lbl { font-size: 10px; }
  .applied-badge[class*="ad_package_"] {
    border-color: rgba(220,200,140,0.5); color: #f1e7c2; background: rgba(50, 40, 14, 0.85);
  }
  .applied-badge[class*="ad_package_"] .ic { color: #f0deaa; }

  /* Apply-item popover grid — compact tiles, same spirit as inv-picker.compact. */
  .apply-picker {
    display: grid;
    grid-template-columns: repeat(4, 56px);
    gap: 6px;
    width: min(244px, calc(100vw - 24px));
    max-height: 220px;
    overflow: auto;
  }
  .apply-tile {
    width: 100%; aspect-ratio: 1 / 1;
    border-radius: var(--r-sm);
    border: 1px solid var(--border-2);
    background: linear-gradient(180deg, rgba(255,220,180,0.02), transparent 60%), var(--surface);
    color: var(--text);
    cursor: pointer;
    display: grid; place-items: center;
    position: relative;
    transition: border-color 0.12s ease, transform 0.08s ease;
  }
  .apply-tile:hover { border-color: rgba(140,110,180,0.6); transform: translateY(-1px); }
  .apply-tile.disabled {
    cursor: not-allowed;
    opacity: 0.45;
    filter: grayscale(0.5);
  }
  .apply-tile.disabled:hover { transform: none; border-color: var(--border-2); }
  .apply-tile svg { width: 26px; height: 26px; color: #d3c3ec; }
  .apply-tile .cnt {
    position: absolute; right: 4px; bottom: 2px;
    font-size: 11px; font-weight: 700;
    color: var(--text);
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
    pointer-events: none;
  }
  .apply-picker-empty {
    width: min(244px, calc(100vw - 24px));
    padding: 18px 12px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
  }
