/* =========================================================
   STELLAR DRAW · controls & prize rail
   ========================================================= */

.control-strip {
  display: grid;
  min-height: 96px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 22px;
  animation: riseIn 0.9s var(--ease) 0.28s both;
}

.mini-tool {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 11px;
  justify-self: start;
  color: var(--muted);
  transition: color 0.25s ease;
}

.mini-tool--right {
  justify-self: end;
  text-align: right;
}

.mini-tool:hover {
  color: var(--ink);
}

.mini-tool__icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.mini-tool__icon .icon {
  width: 15px;
  height: 15px;
}

.mini-tool:hover .mini-tool__icon {
  border-color: rgba(var(--accent-rgb), 0.34);
  background: var(--accent-soft);
  color: var(--accent);
}

.mini-tool__copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mini-tool__copy > span {
  font-size: 9px;
  letter-spacing: 0.12em;
}

.mini-tool__copy strong {
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
}

.draw-cluster {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;
}

.draw-button {
  position: relative;
  display: flex;
  overflow: hidden;
  width: clamp(270px, 22vw, 322px);
  height: 74px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(var(--accent-rgb), 0.62);
  border-radius: 999px;
  padding: 0 11px 0 30px;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.52), transparent 30%),
    linear-gradient(112deg, #c8f25d 0%, var(--accent) 45%, #efffbc 100%);
  box-shadow:
    0 12px 42px rgba(var(--accent-rgb), 0.14),
    0 0 0 5px rgba(var(--accent-rgb), 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.58);
  color: #081006;
  isolation: isolate;
  transition: transform 0.35s var(--ease), box-shadow 0.35s ease, filter 0.35s ease;
}

.draw-button::before {
  position: absolute;
  z-index: -1;
  top: -60%;
  left: -5%;
  width: 38%;
  height: 220%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.52), transparent);
  content: "";
  opacity: 0.55;
  transform: translateX(-160%) skewX(-18deg);
}

.draw-button::after {
  position: absolute;
  z-index: -1;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), transparent 45%);
  content: "";
  pointer-events: none;
}

.draw-button:hover:not(:disabled) {
  box-shadow:
    0 18px 60px rgba(var(--accent-rgb), 0.23),
    0 0 0 7px rgba(var(--accent-rgb), 0.045),
    inset 0 1px 0 rgba(255, 255, 255, 0.68);
  filter: brightness(1.025);
  transform: translateY(-2px);
}

.draw-button:hover:not(:disabled)::before {
  animation: shimmer 0.9s var(--ease);
}

.draw-button:active:not(:disabled) {
  transform: translateY(0) scale(0.985);
}

.draw-button__edge {
  position: absolute;
  z-index: 2;
  inset: 5px;
  border: 1px solid rgba(8, 16, 6, 0.14);
  border-radius: inherit;
  pointer-events: none;
}

.draw-button__label {
  position: relative;
  z-index: 3;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.19em;
  line-height: 1;
  text-indent: 0.19em;
}

.draw-button__meta {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
}

.draw-button__meta > span:first-child {
  color: rgba(8, 16, 6, 0.54);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.draw-button__arrow {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 50%;
  background: #071006;
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  transition: transform 0.35s var(--ease), background 0.25s ease;
}

.draw-button__arrow .icon {
  width: 19px;
  height: 19px;
}

.draw-button:hover:not(:disabled) .draw-button__arrow {
  transform: translateX(2px) rotate(-6deg);
}

.draw-button:disabled,
.draw-button.is-busy {
  border-color: rgba(var(--accent-rgb), 0.26);
  background:
    radial-gradient(circle at 40% 30%, rgba(var(--accent-rgb), 0.16), transparent 42%),
    linear-gradient(110deg, rgba(22, 37, 27, 0.96), rgba(9, 16, 11, 0.96));
  box-shadow:
    0 15px 50px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: var(--ink);
  cursor: progress;
}

.draw-button.is-busy .draw-button__label {
  color: var(--accent);
}

.draw-button.is-busy .draw-button__meta > span:first-child {
  color: var(--muted);
}

.draw-button.is-busy .draw-button__arrow {
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
  animation: pulseDot 1.4s ease-in-out infinite;
}

.draw-button.is-unavailable {
  filter: saturate(0.5);
}

.draw-caption {
  display: flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 8px;
  color: var(--muted-low);
  font-size: 9.5px;
  letter-spacing: 0.09em;
  line-height: 1.4;
}

.draw-caption b {
  color: var(--ink-soft);
  font-weight: 500;
}

.text-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 3px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
  transition: color 0.2s ease;
}

.text-action .icon {
  width: 12px;
  height: 12px;
}

.text-action:hover {
  color: var(--accent);
}

body.is-drawing .draw-caption {
  color: var(--accent);
}

body.is-drawing .draw-caption .text-action {
  display: none;
}

/* ---------- prize vault ---------- */

.prize-vault {
  display: grid;
  min-height: 76px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(18px, 2.5vw, 34px);
  border-top: 1px solid var(--line-soft);
  animation: riseIn 0.9s var(--ease) 0.38s both;
}

.vault-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
  padding-left: 3px;
  white-space: nowrap;
}

.vault-label span {
  color: var(--muted-low);
  font-family: var(--font-mono);
  font-size: 6.5px;
  letter-spacing: 0.18em;
}

.vault-label strong {
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.13em;
}

.prize-tray {
  --tray-fade-left: 0px;
  --tray-fade-right: 0px;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 11px 2px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 var(--tray-fade-left),
    #000 calc(100% - var(--tray-fade-right)),
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0,
    #000 var(--tray-fade-left),
    #000 calc(100% - var(--tray-fade-right)),
    transparent 100%
  );
}

.prize-tray::-webkit-scrollbar {
  display: none;
}

.prize-tray.has-left-fade {
  --tray-fade-left: 30px;
}

.prize-tray.has-right-fade {
  --tray-fade-right: 30px;
}

.prize-tray:focus-within {
  --tray-fade-left: 0px;
  --tray-fade-right: 0px;
}

.prize-chip {
  position: relative;
  display: flex;
  overflow: hidden;
  min-width: 154px;
  max-width: 210px;
  height: 50px;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 0 11px;
  background: rgba(7, 13, 9, 0.48);
  color: var(--muted);
  text-align: left;
  transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease, transform 0.25s var(--ease);
}

.prize-chip::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 2px;
  height: 0;
  border-radius: 0 2px 2px 0;
  background: var(--prize-accent, var(--accent));
  content: "";
  transform: translateY(-50%);
  transition: height 0.25s ease;
}

.prize-chip:hover {
  border-color: rgba(239, 243, 232, 0.2);
  background: rgba(13, 23, 16, 0.68);
  color: var(--ink-soft);
  transform: translateY(-1px);
}

.prize-chip.is-active {
  border-color: rgba(var(--accent-rgb), 0.34);
  background:
    linear-gradient(110deg, rgba(var(--accent-rgb), 0.11), rgba(8, 14, 10, 0.52) 68%);
  color: var(--ink);
}

.prize-chip.is-active::before {
  height: 22px;
}

.prize-chip.is-exhausted {
  opacity: 0.36;
}

.prize-chip__index {
  color: var(--muted-low);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.02em;
}

.prize-chip__dot {
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--prize-accent, var(--accent));
  box-shadow: 0 0 8px color-mix(in srgb, var(--prize-accent, var(--accent)) 56%, transparent);
}

.prize-chip__copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 1px;
}

.prize-chip__name {
  overflow: hidden;
  font-size: 10.5px;
  letter-spacing: 0.03em;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prize-chip__stock {
  color: var(--muted-low);
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: 0.08em;
  line-height: 1.3;
}

.prize-chip.is-active .prize-chip__stock {
  color: var(--accent);
}

.vault-manage {
  display: flex;
  align-items: center;
  gap: 5px;
  justify-self: end;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.1em;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.vault-manage .icon {
  width: 12px;
  height: 12px;
  transition: transform 0.25s var(--ease);
}

.vault-manage:hover {
  color: var(--accent);
}

.vault-manage:hover .icon {
  transform: translate(2px, -2px);
}

.prize-tray-empty {
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 9px;
  color: var(--muted-low);
  font-size: 10px;
  letter-spacing: 0.06em;
}

.prize-tray-empty button {
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.4);
  padding-bottom: 1px;
  color: var(--accent);
  font-size: 10px;
}

/* ---------- footer ---------- */

.page-footer {
  position: relative;
  z-index: 20;
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(22px, 4vw, 64px);
  color: var(--muted-low);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.1em;
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 7px;
}

.footer-dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(var(--accent-rgb), 0.65);
}

.footer-keys {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-keys span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

kbd {
  display: inline-grid;
  min-width: 22px;
  height: 18px;
  padding: 0 5px;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 400;
  line-height: 1;
}
