.ajl-wrap {
  background: #261c36;
  border: 2px solid #453362;
  border-radius: 14px;
  box-shadow: 0 6px 0 #0e0914;
  padding: 20px;
  color: #f6ecd4;
}

.ajl-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid #3a2b52;
}

.ajl-controls-group {
  display: flex;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
  gap: 10px;
}

.ajl-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ajl-field-label {
  font-family: "Silkscreen", monospace;
  font-size: 12px;
  color: #a794bd;
  text-transform: uppercase;
}

.ajl-select {
  background: var(--bg, #16101d);
  color: var(--text, #f6ecd4);
  border: 2px solid var(--border, #453362);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  min-height: 44px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
}

.ajl-select:focus-visible {
  outline: 2px solid #b6f24a;
  outline-offset: 2px;
}

.ajl-score-hud {
  display: flex;
  gap: 10px;
}

.ajl-hud-pill {
  background: #16101d;
  border: 2px solid #453362;
  border-radius: 10px;
  padding: 6px 14px;
  text-align: center;
  min-width: 92px;
}

.ajl-hud-score {
  border-color: #b6f24a;
}

.ajl-hud-kicker {
  display: block;
  font-family: "Silkscreen", monospace;
  font-size: 12px;
  color: #a794bd;
}

.ajl-hud-pill strong {
  font-family: "Silkscreen", monospace;
  font-size: 18px;
  color: #ffd43b;
}

.ajl-stage-card {
  background: #1e162b;
  border: 2px solid #453362;
  border-radius: 12px;
  padding: 20px;
}

.ajl-prompt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.ajl-pack-badge {
  display: inline-block;
  background: #2aa89a;
  color: #0b1f1d;
  font-family: "Silkscreen", monospace;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}

.ajl-timer-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #16101d;
  border: 2px solid #453362;
  border-radius: 8px;
  padding: 4px 10px;
  font-family: "Silkscreen", monospace;
  font-size: 15px;
  color: #b6f24a;
}

.ajl-timer-box.is-urgent {
  border-color: #ff6b6b;
  color: #ff6b6b;
}

.ajl-timer-track {
  height: 8px;
  background: #120c18;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid #3a2b52;
}

.ajl-timer-fill {
  height: 100%;
  background: #b6f24a;
  transition: width 0.25s linear, background-color 0.25s ease;
}

.ajl-timer-fill.is-urgent {
  background: #ff6b6b;
}

.ajl-prompt-kicker {
  font-family: "Silkscreen", monospace;
  font-size: 12px;
  color: #c59bff;
  margin: 0 0 6px;
}

.ajl-prompt-text {
  font-size: 26px;
  line-height: 1.25;
  color: #f6ecd4;
  margin: 0 0 16px;
}

.ajl-brew-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 12px;
}

.ajl-input-col {
  flex: 1 1 240px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ajl-input-label {
  font-family: "Silkscreen", monospace;
  font-size: 12px;
  color: var(--text-soft, #d4c5e4);
}

.ajl-form-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ajl-input {
  width: 100%;
  height: 48px;
  min-height: 48px;
  background: var(--bg, #120c18);
  border: 2px solid #57417a;
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text, #f6ecd4);
  font-family: inherit;
  font-size: 16px;
}

.ajl-input:focus {
  outline: none;
  border-color: #b6f24a;
  box-shadow: 0 0 0 3px rgba(182, 242, 74, 0.2);
}

.ajl-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ajl-btn-brew {
  height: 48px;
  min-height: 48px;
  padding: 0 20px;
  background: #b6f24a;
  color: #14200a;
  border: 2px solid #b6f24a;
  border-bottom: 4px solid #7cb322;
  border-radius: 10px;
  font-family: "Silkscreen", monospace;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s ease, filter 0.15s ease;
}

.ajl-btn-brew:hover:not(:disabled) {
  filter: brightness(1.06);
}

.ajl-btn-brew:active:not(:disabled) {
  transform: translateY(2px);
}

.ajl-btn-uncork,
.ajl-btn-ghost {
  height: 48px;
  min-height: 48px;
  padding: 0 16px;
  background: transparent;
  color: #d4c5e4;
  border: 2px solid #57417a;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.ajl-btn-uncork:hover:not(:disabled),
.ajl-btn-ghost:hover:not(:disabled) {
  border-color: #c59bff;
  color: #f6ecd4;
}

.ajl-btn-brew:disabled,
.ajl-btn-uncork:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ajl-feedback {
  background: #16101d;
  border-left: 4px solid #c59bff;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: #d4c5e4;
  margin-bottom: 16px;
}

.ajl-feedback.is-jinx {
  border-left-color: #ff6b6b;
  color: #ffd6d6;
}

.ajl-feedback.is-prim {
  border-left-color: #ffd43b;
  color: #fff3bf;
}

.ajl-feedback.is-good {
  border-left-color: #b6f24a;
  color: #e9fac8;
}

.ajl-shelf-wrap {
  background: #16101d;
  border: 2px solid #38294f;
  border-radius: 10px;
  padding: 14px;
}

.ajl-shelf-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #d4c5e4;
  margin-bottom: 10px;
}

.ajl-legend-inline {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #a794bd;
}

.ajl-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 2px;
}

.ajl-dot-jinx { background: #ff6b6b; }
.ajl-dot-murky { background: #4dabf7; }
.ajl-dot-glow { background: #c59bff; }
.ajl-dot-prim { background: #ffd43b; }

.ajl-shelf-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ajl-shelf-empty {
  margin: 0;
  font-size: 14px;
  color: #a794bd;
}

.ajl-potion-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 2px solid #453362;
  background: #261c36;
  font-size: 14px;
  font-weight: 600;
}

.ajl-potion-pill .ajl-pts {
  font-family: "Silkscreen", monospace;
  font-size: 12px;
}

.ajl-tier-jinx {
  border-color: #e05252;
  background: #2f1620;
  color: #ffc9c9;
}
.ajl-tier-jinx .ajl-pts { color: #ff8787; }

.ajl-tier-murky {
  border-color: #7c8a58;
  color: #f6ecd4;
}
.ajl-tier-murky .ajl-pts { color: #c0cf97; }

.ajl-tier-bubbly {
  border-color: #3b9ae1;
  color: #e7f5ff;
}
.ajl-tier-bubbly .ajl-pts { color: #74c0fc; }

.ajl-tier-glowing {
  border-color: #94d82d;
  color: #f4fce3;
}
.ajl-tier-glowing .ajl-pts { color: #b6f24a; }

.ajl-tier-enchanted {
  border-color: #b178ff;
  background: #2b1d42;
  color: #f3e8ff;
}
.ajl-tier-enchanted .ajl-pts { color: #d0bfff; }

.ajl-tier-primordial {
  border-color: #ffd43b;
  background: #2b2214;
  color: #fff9db;
}
.ajl-tier-primordial .ajl-pts { color: #ffd43b; }

.ajl-reveal-scroll {
  margin-top: 18px;
  background: #f6ecd4;
  color: #1c1326;
  border: 3px solid #d8c59e;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 4px 0 #0e0914;
}

.ajl-reveal-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 2px dashed #cbb489;
  margin-bottom: 14px;
}

.ajl-scroll-kicker {
  display: block;
  font-family: "Silkscreen", monospace;
  font-size: 12px;
  color: #6b4c2a;
}

.ajl-scroll-title {
  margin: 2px 0 0;
  font-size: 20px;
  color: #1c1326;
}

.ajl-round-pts {
  font-family: "Silkscreen", monospace;
  font-size: 18px;
  background: #1c1326;
  color: #b6f24a;
  padding: 6px 12px;
  border-radius: 8px;
}

.ajl-reveal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.ajl-reveal-col {
  background: #fff9eb;
  border: 2px solid #decba4;
  border-radius: 10px;
  padding: 12px;
}

.ajl-reveal-col h4 {
  margin: 0 0 4px;
  font-size: 15px;
  color: #1c1326;
}

.ajl-col-note {
  margin: 0 0 10px;
  font-size: 13px;
  color: #5c4934;
}

.ajl-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ajl-reveal-chip {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
}

.ajl-chip-trap {
  background: #ffe3e3;
  color: #9b1c1c;
  border: 1px solid #ffa8a8;
}

.ajl-chip-prim {
  background: #1c1326;
  color: #ffd43b;
  border: 1px solid #57417a;
}

.ajl-chip-ench {
  background: #f3e8ff;
  color: #4c1d95;
  border: 1px solid #d0bfff;
}

.ajl-reveal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ajl-summary-panel {
  margin-top: 18px;
  background: #2c203e;
  border: 2px solid #ffd43b;
  border-radius: 12px;
  padding: 20px;
}

.ajl-summary-panel .ajl-scroll-kicker {
  color: #ffd43b;
}

.ajl-summary-rank {
  margin: 4px 0 8px;
  font-size: 24px;
  color: #b6f24a;
}

.ajl-summary-desc {
  margin: 0 0 16px;
  color: #d4c5e4;
  font-size: 15px;
}

.ajl-summary-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.ajl-summary-stats > div {
  background: #16101d;
  border: 2px solid #453362;
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}

.ajl-summary-stats span {
  display: block;
  font-size: 12px;
  color: #a794bd;
  margin-bottom: 4px;
}

.ajl-summary-stats strong {
  font-family: "Silkscreen", monospace;
  font-size: 18px;
  color: #f6ecd4;
}

.ajl-copy-msg {
  font-size: 13px;
  font-weight: 600;
  color: #b6f24a;
}

@media (max-width: 640px) {
  .ajl-wrap {
    padding: 10px;
    border-radius: 12px;
  }
  .ajl-topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-bottom: 8px;
    padding-bottom: 8px;
  }
  .ajl-controls-group {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 0.9fr);
    width: 100%;
    gap: 5px;
  }
  .ajl-field {
    gap: 0;
  }
  .ajl-field-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  .ajl-controls-group > .ajl-field:nth-child(1),
  .ajl-controls-group > .ajl-field:nth-child(3),
  .ajl-field-rule {
    grid-column: auto;
    order: 0;
  }
  .ajl-select {
    min-height: 34px;
    height: 34px;
    padding: 2px 6px;
    font-size: 12px;
  }
  .ajl-score-hud {
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
  }
  .ajl-hud-pill {
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: 999px;
  }
  .ajl-hud-kicker {
    display: inline;
    font-size: 12px;
  }
  .ajl-hud-pill strong {
    font-size: 13px;
  }
  .ajl-stage-card {
    padding: 10px 12px;
  }
  .ajl-prompt-header {
    margin-bottom: 5px;
  }
  .ajl-timer-track {
    height: 6px;
    margin-bottom: 8px;
  }
  .ajl-prompt-kicker {
    display: none;
  }
  .ajl-prompt-text {
    font-size: 19px;
    line-height: 1.2;
    margin-bottom: 8px;
  }
  .ajl-brew-form {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 8px;
  }
  .ajl-input-col {
    flex: none;
    width: 100%;
  }
  .ajl-input-label {
    display: none;
  }
  .ajl-form-btns {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .ajl-btn-brew,
  .ajl-btn-uncork {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    font-size: 13px;
  }
  .ajl-btn-ghost {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
  }
  .ajl-reveal-grid {
    grid-template-columns: 1fr;
  }
  .ajl-summary-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
