/* achievements.html (drawn by achievements-page.js from window.TAAAch in achievements.js). */
.ach-app { max-width: 1240px; margin: 0 auto; }
.ach-summary {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px 26px; padding: 22px 26px; border-radius: 22px;
  background: linear-gradient(135deg, color-mix(in srgb, #f59e0b 14%, var(--surface)), var(--surface) 70%); border: 1px solid color-mix(in srgb, #f59e0b 35%, var(--border));
}
.ach-level-ic { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 20px; font-size: 36px; color: #1a1200; background: linear-gradient(135deg, #fde68a, #f59e0b); box-shadow: 0 10px 30px -10px rgba(245, 158, 11, 0.8); }
.ach-level small { display: block; font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: #fbbf24; font-weight: 700; }
.ach-level strong { display: block; font-size: 1.5rem; font-family: var(--font-head); margin: 2px 0 8px; }
.ach-bar { height: 10px; border-radius: 999px; background: var(--bg-elevated); overflow: hidden; border: 1px solid var(--border); }
.ach-bar span { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #f59e0b, #fde68a); transition: width 0.8s ease; }
.ach-next { margin: 8px 0 0; font-size: 0.86rem; color: var(--text-muted); }
.ach-stats { display: flex; gap: 22px; text-align: center; }
.ach-stats b { display: block; font-size: 1.6rem; font-family: var(--font-head); color: #fbbf24; font-variant-numeric: tabular-nums; }
.ach-stats span { font-size: 0.78rem; color: var(--text-muted); }
@media (max-width: 760px) {
  .ach-summary { grid-template-columns: auto minmax(0, 1fr); padding: 18px; }
  .ach-stats { grid-column: 1 / -1; justify-content: space-around; }
  .ach-level-ic { width: 60px; height: 60px; font-size: 30px; }
}
.ach-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 18px; }
.ach-filters button { font: 600 0.86rem var(--font-body, Inter, system-ui, sans-serif); padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); cursor: pointer; }
.ach-filters button[aria-pressed="true"] { background: linear-gradient(135deg, #f59e0b, #d97706); border-color: transparent; color: #1a1200; }
.ach-filters button small { font-weight: 700; opacity: 0.8; margin-left: 4px; }
.ach-cat h2 { font-size: 1.1rem; margin: 26px 0 12px; display: flex; align-items: baseline; gap: 10px; }
.ach-cat h2 span { font-size: 0.82rem; color: var(--text-muted); font-weight: 600; }
.ach-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 700px) { .ach-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .ach-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; } }
.ach-card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px 14px 14px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border); min-height: 100%; transition: transform 0.2s ease, border-color 0.2s ease;
}
.ach-card .ach-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; font-size: 22px; margin-bottom: 4px;
  color: var(--text-muted); background: var(--bg-elevated); border: 1px solid var(--border); }
.ach-card strong { font-size: 0.98rem; line-height: 1.25; }
.ach-card p { margin: 0; font-size: 0.82rem; color: var(--text-muted); line-height: 1.4; }
.ach-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; font-size: 0.78rem; }
.ach-pts { font-weight: 700; color: var(--text-muted); }
.ach-go { font-weight: 700; color: var(--accent-2); text-decoration: none; }
.ach-go:hover { text-decoration: underline; }
.ach-card.is-locked { opacity: 0.78; }
.ach-card.is-locked .ach-ic { filter: grayscale(1); }
.ach-card.is-locked::after { content: ""; position: absolute; top: 12px; right: 12px; width: 14px; height: 14px; opacity: 0.55;
  background: currentColor; -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4'><rect x='5' y='11' width='14' height='10' rx='2'/><path d='M8 11V7a4 4 0 0 1 8 0v4'/></svg>") center/contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4'><rect x='5' y='11' width='14' height='10' rx='2'/><path d='M8 11V7a4 4 0 0 1 8 0v4'/></svg>") center/contain no-repeat; }
.ach-card.is-on { border-color: color-mix(in srgb, #f59e0b 60%, var(--border)); background: linear-gradient(180deg, color-mix(in srgb, #f59e0b 12%, var(--surface)), var(--surface) 70%); }
.ach-card.is-on .ach-ic { color: #1a1200; background: linear-gradient(135deg, #fde68a, #f59e0b); border-color: transparent; box-shadow: 0 8px 22px -10px rgba(245, 158, 11, 0.9); }
.ach-card.is-on .ach-pts { color: #fbbf24; }
.ach-card.is-new { animation: achPop 0.9s ease; }
@keyframes achPop { 0% { transform: scale(0.94); } 40% { transform: scale(1.04); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .ach-card.is-new { animation: none; } .ach-bar span { transition: none; } }
.ach-note { margin: 28px 0 0; font-size: 0.86rem; color: var(--text-muted); text-align: center; }
.ach-note button { font: inherit; color: var(--accent-2); background: none; border: 0; cursor: pointer; text-decoration: underline; padding: 0; }
[data-theme="light"] .ach-level small, [data-theme="light"] .ach-stats b, [data-theme="light"] .ach-card.is-on .ach-pts { color: #b45309; }
