/* ═══════════════════════════════════════
   ACHIEVEMENTS
   ═══════════════════════════════════════ */
.ach-progress { margin-bottom: 18px; }
.ach-progress-bar {
  height: 8px; border-radius: 4px;
  background: rgba(255,255,255,0.06);
  overflow: hidden; margin-top: 6px;
}
.ach-progress-fill {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent), #f0c050);
  transition: width 0.6s ease;
}
.ach-progress-label {
  font-size: 0.75rem; color: var(--muted);
  display: flex; justify-content: space-between;
}
.ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px; margin-bottom: 18px;
}
.ach-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 14px;
  text-align: center; position: relative;
  transition: border-color 0.3s, transform 0.2s;
  overflow: hidden;
}
.ach-card:hover { transform: translateY(-2px); }
.ach-card.unlocked { border-color: var(--accent); }
.ach-card.locked { opacity: 0.45; filter: grayscale(0.6); }
.ach-card-icon { font-size: 1.8rem; margin-bottom: 6px; }
.ach-card-name {
  font-family: var(--font-head); font-size: 0.8rem;
  font-weight: 600; color: var(--text); margin-bottom: 4px;
}
.ach-card-desc {
  font-size: 0.68rem; color: var(--muted); line-height: 1.3;
}
.ach-card-badge {
  position: absolute; top: 6px; right: 6px;
  font-size: 0.6rem; padding: 2px 6px;
  border-radius: 6px; font-weight: 600;
  background: var(--accent); color: var(--bg);
}
.ach-card.locked .ach-card-icon { filter: blur(1px); }
.ach-recent h3 {
  font-family: var(--font-head); font-size: 0.85rem;
  color: var(--accent); margin: 0 0 8px 0;
}
.ach-recent-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px;
  background: rgba(255,255,255,0.02);
  margin-bottom: 6px; font-size: 0.78rem;
}
.ach-recent-item span:first-child { font-size: 1.2rem; }
.ach-recent-date { color: var(--muted); font-size: 0.68rem; margin-left: auto; }
.ach-confetti {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 10000;
}

/* ═══════════════════════════════════════
   WIDGET GRID — Drag & Drop Layout
   ═══════════════════════════════════════ */
.wg-widget {
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.wg-widget:hover > .wg-handle { opacity: 1; }
.wg-handle {
  position: absolute; top: 6px; right: 6px;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; color: var(--muted);
  cursor: grab; opacity: 0;
  transition: opacity 0.2s;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px; z-index: 5;
  user-select: none; letter-spacing: -1px;
}
.wg-handle:hover { color: var(--accent); border-color: var(--accent); }
.wg-handle:active { cursor: grabbing; }
.wg-dragging {
  opacity: 0.3 !important;
  transform: scale(0.98);
}
.wg-placeholder {
  min-height: 40px;
  margin: 8px 0;
  border: 2px dashed var(--accent);
  border-radius: 10px;
  background: rgba(212, 160, 56, 0.06);
  transition: min-height 0.2s;
}
.wg-reset-btn {
  position: absolute; top: 8px; right: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted); font-size: 0.65rem;
  padding: 3px 8px; border-radius: 6px;
  cursor: pointer; z-index: 10;
  transition: color 0.2s, border-color 0.2s;
}
.wg-reset-btn:hover { color: var(--accent); border-color: var(--accent); }


/* Mobile classification */
.mobile-badge{display:inline-flex;align-items:center;gap:6px;margin-left:8px;padding:4px 8px;border-radius:999px;font-size:11px;font-weight:700;border:1px solid var(--border);vertical-align:middle}
.mobile-full{color:var(--green);border-color:color-mix(in srgb, var(--green) 50%, var(--border));background:color-mix(in srgb, var(--green) 12%, transparent)}
.mobile-limited{color:var(--amber, #f0b429);border-color:color-mix(in srgb, #f0b429 50%, var(--border));background:color-mix(in srgb, #f0b429 12%, transparent)}
.mobile-desktop{color:var(--red);border-color:color-mix(in srgb, var(--red) 50%, var(--border));background:color-mix(in srgb, var(--red) 12%, transparent)}
.mobile-locked{padding:12px 14px;border:1px dashed var(--border);border-radius:14px;color:var(--muted);background:rgba(0,0,0,.15);font-size:13px}
.is-mobile-device .desktop-only-card{opacity:.88}
.is-mobile-device .desktop-only-card .cmd-pill,.is-mobile-device .desktop-only-card .btn-row{display:none}
.is-mobile-device .mobile-limited-card .cmd-pill{display:none}
@media (max-width: 900px){
  .mobile-badge{display:flex;margin-left:0;margin-top:6px;width:max-content}
}
