.forge-preview {
  position: relative;
  width: min(600px, 100%);
  height: 190px;
  margin-top: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(rgba(31, 37, 34, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 37, 34, 0.035) 1px, transparent 1px),
    rgba(255, 255, 255, 0.45);
  background-size: 24px 24px;
  box-shadow: 0 20px 46px rgba(31, 37, 34, 0.09);
}

.preview-grid {
  width: 76%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  margin: 24px auto 0;
}

.preview-grid i {
  height: 25px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: var(--lime);
  box-shadow: inset 0 -5px rgba(31, 37, 34, 0.12);
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 900;
}

.preview-grid .preview-brick--armor {
  background: var(--blue);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.38);
}

.preview-grid .preview-brick--blast {
  background: var(--coral);
}

.preview-grid .preview-brick--crystal {
  background: white;
}

.preview-paddle {
  position: absolute;
  bottom: 22px;
  left: 50%;
  width: 112px;
  height: 15px;
  border-radius: 999px;
  background: var(--ink);
  transform: translateX(-50%);
}

.preview-paddle::after {
  content: "";
  position: absolute;
  inset: 4px 16px;
  border-radius: 999px;
  background: var(--lime);
}

.preview-ball {
  position: absolute;
  width: 17px;
  height: 17px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  background: white;
}

.preview-ball--one {
  right: 37%;
  bottom: 48px;
  box-shadow: -16px -19px 0 -6px rgba(73, 103, 214, 0.32), -29px -37px 0 -7px rgba(73, 103, 214, 0.16);
}

.preview-ball--two {
  left: 31%;
  bottom: 76px;
  transform: scale(0.72);
}

.preview-drop {
  position: absolute;
  right: 13%;
  top: 92px;
  min-width: 42px;
  padding: 7px 9px;
  border: 2px solid var(--ink);
  border-radius: 11px;
  background: var(--blue);
  color: white;
  font-size: 0.68rem;
  font-weight: 900;
  text-align: center;
  transform: rotate(7deg);
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 15px;
  align-items: stretch;
}

.board-panel {
  min-width: 0;
}

.canvas-frame {
  position: relative;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  box-shadow: var(--shadow-soft);
}

#playfield {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 18 / 17;
  touch-action: none;
}

.launch-button {
  position: absolute;
  left: 50%;
  bottom: 22px;
  min-height: 47px;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 7px 8px 7px 18px;
  border: 2px solid var(--ink);
  border-radius: 15px;
  color: var(--ink);
  background: var(--lime);
  box-shadow: 0 10px 24px rgba(31, 37, 34, 0.17);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.launch-button:hover {
  transform: translateX(-50%) translateY(-2px);
}

.launch-button kbd {
  padding: 7px 9px;
  border-radius: 9px;
  color: white;
  background: var(--ink);
  box-shadow: none;
  font-size: 0.61rem;
}

.control-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.score-grid > div {
  min-height: 65px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.score-grid span,
.forge-card__heading span,
.power-card > span {
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 850;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.score-grid strong {
  margin-top: 2px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.32rem;
  font-weight: 600;
}

#lives-value {
  color: var(--coral);
  font-family: inherit;
  font-size: 0.84rem;
  letter-spacing: 0.1em;
}

.forge-card,
.power-card,
.block-guide {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
}

.forge-card__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.forge-card__heading > div {
  display: flex;
  flex-direction: column;
}

.forge-card__heading strong {
  margin-top: 2px;
  font-size: 0.83rem;
}

.forge-rank {
  padding: 5px 7px;
  border-radius: 8px;
  color: var(--ink) !important;
  background: var(--lime);
}

.forge-progress {
  height: 10px;
  margin-top: 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--color-cell);
}

.forge-progress .progress-bar {
  width: 0;
  border-radius: inherit;
  background: var(--blue);
  transition: width 180ms ease;
}

.upgrade-list {
  min-height: 27px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.upgrade-list span {
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--canvas);
  font-size: 0.58rem;
  font-weight: 800;
}

.upgrade-list .empty-upgrades {
  color: var(--muted);
  font-weight: 650;
}

.power-slots {
  min-height: 31px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.power-slot {
  padding: 6px 8px;
  border-radius: 9px;
  color: white;
  background: var(--blue);
  font-size: 0.6rem;
  font-weight: 850;
  text-transform: uppercase;
}

.power-slot--shield {
  color: var(--ink);
  background: var(--lime);
}

.power-slot--pierce {
  color: var(--ink);
  background: var(--coral);
}

.power-slot--empty {
  color: var(--muted);
  background: var(--color-cell);
  text-transform: none;
}

.block-guide {
  padding: 0;
  overflow: hidden;
}

.block-guide summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 850;
  list-style: none;
  text-transform: uppercase;
}

.block-guide summary::after {
  content: "+";
  color: var(--blue);
  font-size: 1.1rem;
}

.block-guide[open] summary::after {
  content: "−";
}

.block-guide summary::-webkit-details-marker {
  display: none;
}

.block-guide > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 5px;
  padding: 0 13px 13px;
}

.block-guide span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.58rem;
}

.guide-brick {
  width: 24px;
  height: 13px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 4px;
  color: white;
  background: var(--lime);
  font-size: 0.45rem;
  font-style: normal;
  font-weight: 900;
}

.guide-brick--armor {
  background: var(--blue);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.guide-brick--blast {
  color: var(--ink);
  background: var(--coral);
}

.guide-brick--crystal {
  color: var(--blue);
  background: white;
}

.guide-brick--steel {
  background: var(--ink);
}

.guide-brick--shift {
  color: var(--ink);
  background: color-mix(in srgb, var(--lime) 52%, white);
}

.key-hint {
  margin: auto 0 0;
  color: var(--muted);
  font-size: 0.59rem;
  text-align: center;
}

.key-hint kbd {
  min-width: 23px;
  display: inline-grid;
  place-items: center;
  margin-right: 2px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: none;
  font-size: 0.58rem;
}

.game-dialog--upgrade {
  padding: 30px;
}

.upgrade-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
}

.upgrade-option {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 18px;
  border: 2px solid var(--line);
  border-radius: 19px;
  color: var(--ink);
  background: var(--canvas);
  text-align: left;
  transition: border-color 150ms ease, transform 150ms ease;
}

.upgrade-option:hover {
  border-color: var(--blue);
  transform: translateY(-3px);
}

.upgrade-option__icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 13px;
  background: var(--lime);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-weight: 800;
}

.upgrade-option:nth-child(2) .upgrade-option__icon {
  color: white;
  background: var(--blue);
}

.upgrade-option:nth-child(3) .upgrade-option__icon {
  background: var(--coral);
}

.upgrade-option small {
  color: var(--blue);
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.upgrade-option strong {
  margin-top: 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
}

.upgrade-option p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}
