
/* ===========================
   INCENTIVES (page-specific)
   =========================== */

.ledger-main {
  max-width: 1000px;
  margin: 60px auto;
  padding: 0 20px;
}

.ledger-main h2 {
  text-transform: uppercase;
  letter-spacing: 2px;
  border-bottom: 2px solid #8b2e2e;
  padding-bottom: 10px;
  margin-top: 80px;
  text-align: left;
}

.incentive {
  background: #fff;
  border: 1px solid #d4c8b6;
  border-radius: 6px;
  padding: 25px;
  margin: 30px 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  text-align: left;
}

.incentive h3 {
  margin-top: 0;
  font-size: 1.6rem;
}

.incentive p {
  line-height: 1.5;
  margin: 10px 0 20px;
}

.progress-wrap {
  background: #e2d8c7;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid #b9aa95;
  height: 26px;
  margin-bottom: 10px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(to right, #8b2e2e, #b94a48);
  width: 0%;
  transition: width 0.6s ease;
}

.progress-text {
  font-size: 0.95rem;
  margin-bottom: 15px;
  color: #5c4631;
}

.donate-link {
  display: inline-block;
  padding: 10px 18px;
  background: #8b2e2e;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: bold;
  letter-spacing: 1px;
}

.donate-link:hover {
  background: #a63a3a;
  color: #fff;
  text-decoration: none;
}

.status {
  font-weight: bold;
  margin-bottom: 10px;
}

.status.unlocked {
  color: #2f6b3f;
}

/* Small “reveal” details panel */
.incentive details {
  margin-top: 10px;
}
.incentive summary {
  cursor: pointer;
  font-weight: bold;
  color: #2a1f14;
}
.incentive summary:hover {
  text-decoration: underline;
}

/* =========================================================
   ACHIEVEMENT COLOR SYSTEM (single source of truth)
   Tavern / Seasonal / Yearly / Laurel + Tavern Tier II
   ========================================================= */

:root{
  /* Category colors */
  --ach-tavern:   #7A4A1C;  /* warm brown / iron */
  --ach-seasonal: #2F6B5B;  /* verdigris teal */
  --ach-yearly:   #8B2E2E;  /* burgundy */
  --ach-laurel:   #B89B5E;  /* antique gold */
  --ach-laurel-ink:#7A5A1C;

  /* Tavern Tier II (must NOT look like yearly) */
  --ach-tier2: #2F4E7A;     /* royal blue */
  --ach-tier2-silver: rgba(240,240,240,0.18);

  /* Common UI inks */
  --ach-ink: #2A1F14;
  --ach-paper: #EFE3C4;
}

/* ==============================
   Incentive Type Bar (4 across)
================================= */
.ach-typebar {
  margin: 18px 0 24px;
}

.ach-typegrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.ach-typebtn {
  appearance: none;
  border: 1px solid #d8cbb4;
  background: #fffaf0;
  color: #2b2b2b;
  border-radius: 6px;
  padding: 12px 10px;
  font-weight: bold;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-align: center;
}

.ach-typebtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

/* Selected states per button id (recolor Tavern/Seasonal/Yearly/Laurels) */
#typeTabTavern.is-open,
#typeTabTavern[aria-selected="true"]{
  background: var(--ach-tavern);
  border-color: var(--ach-tavern);
  color: #fff;
}
#typeTabSeasonal.is-open,
#typeTabSeasonal[aria-selected="true"]{
  background: var(--ach-seasonal);
  border-color: var(--ach-seasonal);
  color: #fff;
}
#typeTabYearly.is-open,
#typeTabYearly[aria-selected="true"]{
  background: var(--ach-yearly);
  border-color: var(--ach-yearly);
  color: #fff;
}
#typeTabLaurel.is-open,
#typeTabLaurel[aria-selected="true"]{
  background: var(--ach-laurel);
  border-color: var(--ach-laurel);
  color: #2b2b2b;
}

/* Optional: subtle hover tint per tab */
#typeTabTavern:hover   { box-shadow: 0 6px 16px rgba(122,74,28,0.16); }
#typeTabSeasonal:hover { box-shadow: 0 6px 16px rgba(47,107,91,0.16); }
#typeTabYearly:hover   { box-shadow: 0 6px 16px rgba(139,46,46,0.16); }
#typeTabLaurel:hover   { box-shadow: 0 6px 16px rgba(184,155,94,0.16); }

.ach-typepanel {
  margin-top: 12px;
  border: 1px solid #d8cbb4;
  background: #fffaf0;
  border-radius: 6px;
  padding: 16px 18px;
}

.ach-typecontent h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.ach-typecontent p {
  margin: 0 0 10px;
}

.ach-typecontent p:last-child {
  margin-bottom: 0;
}

/* Mobile: stack to 2x2 */
@media (max-width: 650px) {
  .ach-typegrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===========================
   ACHIEVEMENTS GRID (icons only)
   =========================== */

.ach-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

@media (max-width: 992px) { .ach-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 520px) { .ach-grid { grid-template-columns: repeat(3, 1fr); } }

.ach-tile {
  position: relative;
  border: none;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.ach-tile:focus-visible { outline: none; }

/* The square icon "plate" with ornate frame */
.ach-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: #efe3c4;
  color: #2a1f14;
  position: relative;
  overflow: hidden;

  border: 2px solid #7a4a1c;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

/* main icon */
.ach-icon > i {
  font-size: 44px;
  position: relative;
  z-index: 2;
}

/* Ornate filigree frame */
.ach-icon::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 8px;
  border: 1px solid rgba(122,74,28,0.65);
  background:
    radial-gradient(circle at 0% 0%, rgba(122,74,28,0.22), transparent 55%),
    radial-gradient(circle at 100% 0%, rgba(122,74,28,0.22), transparent 55%),
    radial-gradient(circle at 0% 100%, rgba(122,74,28,0.22), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(122,74,28,0.22), transparent 55%),
    linear-gradient(135deg, rgba(255,255,255,0.08), transparent 55%);
  pointer-events: none;
}

/* Default corner flourishes (tavern tone) */
.ach-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12px 12px, rgba(122,74,28,0.30) 0 6px, transparent 7px),
    radial-gradient(circle at calc(100% - 12px) 12px, rgba(122,74,28,0.30) 0 6px, transparent 7px),
    radial-gradient(circle at 12px calc(100% - 12px), rgba(122,74,28,0.30) 0 6px, transparent 7px),
    radial-gradient(circle at calc(100% - 12px) calc(100% - 12px), rgba(122,74,28,0.30) 0 6px, transparent 7px);
  pointer-events: none;
  opacity: 0.85;
}

/* Hover / focus effects */
.ach-tile:hover .ach-icon,
.ach-tile:focus-visible .ach-icon {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0,0,0,0.14);
}

/* ===========================
   Rare (Yearly) Styling
   =========================== */

.ach-tile.rare[data-unlocked="true"] .ach-icon {
  border-color: var(--ach-yearly);
  box-shadow:
    0 0 0 2px rgba(139,46,46,0.25),
    0 8px 20px rgba(139,46,46,0.25);
  animation: rarePulse 3s ease-in-out infinite;
}

/* Subtle glowing pulse */
@keyframes rarePulse {
  0% {
    box-shadow:
      0 0 0 2px rgba(139,46,46,0.25),
      0 8px 20px rgba(139,46,46,0.25);
  }
  50% {
    box-shadow:
      0 0 14px rgba(139,46,46,0.45),
      0 8px 24px rgba(139,46,46,0.35);
  }
  100% {
    box-shadow:
      0 0 0 2px rgba(139,46,46,0.25),
      0 8px 20px rgba(139,46,46,0.25);
  }
}

.ach-tile.rare .ach-icon i { color: var(--ach-yearly); }

/* Hover title tooltip */
.ach-hover-title {
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  transform: translateX(-50%);
  background: #2a1f14;
  color: #f4f1ea;
  border: 1px solid rgba(244,241,234,0.2);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.9em;
  letter-spacing: 0.5px;
  white-space: nowrap;
  z-index: 50;
  display: none;
  box-shadow: 0 12px 28px rgba(0,0,0,0.22);
}
.ach-hover-title::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid #2a1f14;
}
.ach-tile:hover .ach-hover-title,
.ach-tile:focus-visible .ach-hover-title { display: block; }

/* Inline expanding details panel */
.ach-details {
  margin-top: 10px;
  background: #fff;
  border: 1px solid #d4c8b6;
  border-radius: 10px;
  padding: 14px 14px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);

  max-height: 0;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition: max-height 0.22s ease, opacity 0.18s ease, transform 0.18s ease, padding 0.18s ease;
}

.ach-tile.is-open .ach-details {
  max-height: 1200px;
  opacity: 1;
  transform: translateY(0);
  padding-top: 14px;
  padding-bottom: 14px;
}

/* Details text */
.ach-details-title {
  font-weight: bold;
  letter-spacing: 0.6px;
  font-size: 1.05em;
}

.ach-details-meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #5c4631;
  font-size: 0.92em;
}

.ach-details-desc {
  margin-top: 10px;
  color: #2b2b2b;
  line-height: 1.35;
}

/* Tags (only shown in expanded panel) */
.ach-tag {
  display: inline-block;
  font-size: 0.78em;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  border: 1px solid rgba(42,31,20,0.22);
  background: #fffaf0;
  color: var(--ach-ink);
}

/* Category tag palettes */
.ach-tag.tavern{
  background: rgba(122,74,28,0.12);
  border-color: rgba(122,74,28,0.45);
  color: #5c3a18;
}
.ach-tag.seasonal{
  background: rgba(47,107,91,0.12);
  border-color: rgba(47,107,91,0.45);
  color: var(--ach-seasonal);
}
.ach-tag.yearly{
  background: rgba(139,46,46,0.12);
  border-color: rgba(139,46,46,0.45);
  color: var(--ach-yearly);
}
.ach-tag.honor{
  background: rgba(184,155,94,0.18);
  border-color: rgba(184,155,94,0.55);
  color: var(--ach-laurel-ink);
}

/* =========================================================
   TYPE-BASED BORDER/ICON/CORNERS (auto via tag) — uses :has()
   ========================================================= */

/* Tavern */
.ach-tile:has(.ach-tag.tavern) .ach-icon{ border-color: var(--ach-tavern); }
.ach-tile:has(.ach-tag.tavern) .ach-icon > i{ color: var(--ach-ink); }
.ach-tile:has(.ach-tag.tavern) .ach-icon::after{
  background:
    radial-gradient(circle at 12px 12px, rgba(122,74,28,0.30) 0 6px, transparent 7px),
    radial-gradient(circle at calc(100% - 12px) 12px, rgba(122,74,28,0.30) 0 6px, transparent 7px),
    radial-gradient(circle at 12px calc(100% - 12px), rgba(122,74,28,0.30) 0 6px, transparent 7px),
    radial-gradient(circle at calc(100% - 12px) calc(100% - 12px), rgba(122,74,28,0.30) 0 6px, transparent 7px);
}

/* Seasonal */
.ach-tile:has(.ach-tag.seasonal) .ach-icon{ border-color: var(--ach-seasonal); }
.ach-tile:has(.ach-tag.seasonal) .ach-icon > i{ color: var(--ach-seasonal); }
.ach-tile:has(.ach-tag.seasonal) .ach-icon::after{
  background:
    radial-gradient(circle at 12px 12px, rgba(47,107,91,0.28) 0 6px, transparent 7px),
    radial-gradient(circle at calc(100% - 12px) 12px, rgba(47,107,91,0.28) 0 6px, transparent 7px),
    radial-gradient(circle at 12px calc(100% - 12px), rgba(47,107,91,0.28) 0 6px, transparent 7px),
    radial-gradient(circle at calc(100% - 12px) calc(100% - 12px), rgba(47,107,91,0.28) 0 6px, transparent 7px);
}

/* Yearly */
.ach-tile:has(.ach-tag.yearly) .ach-icon{ border-color: var(--ach-yearly); }
.ach-tile:has(.ach-tag.yearly) .ach-icon > i{ color: var(--ach-yearly); }
.ach-tile:has(.ach-tag.yearly) .ach-icon::after{
  background:
    radial-gradient(circle at 12px 12px, rgba(139,46,46,0.30) 0 6px, transparent 7px),
    radial-gradient(circle at calc(100% - 12px) 12px, rgba(139,46,46,0.30) 0 6px, transparent 7px),
    radial-gradient(circle at 12px calc(100% - 12px), rgba(139,46,46,0.30) 0 6px, transparent 7px),
    radial-gradient(circle at calc(100% - 12px) calc(100% - 12px), rgba(139,46,46,0.30) 0 6px, transparent 7px);
}

/* Laurels */
.ach-tile:has(.ach-tag.honor) .ach-icon{ border-color: var(--ach-laurel); }
.ach-tile:has(.ach-tag.honor) .ach-icon > i{ color: var(--ach-laurel-ink); }
.ach-tile:has(.ach-tag.honor) .ach-icon::after{
  background:
    radial-gradient(circle at 12px 12px, rgba(184,155,94,0.30) 0 6px, transparent 7px),
    radial-gradient(circle at calc(100% - 12px) 12px, rgba(184,155,94,0.30) 0 6px, transparent 7px),
    radial-gradient(circle at 12px calc(100% - 12px), rgba(184,155,94,0.30) 0 6px, transparent 7px),
    radial-gradient(circle at calc(100% - 12px) calc(100% - 12px), rgba(184,155,94,0.30) 0 6px, transparent 7px);
}

/* =========================================================
   ACHIEVEMENT STATE SYSTEM (cleaned + de-duplicated)
   ========================================================= */

/* lock badge (overlay) */
.ach-lock{
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 5;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  background: #efe3c4;
  border: 1px solid #7a4a1c;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.ach-lock i{
  font-size: 12px;
  color: #8b2e2e;
  line-height: 1;
}

/* progress chip (overlay) */
.ach-progress{
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 5;
  display: none;
  pointer-events: none;
  font-size: 12px;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(42,31,20,0.92);
  color: #f4f1ea;
  border: 1px solid rgba(244,241,234,0.18);
  letter-spacing: 0.5px;
}

/* LOCKED / UNCLAIMED */
.ach-tile.is-locked .ach-icon{
  filter: grayscale(100%);
  opacity: 0.6;
}
.ach-tile.is-locked .ach-lock{ display: inline-flex; }
.ach-tile.is-locked .ach-rank{ display: none !important; }

/* UNLOCKED (default) */
.ach-tile[data-unlocked="true"] .ach-icon{
  filter: none;
  opacity: 1;
}

/* IN PROGRESS (Grey but Alive) */
.ach-tile.is-progress .ach-icon{
  filter: grayscale(55%);
  opacity: 0.95;
  background: linear-gradient(145deg, #f1e8d6, #e6d6ba);
  border-color: #a88454;
  box-shadow:
    0 4px 14px rgba(0,0,0,0.12),
    0 0 0 2px rgba(168,132,84,0.35),
    0 0 18px rgba(168,132,84,0.35),
    0 0 30px rgba(139,46,46,0.25);
  animation: progressPulse 2.8s ease-in-out infinite;
}
.ach-tile.is-progress .ach-icon i{ color: #5c3a18; }
.ach-tile.is-progress .ach-lock{ display: none !important; }
.ach-tile.is-progress .ach-progress{ display: inline-flex; }

@keyframes progressPulse {
  0% {
    box-shadow:
      0 4px 14px rgba(0,0,0,0.12),
      0 0 0 2px rgba(168,132,84,0.35),
      0 0 14px rgba(168,132,84,0.28),
      0 0 22px rgba(139,46,46,0.18);
  }
  50% {
    box-shadow:
      0 4px 14px rgba(0,0,0,0.12),
      0 0 0 2px rgba(168,132,84,0.55),
      0 0 24px rgba(168,132,84,0.45),
      0 0 40px rgba(139,46,46,0.35);
  }
  100% {
    box-shadow:
      0 4px 14px rgba(0,0,0,0.12),
      0 0 0 2px rgba(168,132,84,0.35),
      0 0 14px rgba(168,132,84,0.28),
      0 0 22px rgba(139,46,46,0.18);
  }
}

/* UPCOMING (0% shown) */
.ach-tile.is-upcoming .ach-icon{
  filter: grayscale(55%);
  opacity: 0.95;
  border-color: #a88454;
  box-shadow:
    0 4px 14px rgba(0,0,0,0.12),
    0 0 0 2px rgba(168,132,84,0.35),
    0 0 18px rgba(168,132,84,0.35),
    0 0 30px rgba(139,46,46,0.25);
  animation: progressPulse 2.8s ease-in-out infinite;
}
.ach-tile.is-upcoming .ach-lock{ display: none !important; }
.ach-tile.is-upcoming .ach-progress{ display: inline-flex; }
.ach-tile.is-upcoming .ach-icon i{ color: #5c3a18; }
.ach-tile.is-upcoming .ach-progress::after{ content: none; }   /* was: content: "0%" */

/* Rank track inside the expanded panel */
.rank-track{
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.rank-step{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f4f1ea;
  border: 1px solid rgba(42,31,20,0.15);
  color: #5c4631;
  font-size: 0.92em;
}
.rank-step i{ width: 18px; text-align: center; }
.rank-step.is-on{
  background: #efe3c4;
  border-color: rgba(139,46,46,0.35);
  color: #2a1f14;
  box-shadow: 0 0 0 2px rgba(139,46,46,0.12);
}

/* ===========================
   TAVERN RANK BADGE (Tier I / Tier II) — cleaned (single definition)
   =========================== */

.ach-rank{
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 6;

  width: 34px;
  height: 28px;
  border-radius: 9px;

  display: none;
  align-items: center;
  justify-content: center;

  font-weight: bold;
  font-size: 12px;
  letter-spacing: 0.6px;

  background: rgba(42,31,20,0.92);
  color: #f4f1ea;
  border: 1px solid rgba(244,241,234,0.18);
  box-shadow: 0 6px 14px rgba(0,0,0,0.18);
  pointer-events: none;
}

/* Show badge only on ranked taverns */
.ach-tile.ach-rank-1 .ach-rank,
.ach-tile.ach-rank-2 .ach-rank{ display: inline-flex; }

/* Automatically inject rank text */
.ach-tile.ach-rank-1 .ach-rank::after{ content: "I/II"; }
.ach-tile.ach-rank-2 .ach-rank::after{ content: "II/II"; }

/* Tier I: in-between (keeps your vibe) */
.ach-tile.ach-rank-1 .ach-icon{
  filter: none;              /* optional: keep full color */
  opacity: 1;
  border-color: rgba(122,74,28,0.90);
  box-shadow: 0 6px 14px rgba(0,0,0,0.10);  /* normal depth only */
  animation: none !important;
}
@keyframes tier1Pulse{
  0%{
    box-shadow:
      0 4px 12px rgba(0,0,0,0.10),
      0 0 0 2px rgba(92,70,49,0.20),
      0 0 14px rgba(92,70,49,0.18),
      0 0 20px rgba(139,46,46,0.12);
  }
  50%{
    box-shadow:
      0 4px 12px rgba(0,0,0,0.10),
      0 0 0 2px rgba(92,70,49,0.35),
      0 0 22px rgba(92,70,49,0.30),
      0 0 34px rgba(139,46,46,0.22);
  }
  100%{
    box-shadow:
      0 4px 12px rgba(0,0,0,0.10),
      0 0 0 2px rgba(92,70,49,0.20),
      0 0 14px rgba(92,70,49,0.18),
      0 0 20px rgba(139,46,46,0.12);
  }
}
.ach-tile.ach-rank-1 .ach-rank{ background: rgba(92,70,49,0.92); }

/* Tier II Tavern: ROYAL BLUE (not yearly red) — also excludes yearly .rare */
.ach-tile.ach-rank-2:not(.rare) .ach-icon{
  border-color: var(--ach-tier2);
  box-shadow:
    0 0 0 2px rgba(47,78,122,0.24),
    0 10px 22px rgba(47,78,122,0.22),
    0 0 18px var(--ach-tier2-silver);
  animation: tier2BluePulse 3s ease-in-out infinite;
}
.ach-tile.ach-rank-2:not(.rare) .ach-icon i{ color: var(--ach-tier2); }
.ach-tile.ach-rank-2:not(.rare) .ach-icon::before{ border-color: rgba(240,240,240,0.55); }
.ach-tile.ach-rank-2:not(.rare) .ach-rank{
  background: rgba(47,78,122,0.92);
  border-color: rgba(240,240,240,0.18);
}

@keyframes tier2BluePulse{
  0%{
    box-shadow:
      0 0 0 2px rgba(47,78,122,0.24),
      0 10px 22px rgba(47,78,122,0.22),
      0 0 10px rgba(240,240,240,0.10);
  }
  50%{
    box-shadow:
      0 0 14px rgba(47,78,122,0.42),
      0 12px 26px rgba(47,78,122,0.30),
      0 0 18px rgba(240,240,240,0.18);
  }
  100%{
    box-shadow:
      0 0 0 2px rgba(47,78,122,0.24),
      0 10px 22px rgba(47,78,122,0.22),
      0 0 10px rgba(240,240,240,0.10);
  }
}

/* ===========================
   LAURELS (Milestone Honors)
   =========================== */

.ach-tile.laurel .ach-icon {
  background: linear-gradient(145deg, #f6f1e4, #eadfcb);
  border-color: var(--ach-laurel);
}

/* Earned Laurel (golden glow) */
.ach-tile.laurel.is-earned .ach-icon {
  box-shadow:
    0 0 0 2px rgba(184,155,94,0.35),
    0 8px 20px rgba(184,155,94,0.25),
    0 0 22px rgba(184,155,94,0.30);
}

.ach-tile.laurel.is-earned .ach-icon i { color: var(--ach-laurel-ink); }

/* Unearned Laurel (muted parchment — not dead grey) */
.ach-tile.laurel.is-unearned .ach-icon {
  opacity: 0.75;
  filter: grayscale(40%);
}
.ach-tile.laurel.is-unearned .ach-icon i { color: #7d6a4d; }


/* ===========================
   FILTER / CONTROLS
   =========================== */

.ach-controls{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:flex-start;
  margin-top: 14px;
  flex-wrap: wrap;
}

.ach-toggle{
  background:#8b2e2e;
  color:#fff;
  border:none;
  padding:10px 14px;
  border-radius:6px;
  font-weight:bold;
  letter-spacing:0.5px;
}
.ach-toggle:hover{ background:#a63a3a; }

.ach-filterbox{ position:relative; }

.ach-filterbtn{
  background:#2a1f14;
  color:#f4f1ea;
  border:1px solid rgba(244,241,234,0.22);
  border-radius:10px;
  padding:10px 12px;
  font-weight:bold;
  letter-spacing:0.5px;
  cursor:pointer;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.ach-filterbtn:hover{ background:#332619; }

.ach-filter-caret{ margin-left: 10px; opacity: 0.9; }

.ach-filterpanel{
  position:absolute;
  top: calc(100% + 10px);
  left:0;
  min-width: 220px;
  background:#fff;
  border:1px solid #d4c8b6;
  border-radius:12px;
  padding:10px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.18);
  display:none;
  z-index: 200;
}
.ach-filterbox.is-open .ach-filterpanel{ display:block; }

.ach-filteritem{
  display:flex;
  gap:10px;
  align-items:center;
  padding:8px 8px;
  border-radius:10px;
  cursor:pointer;
  user-select:none;
  color:#2b2b2b;
}
.ach-filteritem:hover{ background:#f4f1ea; }
.ach-filteritem input{ accent-color: #8b2e2e; }

.ach-filteractions{
  border-top:1px solid #e6dccb;
  margin-top:8px;
  padding-top:8px;
  display:flex;
  justify-content:flex-end;
}

.ach-filter-clear{
  background: transparent;
  border:1px solid rgba(42,31,20,0.22);
  border-radius:10px;
  padding:6px 10px;
  cursor:pointer;
  font-weight:bold;
  color:#2a1f14;
}
.ach-filter-clear:hover{ background:#f4f1ea; }

/* ===========================
   DATE RANGE FILTER
   =========================== */

.ach-datefilter{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.ach-date-label{
  font-size: 0.95rem;
  color:#5c4631;
}

.ach-date-sliders{
  display:flex;
  gap:10px;
  align-items:center;
  min-width: 280px;
}

.ach-date-sliders input[type="range"]{ width: 180px; }

.ach-filterdivider{
  height:1px;
  background:#e6dccb;
  margin: 10px 0;
}

.ach-datefilter.in-panel{ width: 100%; }

/* Dual range (single bar, two thumbs) */
.ach-dualrange{
  position: relative;
  height: 30px;
  width: 100%;
  max-width: 320px;
  margin: 6px 0 8px;
  --track-nudge: 4px;
}

.ach-dualrange-track{
  position:absolute;
  left: 0;
  right: 0;
  top: calc(50% + var(--track-nudge));
  transform: translateY(-50%);
  height: 6px;
  border-radius: 999px;
  background: #e2d8c7;
  border: 1px solid #b9aa95;
}

.ach-dualrange-fill{
  position:absolute;
  top: calc(50% + var(--track-nudge));
  transform: translateY(-50%);
  height: 6px;
  border-radius: 999px;
  background: #8b2e2e;
  opacity: 0.9;
}

.ach-dualrange input[type="range"]{
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  height: 30px;
  margin: 0;
  background: transparent;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}

.ach-dualrange input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #2a1f14;
  border: 2px solid #f4f1ea;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  pointer-events: auto;
  cursor: pointer;
}
.ach-dualrange input[type="range"]::-webkit-slider-runnable-track{
  height: 6px;
  background: transparent;
}

.ach-dualrange input[type="range"]::-moz-range-thumb{
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #2a1f14;
  border: 2px solid #f4f1ea;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  pointer-events: auto;
  cursor: pointer;
}
.ach-dualrange input[type="range"]::-moz-range-track{
  height: 6px;
  background: transparent;
  border: none;
}
/* ===========================
   TAVERN MARKS / HONORS
   =========================== */

.ach-marks{
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.ach-mark{
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8f3ea;
  border: 1px solid rgba(42,31,20,0.12);
  overflow: hidden;
}

.ach-mark-label{
  display: block;
  font-size: 0.78em;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  font-weight: bold;
  margin-bottom: 6px;
  line-height: 1.2;
}

.ach-mark-name{
  display: block;
  font-weight: bold;
  color: #2a1f14;
  line-height: 1.25;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

/* Bronze Mark */
.ach-mark-bronze{
  background: linear-gradient(180deg, #f3e3d2, #ead4be);
  border-color: rgba(140, 92, 52, 0.35);
}
.ach-mark-bronze .ach-mark-label{
  color: #8c5c34;
}

/* Pewter Mark */
.ach-mark-pewter{
  background: linear-gradient(180deg, #efefee, #deddd9);
  border-color: rgba(102, 102, 108, 0.28);
}
.ach-mark-pewter .ach-mark-label{
  color: #66666c;
}