/* GIZMO KAKA V0.41.7 — CLEAN KEY / NIGHT RHYTHM
 * Additive presentation only. The approved V0.41 base and interaction sheets
 * remain byte-for-byte frozen.
 */

/* R1 is a signpost, not a modal: both roads stay under player control. */
.aka-route-fork {
  position:relative;
  margin:0 0 1.8rem;
  padding:1rem;
  border:1px solid rgba(212,168,67,.28);
  background:
    linear-gradient(110deg,rgba(212,168,67,.08),transparent 42%),
    rgba(4,4,4,.88);
  box-shadow:inset 0 0 24px rgba(212,168,67,.035),0 12px 28px rgba(0,0,0,.22);
}
.aka-route-fork > p,
.aka-route-fork > h3 { margin:0;text-align:center;text-transform:uppercase; }
.aka-route-fork > p { color:rgba(212,168,67,.72);font:400 .62rem/1.3 "Special Elite",serif;letter-spacing:.28em; }
.aka-route-fork > h3 { margin-top:.34rem;color:rgba(247,240,222,.92);font:400 1.42rem/1 "Bebas Neue",sans-serif;letter-spacing:.08em; }
.aka-route-fork-actions { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.68rem;margin-top:.86rem; }
.aka-route-fork-actions button {
  min-height:2.75rem;
  display:grid;
  place-content:center;
  gap:.18rem;
  padding:.58rem .7rem;
  border:1px solid rgba(212,168,67,.34);
  background:rgba(212,168,67,.055);
  color:#efe3c7;
  transition:border-color .2s ease,background .2s ease,box-shadow .2s ease,transform .15s ease;
}
.aka-route-fork-actions button span { font:400 .72rem/1.1 "Special Elite",serif;letter-spacing:.16em; }
.aka-route-fork-actions button small { color:rgba(239,227,199,.50);font:400 .54rem/1.1 "Special Elite",serif;letter-spacing:.12em; }
.aka-route-fork-actions button:not(:disabled):hover,
.aka-route-fork-actions button:not(:disabled):focus-visible { border-color:rgba(212,168,67,.76);background:rgba(212,168,67,.11);box-shadow:0 0 18px rgba(212,168,67,.12);outline:none; }
.aka-route-fork-actions button:not(:disabled):active { transform:translateY(1px); }
.aka-route-fork-actions button.is-lost { border-color:rgba(255,45,85,.30);background:rgba(255,45,85,.055); }
.aka-route-fork-actions button.is-lost.is-ready { border-color:rgba(255,45,85,.66);box-shadow:inset 0 0 18px rgba(255,45,85,.045); }
.aka-route-fork-actions button.is-locked { opacity:.58;cursor:default; }

/* D12 previews one mastery lock with three learned threads, never three icons. */
.aka-d12-mastery-preview {
  position:absolute;
  z-index:19;
  left:.58rem;
  right:.58rem;
  bottom:4.18rem;
  padding:.55rem .58rem .52rem;
  border:1px solid rgba(206,218,228,.30);
  background:linear-gradient(180deg,rgba(12,15,18,.94),rgba(3,4,5,.96));
  box-shadow:0 8px 24px rgba(0,0,0,.42),inset 0 0 16px rgba(206,218,228,.035);
  pointer-events:none;
}
.aka-d12-mastery-preview > strong { display:block;color:rgba(225,232,238,.78);font:400 .55rem/1.15 "Special Elite",serif;letter-spacing:.16em;text-align:center; }
.aka-d12-mastery-segments { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.28rem;margin-top:.44rem; }
.aka-d12-mastery-segment { display:grid;gap:.22rem;min-width:0;text-align:center; }
.aka-d12-mastery-segment > span { height:.18rem;border:1px solid rgba(185,198,209,.26);background:rgba(185,198,209,.07);box-shadow:inset 0 0 5px rgba(0,0,0,.65); }
.aka-d12-mastery-segment small { overflow:hidden;color:rgba(205,215,223,.42);font:400 .46rem/1 "Special Elite",serif;letter-spacing:.08em;text-overflow:ellipsis; }
.aka-d12-mastery-segment.is-complete > span { border-color:rgba(119,231,151,.72);background:rgba(80,211,119,.72);box-shadow:0 0 8px rgba(80,211,119,.42); }
.aka-d12-mastery-segment.is-complete small { color:rgba(149,239,174,.82); }
.aka-d12-mastery-preview > p { margin:.42rem 0 0;color:rgba(215,224,231,.66);font:400 .50rem/1.25 "Special Elite",serif;letter-spacing:.07em;text-align:center;text-transform:uppercase; }
.aka-d12-mastery-preview.is-complete { border-color:rgba(212,168,67,.54);box-shadow:0 0 16px rgba(212,168,67,.10),0 8px 24px rgba(0,0,0,.42); }
.aka-d12-mastery-preview.is-complete > p { color:rgba(242,202,105,.92); }
.aka-d12-mastery-preview.is-seal-ready { border-color:rgba(223,232,239,.76);box-shadow:0 0 18px rgba(205,221,232,.18),0 8px 24px rgba(0,0,0,.42); }

/* DOWNLOAD and every side icon share one compact optical rhythm. Invisible
   targets grow sideways, but never overlap the neighbouring icon vertically. */
#modalContent .aka-archive-file-card {
  --aka-poster-side-start:.52rem;
  --aka-poster-download-size:1.74rem;
  --aka-poster-side-gap:.30rem;
  --aka-poster-side-hit-inset:-.15rem;
}

#modalContent .aka-archive-file-card .aka-archive-task-icons {
  top:calc(var(--aka-poster-side-start) + var(--aka-poster-download-size) + var(--aka-poster-side-gap)) !important;
  right:var(--aka-poster-side-start) !important;
  gap:var(--aka-poster-side-gap) !important;
}
#modalContent .aka-archive-file-card button.aka-archive-task-icon:not(.is-complete)::before {
  content:"";
  position:absolute;
  inset-block:var(--aka-poster-side-hit-inset);
  inset-inline:-.48rem;
  border-radius:999px;
  background:transparent;
}

/* Mandatory post-final actions are route nodes, visually distinct from MAG,
   DIA and Bonus inventory. They still use the same compact poster controls. */
#modalContent .aka-archive-legend-route-icon {
  --aka-task-accent:212,168,67 !important;
  background:
    radial-gradient(circle at 50% 45%,rgba(255,218,112,.14),transparent 48%),
    linear-gradient(180deg,rgba(212,168,67,.12),rgba(5,3,2,.96)) !important;
}
#modalContent .aka-archive-legend-route-icon.is-active {
  border-color:rgba(238,195,91,.72) !important;
  box-shadow:0 0 0 1px rgba(212,168,67,.14),0 0 15px rgba(212,168,67,.18) !important;
}
#modalContent .aka-archive-legend-route-icon > svg {
  color:rgb(240,203,112) !important;
  filter:drop-shadow(0 0 5px rgba(212,168,67,.42));
}
/* Poster states are one compact physical control. Text/state changes must never
   change its geometry or become wider than SEALED. */
#modalContent .aka-archive-file-card .aka-archive-inspect-btn,
#modalContent .aka-archive-file-card .aka-archive-recover-btn,
#modalContent .aka-archive-file-card .aka-archive-recovered-badge {
  box-sizing:border-box !important;
  inline-size:5.9rem !important;
  width:5.9rem !important;
  min-width:5.9rem !important;
  max-width:5.9rem !important;
  min-height:2.02rem !important;
  height:2.02rem !important;
  padding-inline:.54rem !important;
  white-space:nowrap !important;
  overflow:hidden !important;
}

/* The Main Silver Seal CTA follows the same physical grammar as every other
   poster state. Only its invisible vertical hit area reaches 44px. */
#modalContent .aka-archive-file-card .aka-archive-main-seal-btn {
  position:relative !important;
  box-sizing:border-box !important;
  inline-size:5.9rem !important;
  width:5.9rem !important;
  min-width:5.9rem !important;
  max-width:5.9rem !important;
  min-height:2.02rem !important;
  height:2.02rem !important;
  padding-inline:.54rem !important;
  overflow:visible !important;
}
#modalContent .aka-archive-file-card .aka-archive-main-seal-btn::before {
  content:"";
  position:absolute;
  top:50%;
  left:0;
  width:100%;
  height:2.75rem;
  transform:translateY(-50%);
  border-radius:inherit;
  background:transparent;
}

/* Mobile Wallet signal icons keep their optical size but meet a 44px target. */
@media (max-width:768px), (pointer:coarse) {
  .aka-mobile-wallet-signal-strip .aka-wallet-signal-action { position:relative;overflow:visible !important; }
  .aka-mobile-wallet-signal-strip .aka-wallet-signal-action::after {
    content:"" !important;
    display:block !important;
    position:absolute;
    inset:-.40rem;
    border-radius:999px;
    background:transparent !important;
    pointer-events:auto;
  }
}

/* Do not reveal the Blue category before BL01 itself is discovered. */
.aka-wallet-drawer-key.is-blue.is-classified { color:rgba(145,151,158,.30) !important;border-color:rgba(145,151,158,.15) !important;background:rgba(145,151,158,.025) !important;filter:grayscale(1); }
.aka-wallet-drawer-key.is-blue.is-classified strong { color:rgba(145,151,158,.34) !important;text-shadow:none !important; }

@media (max-width:560px) {
  .aka-route-fork-actions { grid-template-columns:1fr; }
  .aka-route-fork { padding:.86rem;margin-bottom:1.45rem; }
  .aka-d12-mastery-preview { left:.48rem;right:.48rem;bottom:4rem;padding:.48rem; }
}

@media (max-width:768px) {
  #modalContent .aka-archive-file-card {
    --aka-poster-side-gap:.30rem;
    --aka-poster-side-hit-inset:-.15rem;
  }
}

@media (max-width:640px) {
  #modalContent .aka-archive-file-card {
    --aka-poster-side-start:.48rem;
    --aka-poster-download-size:1.80rem;
  }
  #modalContent .aka-archive-file-card .aka-archive-inspect-btn,
  #modalContent .aka-archive-file-card .aka-archive-recover-btn,
  #modalContent .aka-archive-file-card .aka-archive-recovered-badge {
    inline-size:5.2rem !important;
    width:5.2rem !important;
    min-width:5.2rem !important;
    max-width:5.2rem !important;
    min-height:1.88rem !important;
    height:1.88rem !important;
    padding-inline:.42rem !important;
  }
  #modalContent .aka-archive-file-card .aka-archive-main-seal-btn {
    inline-size:5.2rem !important;
    width:5.2rem !important;
    min-width:5.2rem !important;
    max-width:5.2rem !important;
    min-height:1.88rem !important;
    height:1.88rem !important;
    padding-inline:.42rem !important;
  }
}

@media (prefers-reduced-motion:reduce) {
  .aka-route-fork-actions button { transition:none; }
}
