:root {
  color-scheme: light dark;
  font-family: "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  --gap: 1rem;
  --primary: #4466ff;
  --surface: rgba(255, 255, 255, 0.65);
  --surface-dark: rgba(24, 26, 27, 0.65);
  --border: rgba(0, 0, 0, 0.1);
  --border-dark: rgba(255, 255, 255, 0.1);
}

body {
  margin: 0;
  min-height: 100vh;
  color: #111;
  display: flex;
  flex-direction: column;
  background-color: #05070a;
  background-image: url("assets/battle-start-bg.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}

body::after {
  content: none;
}

body, input, button {
  font-family: inherit;
}

@media (prefers-color-scheme: dark) {
  body {
    color: #f0f0f0;
  }
}

.hero {
  padding: 2rem 0 1rem;
  text-align: center;
  color: #fff;
}

.hero__logo {
  width: min(420px, 70vw);
  max-width: 100%;
  height: auto;
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.45));
}

.hero__banner {
  display: block;
  width: 100%;
  margin: 0 auto 1.5rem;
  min-height: clamp(60px, 7vw, 110px);
  background-image: url("assets/battle-start-banner3.png");
  background-repeat: repeat-x;
  background-size: clamp(320px, 45vw, 760px) 100%;
  background-position: center;
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.35));
}

.hero h1 {
  margin-bottom: 0.5rem;
  font-size: clamp(2rem, 3vw + 1rem, 3rem);
}

.layout {
  flex: 1;
  display: grid;
  gap: var(--gap);
  padding: 0 1.5rem 2rem;
  align-items: start;
}

.tab-controls {
  display: none;
}

.tab-button {
  border: 3px solid #ffffff;
  background: #0b1019;
  color: #f7f9ff;
  font-weight: 700;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.tab-button + .tab-button {
  margin-left: 0.75rem;
}

.tab-button.is-active {
  background: #ffffff;
  color: #0c121d;
  border-color: #ffffff;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
  transform: translateY(-2px);
}

@media (prefers-color-scheme: dark) {
  .tab-button {
    background: #0b1019;
    color: #f7f9ff;
    border-color: #ffffff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  }

  .tab-button.is-active {
    background: #ffffff;
    color: #0c121d;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.3);
  }
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

@media (min-width: 1200px) {
  .layout {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .tab-controls {
    display: none;
  }

  .tab-panel {
    display: block !important;
  }
}

@media (max-width: 1199px) {
  .tab-controls {
    display: flex;
    justify-content: center;
  padding-right: 0.95rem;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1.5rem 1.25rem;
  }

  .layout {
    gap: 1rem;
  }

  .tab-panel {
    min-height: 0;
  }
}

section {
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  color: inherit;
}

.section-shell {
  background: #ffffff;
  border-radius: 1.25rem;
  padding: 1.5rem 1.5rem 1.75rem;
  box-shadow: 0 18px 0 rgba(0, 0, 0, 0.65), 0 28px 75px rgba(5, 7, 10, 0.8);
  color: #0c121d;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
}

.section-shell__header h2 {
  margin: 0;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: baseline;
  gap: 0.05rem;
}

.section-shell__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-shell__header::before {
  content: "";
  width: 1.35rem;
  height: 1.35rem;
  background:
    linear-gradient(#0c121d, #0c121d) center/60% 60% no-repeat,
    #ffffff;
  border: 2px solid #0c121d;
  display: inline-block;
  box-sizing: border-box;
}

.section-shell__header h2 span[data-i18n],
.section-shell__suffix {
  white-space: nowrap;
}

.section-shell__suffix {
  font-size: 0.9em;
  letter-spacing: 0.2em;
}

.section-shell__markers {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.section-shell__marker {
  width: 1.35rem;
  height: 1.35rem;
  border: 2px solid #0c121d;
  background: #ffffff;
  display: inline-block;
  box-sizing: border-box;
}

.section-shell__marker--line {
  background:
    linear-gradient(#0c121d, #0c121d) center/70% 2px no-repeat,
    #ffffff;
}

.section-shell__marker--double {
  background:
    linear-gradient(#0c121d, #0c121d),
    linear-gradient(#0c121d, #0c121d),
    #ffffff;
  background-size: 2px 70%, 2px 70%, 100% 100%;
  background-position: 0.3rem center, calc(100% - 0.3rem) center, center;
  background-repeat: no-repeat;
}

.section-shell__inner {
  background: linear-gradient(180deg, #141a24 0%, #0b0f17 60%, #080b12 100%);
  border-radius: 1rem;
  padding: 1.5rem;
  color: #f7f9ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
}

.section-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.section-toolbar--deck {
  justify-content: flex-end;
}

.section-toolbar--deck .button--ghost {
  color: #0c121d;
  background: #ffffff;
  border: 3px solid #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  padding: 0.45rem 1rem;
}

.section-toolbar--deck .button--ghost:hover:not(:disabled) {
  background: #f5f8ff;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.3);
}

.section-heading__controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search__label {
  font-weight: 600;
}

.search input {
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  padding: 0.4rem 0.9rem;
  background: rgba(12, 16, 22, 0.95);
  color: rgba(245, 249, 255, 0.95);
  box-shadow: 0 8px 18px rgba(5, 7, 10, 0.55);
}

.language {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.language__label {
  font-weight: 600;
}

.language select {
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  padding: 0.35rem 0.8rem;
  background: rgba(12, 16, 22, 0.95);
  color: rgba(245, 249, 255, 0.95);
  box-shadow: 0 8px 18px rgba(5, 7, 10, 0.55);
}

.summary {
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: rgba(245, 249, 255, 0.8);
}

.filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.filter-group__label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 249, 255, 0.65);
}

.filter-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  background: rgba(12, 16, 22, 0.85);
  color: rgba(245, 249, 255, 0.9);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.2s ease, background 0.2s ease;
  box-shadow: 0 8px 18px rgba(5, 7, 10, 0.45);
}

.filter-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(5, 7, 10, 0.55);
}

.filter-chip:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.filter-chip--active {
  border-color: #ffffff;
  box-shadow: 0 12px 26px rgba(5, 7, 10, 0.6);
}


.filter-chip--color {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 140px;
  background: #ffffff;
  border-color: #ffffff;
  color: transparent;
  font-size: 0;
  position: relative;
}

.filter-chip__label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  max-width: 100%;
  text-align: center;
  padding: 0.18rem 0.85rem 0.18rem 0.8rem;
  border-radius: 999px;
  border: 2px solid #05070a;
  background: var(--chip-pill-color, rgba(12, 16, 22, 0.85));
  color: var(--chip-pill-text, #f7f9ff);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.filter-chip__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #05070a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  background: var(--chip-dot-color, #d1d5db);
  margin-left: 0.2rem;
}

.filter-chip--red {
  --chip-dot-color: #ff6b6b;
  --chip-pill-color: #ff6b6b;
  --chip-pill-text: #0b1019;
}

.filter-chip--blue {
  --chip-dot-color: #5ab4ff;
  --chip-pill-color: #5ab4ff;
  --chip-pill-text: #0b1019;
}

.filter-chip--green {
  --chip-dot-color: #58f29d;
  --chip-pill-color: #58f29d;
  --chip-pill-text: #0b1019;
}

.filter-chip--rainbow {
  --chip-dot-color: linear-gradient(135deg, #ff6b6b, #5ab4ff, #58f29d);
  --chip-pill-color: linear-gradient(135deg, #ff6b6b, #5ab4ff, #58f29d);
  --chip-pill-text: #0b1019;
}

.filter-chip--yellow {
  --chip-dot-color: #ffd34d;
  --chip-pill-color: #ffd34d;
  --chip-pill-text: #0b1019;
}

.filter-chip--white {
  --chip-dot-color: #f8faff;
  --chip-pill-color: #f8faff;
  --chip-pill-text: #0b1019;
}

.filter-chip--color:not(.filter-chip--active) {
  border-color: #ffffff;
}

.filter-chip--color:not(.filter-chip--active) .filter-chip__dot {
  background: #0b1019;
}

.filter-chip--color:not(.filter-chip--active) .filter-chip__label {
  border-color: #0b1019;
}

.filter-chip--set,
.filter-chip--cost,
.filter-chip--tier {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 0.2rem 0.45rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: #ffffff;
  border-color: #ffffff;
  color: #0c121d;
}

.filter-chip--set:not(.filter-chip--active),
.filter-chip--cost:not(.filter-chip--active),
.filter-chip--tier:not(.filter-chip--active) {
  background: #0b1019;
  color: #f7f9ff;
  border-color: #ffffff;
}

.driver-list,
.deck-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.deck-slot {
  position: relative;
  background: linear-gradient(180deg, rgba(29, 38, 51, 0.35) 0%, rgba(17, 23, 34, 0.35) 100%);
  border-radius: 1rem;
  padding: 0.95rem 1.15rem;
  border: 3px solid #ffffff;
  box-shadow: 0 18px 26px rgba(5, 7, 10, 0.45);
  color: rgba(247, 249, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 136px;
  text-align: center;
}

.deck-slot--empty {
  background: #05070a;
  background-image: url("images/no-data.png");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  color: rgba(255, 255, 255, 0.6);
}

.deck-slot__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.deck-slot--target,
.driver--drop-target {
  box-shadow: 0 0 0 3px rgba(255, 213, 71, 0.25), 0 18px 26px rgba(5, 7, 10, 0.55);
}

.deck-slot--target {
  border-color: #ffd547;
}

.driver--dragging {
  opacity: 0.5;
  pointer-events: none;
}

.driver--in-deck {
  cursor: grab;
}

.driver--in-deck:active {
  cursor: grabbing;
}

.driver--drag-image {
  pointer-events: none;
  margin: 0;
  list-style: none;
  opacity: 1;
  display: block;
}

.deck-export-preview {
  background: transparent;
  padding: 0;
}

.deck-export-preview .deck-list {
  margin-bottom: 1rem;
}


.driver {
  position: relative;
  background: linear-gradient(180deg, #1d2633 0%, #111722 100%);
  border-radius: 1rem;
  padding: 0.95rem 1.15rem;
  border: 3px solid #ffffff;
  box-shadow: 0 18px 26px rgba(5, 7, 10, 0.65);
  color: #f8faff;
  overflow: hidden;
}

.driver.driver--drop-target {
  border-color: #ffd547;
}

.driver article {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto auto;
  grid-template-areas:
    "header header"
    "art effect"
    "footer footer";
  gap: 0.85rem 1rem;
  align-items: center;
  z-index: 1;
}

.driver__header {
  grid-area: header;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.driver__art {
  grid-area: art;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 0.75rem;
  background: rgba(8, 11, 17, 0.65);
  border: 3px solid #ffffff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.55);
  justify-self: start;
  align-self: start;
}

.driver__effect-wrap {
  grid-area: effect;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  align-self: stretch;
}

.driver__overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: none;
}

.driver__name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.4rem 1rem;
  background: #ffffff;
  color: #0c121d;
  border-radius: 0.9rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.driver__title {
  flex: 1;
  color: #0c121d;
}

.driver__number {
  display: none;
}

.driver__code {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  padding: 0.15rem 0.75rem;
  border-radius: 0.7rem;
  border: none;
  background: #0b1019;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.45);
  margin-left: auto;
}

.driver__effect {
  margin: 0;
  color: rgba(248, 250, 255, 0.92);
  line-height: 1.4;
  flex: 1;
}

.driver__footer {
  grid-area: footer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.driver__stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.driver__footer .driver__action {
  margin-left: auto;
}

.driver__stat {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  color: #0c121d;
  border-radius: 0.75rem;
  border: none;
  padding: 0.2rem 0.2rem 0.2rem 1rem;
}

.driver__stat-label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.driver__stat-value {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.02rem 0.7rem;
  border-radius: 999px;
  border: none;
  background: rgba(0, 0, 0, 0.85);
  color: #ffd547;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.driver__stat--color .driver__stat-value {
  display: none;
}

.driver__color-text {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0c121d;
}

.driver__color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #05070a;
  background: #d1d5db;
}

.driver__stat--color {
  gap: 0.65rem;
  align-items: end;
}

.driver--red .driver__color-dot {
  background: #ff6b6b;
}

.driver--blue .driver__color-dot {
  background: #5ab4ff;
}

.driver--green .driver__color-dot {
  background: #58f29d;
}

.driver--yellow .driver__color-dot {
  background: #ffd34d;
}

.driver--white .driver__color-dot {
  background: #f6f8fc;
}

.driver--rainbow .driver__color-dot {
  background: linear-gradient(135deg, #ff6b6b, #5ab4ff, #58f29d);
}

.driver__stat.is-hidden {
  display: none;
}

@media (max-width: 640px) {
  .totals__meta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .driver article {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "header header"
      "art effect"
      "footer footer";
    gap: 0.6rem 0.75rem;
  }

  .driver__header {
    align-items: flex-start;
    gap: 0.3rem;
  }

  .driver {
    padding: 0.9rem 1rem;
  }

  .driver__name {
    padding: 0.3rem 0.75rem;
    font-size: 0.95rem;
  }

  .driver__title {
    font-size: 0.95rem;
  }

  .driver__footer {
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
  }

  .driver__stats {
    flex: 1 1 240px;
    min-width: min(100%, 240px);
    flex-wrap: wrap;
    gap: 0.45rem;
  }

  .driver__stat {
    padding: 0.25rem 0.65rem;
  }

  .driver__stat-label {
    font-size: 0.58rem;
  }

  .driver__stat-value {
    padding: 0.12rem 0.55rem;
    font-size: 0.72rem;
  }

  .driver__color-text {
    font-size: 0.66rem;
  }

  .button {
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
  }

  .driver__action {
    margin-left: auto;
  }
}

.driver--empty {
  background: rgba(10, 14, 21, 0.8);
  border: 3px dashed rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.6);
}


.button {
  cursor: pointer;
  border: 3px solid #ffffff;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #10141d;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.driver__action {
  flex-shrink: 0;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.3);
  background: #f5f8ff;
}


.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
}

.button--ghost {
  background: transparent;
  color: #f7f9ff;
  border: 3px solid rgba(255, 255, 255, 0.45);
  box-shadow: none;
}

.button--ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

@media (prefers-color-scheme: dark) {
  .button {
    color: #10141d;
  }
}

.totals {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
  font-weight: 600;
  width: 100%;
}

.totals__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  width: 100%;
}

.totals__meta dd {
  margin: 0;
}

.totals dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
  margin: 0;
}

.totals dd {
  margin: 0.2rem 0 0;
  font-size: 1.1rem;
}

.charge-total {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
}

.charge-total dd {
  display: block;
  width: 100%;
  margin: 0;
}

.charge-meter {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  padding: 0.2rem;
  background: #05070a;
  border-radius: 999px;
  border: 3px solid #0f1520;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15), 0 12px 30px rgba(5, 7, 10, 0.55);
}

.charge-meter__shell {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.1rem;
  background: #ffffff;
  border-radius: 999px;
}

.charge-meter__track {
  position: relative;
  flex: 1;
  height: 18px;
  border-radius: 999px;
  background: #05070a;
  overflow: hidden;
  border: 2px solid rgba(12, 18, 29, 0.9);
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.35);
}

.charge-meter__fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, #ffd547 0%, #ffb24d 40%, #ff6b6b 100%);
  box-shadow: 0 0 22px rgba(255, 149, 58, 0.45);
  transition: width 0.25s ease-out;
}

.charge-meter__max {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 1.15rem;
  border-radius: 999px;
  border: none;
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: #0c121d;
}

.charge-meter__current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 1.35rem;
  border-radius: 999px;
  color: #ffd547;
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  box-shadow: none;
}

@media (max-width: 640px) {
  .charge-meter {
    gap: 0.3rem;
    padding: 0.2rem 0.25rem;
  }

  .charge-meter__shell {
    gap: 0.35rem;
    padding: 0.28rem 0.45rem 0.28rem 0.38rem;
  }

  .charge-meter__track {
    height: 14px;
  }

  .charge-meter__max {
    min-width: 0.9rem;
    padding: 0.04rem 0.12rem;
    font-size: 0.42rem;
  }

  .charge-meter__current {
    min-width: 1.2rem;
    padding: 0.05rem 0.18rem;
    font-size: 0.5rem;
  }
}

.feedback {
  display: none;
  font-size: 0.9rem;
}

.feedback:not(:empty) {
  display: block;
}

.feedback-modal[hidden] {
  display: none;
}

.feedback-modal {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 13, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 999;
}

.feedback-modal__panel {
  width: min(540px, 95vw);
  background: rgba(12, 18, 29, 0.86);
  border-radius: 1.75rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
  padding: 1.4rem 1.6rem;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "icon header"
    "icon content";
  gap: 0.8rem 0;
  position: relative;
}

.feedback-modal__panel:before {
  content: "";
  position: absolute;
  inset: 0.4rem;
  border: 3px solid #ffffff;
  border-radius: 1.3rem;
  pointer-events: none;
}

.feedback-modal__header {
  grid-area: header;
  display: flex;
}

.feedback-modal__icon-panel {
  grid-area: icon;
  width: 3.3rem;
  height: 3.3rem;
  border-radius: 0.7rem 0 0.7rem 0.7rem;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.feedback-modal__icon-panel::after {
  content: "";
  position: absolute;
  inset: 0.4rem;
  border: 2px solid #0c121d;
  border-radius: 0.65rem;
}

.feedback-modal__icon {
  font-size: 1.6rem;
  font-weight: 900;
  color: #0c121d;
  position: relative;
  z-index: 1;
}

.feedback-modal__label-panel {
  grid-area: header;
  flex: 1 1 auto;
  border-radius: 0 999px 999px 0;
  background: #ffffff;
  padding: 0.25rem 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.feedback-modal__label {
  font-family: "Orbitron", "Segoe UI", sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  color: #0c121d;
}

.feedback-modal__content {
  grid-area: content;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  color: #f7f9ff;
  text-align: center;
}

.feedback-modal__lead {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.feedback-modal__message {
  margin: 0;
  font-size: 1rem;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .section-toolbar,
  .section-heading__controls {
    justify-content: flex-start;
  }

  .section-toolbar--deck {
    justify-content: flex-end;
  }

  .layout {
    grid-template-columns: 1fr;
  }
}
