:root {
  color-scheme: dark;
  --ink: #edf7f0;
  --muted: #a9b8b0;
  --paper: #0f1412;
  --panel: #171d1a;
  --panel-soft: rgba(23, 29, 26, 0.84);
  --line: #34423a;
  --surface: #1d2721;
  --surface-strong: #26352c;
  --surface-muted: #121a16;
  --selected-bg: #dcefe5;
  --selected-ink: #102017;
  --mint: #59c69f;
  --leaf: #67d391;
  --coral: #ff7a6d;
  --gold: #e3b341;
  --sky: #62b6d1;
  --danger-ink: #ff9a91;
  --info-bg: #172b35;
  --info-line: #3b7a91;
  --info-ink: #8bd2eb;
  --danger-bg: #341c1b;
  --danger-line: #89413b;
  --delete-bg: #ff8a80;
  --delete-hover: #ffb0a8;
  --delete-ink: #1b0807;
  --button-bg: #edf7f0;
  --button-fg: #101713;
  --button-hover: #67d391;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.36);
  --focus-ring: rgba(89, 198, 159, 0.22);
  --inactive-tick: rgba(147, 164, 154, 0.24);
}

html[data-theme="light"] {
  color-scheme: light;
  --ink: #142018;
  --muted: #526057;
  --paper: #f7f8f4;
  --panel: #ffffff;
  --panel-soft: rgba(255, 255, 255, 0.78);
  --line: #cdd7ce;
  --surface: #eef6f1;
  --surface-strong: #dff0e7;
  --surface-muted: #f7fbf8;
  --selected-bg: #142018;
  --selected-ink: #ffffff;
  --mint: #3f9f7f;
  --leaf: #167a45;
  --coral: #e05d4f;
  --gold: #d09b2c;
  --sky: #317c99;
  --danger-ink: #a5372f;
  --info-bg: #e8f3fb;
  --info-line: #a9c9db;
  --info-ink: #236884;
  --danger-bg: #fdecea;
  --danger-line: #e5b1ab;
  --delete-bg: #a3261f;
  --delete-hover: #7f1d18;
  --delete-ink: #ffffff;
  --button-bg: #142018;
  --button-fg: #ffffff;
  --button-hover: #167a45;
  --shadow: 0 20px 60px rgba(20, 32, 24, 0.12);
  --focus-ring: rgba(63, 159, 127, 0.18);
  --inactive-tick: rgba(151, 164, 153, 0.28);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--mint) 16%, transparent), transparent 34rem),
    var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  background: var(--button-bg);
  color: var(--button-fg);
  cursor: pointer;
  font-weight: 750;
  min-height: 3rem;
  padding: 0.7rem 1rem;
}

button:hover {
  background: var(--button-hover);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.app-shell {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.25rem 0 3rem;
}

.settings-panel {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 0.85rem;
  margin: 0 auto 1.25rem;
  padding: 0.9rem;
  width: min(100%, 46rem);
}

.settings-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.settings-actions {
  align-items: center;
  display: flex;
  gap: 0.65rem;
}

.theme-switch {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  gap: 0.55rem;
  min-height: 2.45rem;
  padding: 0.35rem 0.45rem 0.35rem 0.65rem;
}

.theme-switch span:first-child {
  font-size: 0.82rem;
  font-weight: 850;
  min-width: 2.35rem;
}

.theme-switch input {
  inline-size: 1px;
  opacity: 0;
  position: absolute;
}

.theme-slider {
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-block;
  height: 1.35rem;
  position: relative;
  width: 2.45rem;
}

.theme-slider::after {
  background: var(--leaf);
  border-radius: 999px;
  content: "";
  height: 0.9rem;
  left: 0.2rem;
  position: absolute;
  top: 0.18rem;
  transition: transform 160ms ease;
  width: 0.9rem;
}

.theme-switch input:checked + .theme-slider::after {
  transform: translateX(1.05rem);
}

.settings-head h1 {
  font-size: 1.45rem;
  line-height: 1;
  margin: 0.25rem 0 0;
}

.mode-row,
.settings-row,
.compact-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.mode-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 0;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  padding: 0.2rem;
}

.mode-row label {
  align-items: center;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  font-weight: 800;
  min-height: 2.65rem;
  padding: 0.45rem 0.8rem;
  text-align: center;
}

.mode-row input {
  accent-color: var(--leaf);
  inline-size: 1px;
  opacity: 0;
  position: absolute;
}

.mode-row label:has(input:checked) {
  background: var(--selected-bg);
  color: var(--selected-ink);
}

.settings-row label {
  color: var(--muted);
  font-weight: 800;
}

.settings-hint {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

select,
textarea {
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 14 14' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.5 5.25 7 8.75l3.5-3.5' fill='none' stroke='%238a9a91' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 0.8rem center;
  background-repeat: no-repeat;
  background-size: 0.9rem;
  min-height: 2.6rem;
  padding: 0.45rem 2.2rem 0.45rem 0.65rem;
}

textarea {
  display: block;
  min-height: 8rem;
  padding: 0.65rem;
  resize: vertical;
  width: 100%;
}

.custom-editor {
  width: 100%;
}

.custom-editor summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 850;
  padding: 0.7rem 0.8rem;
}

.custom-editor[open] {
  padding-bottom: 0.75rem;
}

.custom-editor[open] > summary {
  margin-bottom: 0.75rem;
}

.custom-settings {
  display: grid;
  gap: 0.75rem;
}

.custom-list-row {
  flex-wrap: nowrap;
}

.custom-list-row select {
  flex: 1 1 auto;
  min-width: 8rem;
}

.custom-list-row button {
  flex: 0 0 auto;
  min-height: 2.35rem;
  padding: 0.45rem 0.6rem;
}

.button-icon {
  display: none;
}

.custom-editor input[type="text"],
.custom-editor input[type="search"] {
  flex: 1 1 12rem;
  line-height: 1.2;
  min-height: 2.6rem;
  height: 2.6rem;
  padding-block: 0.45rem;
}

.mini-note {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
  margin: 0.65rem 0;
}

.custom-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  margin-bottom: 0.85rem;
  max-height: 22rem;
  overflow: auto;
  padding-right: 0.25rem;
}

.custom-option {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 0.35rem;
  grid-template-columns: auto 2.4rem minmax(0, 1fr);
  min-height: 3.2rem;
  padding: 0.35rem 0.45rem;
}

.custom-option:hover {
  border-color: var(--mint);
}

.custom-option:has(input:checked) {
  background: var(--surface-strong);
  border-color: var(--mint);
}

.custom-option img {
  aspect-ratio: 1;
  object-fit: contain;
  width: 2.4rem;
}

.custom-option span {
  font-weight: 750;
  overflow-wrap: anywhere;
}

.quiz-panel {
  display: grid;
  justify-items: center;
}

.eyebrow {
  color: var(--leaf);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}

.quiz-grid {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.9rem;
  padding: clamp(0.85rem, 2.5vw, 1.15rem);
  width: min(100%, 46rem);
}

.quiz-card-head {
  align-items: center;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
}

.quiz-card-head > div {
  min-width: 0;
}

.compact-actions button,
.settings-row button,
.controls button,
.restart-button {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}

.answer-row button,
.controls button {
  height: 3.15rem;
  min-height: 3.15rem;
  padding: 0.45rem 0.85rem;
}

.compact-actions button:hover,
.settings-row button:hover,
.controls button:hover,
.restart-button:hover {
  background: var(--surface-strong);
}

.current-pokemon {
  min-width: 0;
}

.main-card {
  align-items: stretch;
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(11rem, 0.75fr) minmax(15rem, 1.25fr);
  min-width: 0;
}

.pokemon-side,
.answer-side {
  min-width: 0;
}

.pokemon-side {
  display: grid;
  gap: 0.55rem;
}

.pokemon-side img {
  aspect-ratio: 1;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: contain;
  padding: 0.35rem;
  width: min(100%, 13.25rem);
}

.answer-side {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  height: 13.25rem;
  justify-content: space-between;
  min-height: 13.25rem;
}

.answer-form,
.feedback,
.controls {
  flex: 0 0 auto;
}

.answer-form {
  display: grid;
  gap: 0.55rem;
}

.rank-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  margin: 0 0 0.2rem;
  text-transform: uppercase;
}

.quiz-card-head h2 {
  display: -webkit-box;
  font-size: clamp(1.08rem, 1.9vw, 1.35rem);
  line-height: 1.12;
  margin: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  width: 100%;
}

.variant-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  grid-column: 1 / -1;
  justify-content: flex-start;
  min-height: 0;
}

.variant-badges:empty {
  display: none;
}

.variant-badge {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: inline-flex;
  gap: 0.25rem;
  font-size: 0.82rem;
  font-weight: 850;
  min-height: 2rem;
  padding: 0.3rem 0.55rem;
}

.variant-badge strong {
  font-weight: 950;
}

.stage-down {
  background: var(--info-bg);
  border-color: var(--info-line);
  color: var(--info-ink);
}

.stage-up {
  background: var(--danger-bg);
  border-color: var(--danger-line);
  color: var(--danger-ink);
}

.stage-arrows {
  letter-spacing: 0;
}

.hint-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  min-height: 8.5rem;
  padding: 0.75rem;
  text-align: center;
}

.hint-row {
  display: grid;
  gap: 0.75rem;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hint-card[hidden] {
  display: none;
}

.hint-card img {
  aspect-ratio: 1;
  object-fit: contain;
  width: min(100%, 4.8rem);
}

.hint-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.hint-name {
  font-weight: 850;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.hint-speed {
  color: var(--leaf);
  font-size: 1.15rem;
  font-weight: 900;
}

.answer-form label {
  color: var(--muted);
  font-weight: 750;
}

.answer-row {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(0, 1fr) auto;
}

input:not([type="radio"]):not([type="checkbox"]) {
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  height: 3.15rem;
  min-height: 3.15rem;
  padding: 0.45rem 0.7rem;
  width: 100%;
}

input:not([type="radio"]):not([type="checkbox"]):focus,
select:focus,
textarea:focus {
  border-color: var(--mint);
  outline: 3px solid var(--focus-ring);
}

.feedback {
  align-content: center;
  align-items: center;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  --feedback-chip-bg: var(--surface);
  --feedback-chip-border: var(--line);
  --feedback-chip-result-bg: var(--surface-strong);
  --feedback-chip-result-border: var(--line);
  --feedback-operator-ink: var(--muted);
  display: flex;
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.25;
  height: 3.15rem;
  margin: 0;
  min-height: 3.15rem;
  overflow: hidden;
  padding: 0.45rem 0.7rem;
  white-space: nowrap;
}

.feedback strong {
  font-weight: 850;
}

.feedback-formula {
  align-items: center;
  display: inline-flex;
  flex: 1 1 auto;
  gap: 0.32rem;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.feedback-chip {
  align-items: center;
  background: var(--feedback-chip-bg);
  border: 1px solid var(--feedback-chip-border);
  border-radius: 7px;
  color: var(--ink);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 400;
  justify-content: center;
  min-height: 1.7rem;
  padding: 0.18rem 0.48rem;
}

.feedback-chip-base {
  color: var(--ink);
  font-weight: 400;
}

.feedback-chip-result {
  background: var(--feedback-chip-result-bg);
  border-color: var(--feedback-chip-result-border);
  color: var(--ink);
  font-weight: 650;
  min-width: 2.35rem;
}

.feedback-operator {
  color: var(--feedback-operator-ink);
  flex: 0 0 auto;
  font-weight: 400;
}

.feedback-icon {
  fill: none;
  flex: 0 0 auto;
  height: 1.2rem;
  margin-left: auto;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 1.2rem;
}

.feedback.is-correct {
  background: color-mix(in srgb, var(--leaf) 12%, var(--surface-muted));
  border-color: var(--leaf);
  color: var(--leaf);
  --feedback-chip-bg: color-mix(in srgb, var(--leaf) 10%, var(--surface));
  --feedback-chip-border: color-mix(in srgb, var(--leaf) 45%, var(--line));
  --feedback-chip-result-bg: color-mix(in srgb, var(--leaf) 22%, var(--surface));
  --feedback-chip-result-border: color-mix(in srgb, var(--leaf) 70%, var(--line));
  --feedback-operator-ink: color-mix(in srgb, var(--leaf) 72%, var(--muted));
}

.feedback.is-wrong {
  background: color-mix(in srgb, var(--coral) 10%, var(--surface-muted));
  border-color: var(--coral);
  color: var(--danger-ink);
  --feedback-chip-bg: color-mix(in srgb, var(--coral) 9%, var(--surface));
  --feedback-chip-border: color-mix(in srgb, var(--coral) 42%, var(--line));
  --feedback-chip-result-bg: color-mix(in srgb, var(--coral) 20%, var(--surface));
  --feedback-chip-result-border: color-mix(in srgb, var(--coral) 68%, var(--line));
  --feedback-operator-ink: color-mix(in srgb, var(--danger-ink) 72%, var(--muted));
}

.quiz-empty-state,
.session-complete-state {
  align-content: center;
  background: var(--surface-muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  font-weight: 800;
  min-height: 16rem;
  line-height: 1.45;
  padding: 1rem;
  text-align: center;
}

.session-complete-state {
  border-style: solid;
  justify-items: center;
}

.session-summary {
  color: var(--ink);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 900;
  line-height: 1.45;
  margin: 0;
}

.review-inline-button {
  margin-top: 0.65rem;
  min-height: 2.6rem;
}

.controls {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(3, 1fr);
}

.option-toggles {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.55rem;
}

.toggle-row {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  flex: 0 0 auto;
  display: inline-flex;
  gap: 0.35rem;
  justify-content: center;
  justify-self: start;
  min-height: 2.25rem;
  min-width: 0;
  padding: 0.35rem 0.75rem;
}

.restart-button {
  background: var(--danger-bg);
  border-color: var(--danger-line);
  color: var(--danger-ink);
  min-height: 2.6rem;
  padding: 0.45rem 0.85rem;
}

.restart-button:hover {
  background: color-mix(in srgb, var(--coral) 18%, var(--danger-bg));
}

.settings-row .delete-button {
  background: var(--delete-bg);
  border-color: var(--delete-bg);
  color: var(--delete-ink);
}

.settings-row .delete-button:hover {
  background: var(--delete-hover);
  border-color: var(--delete-hover);
}

.toggle-row input {
  inline-size: 1px;
  opacity: 0;
  position: absolute;
}

.toggle-row span {
  font-size: 0.95rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toggle-row:has(input:checked) {
  background: color-mix(in srgb, var(--leaf) 18%, var(--surface));
  border-color: var(--leaf);
  color: var(--ink);
}

.scoreboard {
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
}

.scoreboard div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 4.6rem;
  padding: 0.35rem 0.5rem;
}

.scoreboard dt {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
}

.scoreboard dd {
  font-size: 0.95rem;
  font-weight: 850;
  margin: 0.05rem 0 0;
}

.tiers-section {
  margin: 0 auto;
  padding-top: 1.5rem;
  width: min(100%, 46rem);
}

.tiers-toggle {
  align-items: center;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  list-style: none;
  margin-bottom: 1rem;
  padding: 0.9rem;
  user-select: none;
}

.tiers-toggle::-webkit-details-marker {
  display: none;
}

.tiers-toggle h2 {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1;
  margin: 0.2rem 0 0;
}

.tiers-switch {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: inline-flex;
  gap: 0.55rem;
  min-height: 2.45rem;
  padding: 0.35rem 0.45rem 0.35rem 0.65rem;
}

.tiers-switch #tiers-toggle-label {
  font-size: 0.82rem;
  font-weight: 850;
  min-width: 2.35rem;
}

.tiers-section[open] .tiers-switch .theme-slider::after {
  transform: translateX(1.05rem);
}

.tiers-list {
  display: grid;
  gap: 0.7rem;
}

.tier-row {
  align-items: center;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 4.2rem minmax(0, 1fr) minmax(9rem, 14rem);
  min-height: 4.4rem;
  padding: 0.65rem;
}

.tier-speed {
  color: var(--leaf);
  font-size: 1.6rem;
  font-weight: 900;
}

.tier-names {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tier-pill {
  align-items: center;
  background: var(--surface);
  border-radius: 8px;
  color: var(--ink);
  display: inline-flex;
  gap: 0.35rem;
  font-weight: 750;
  min-height: 2rem;
  padding: 0.35rem 0.55rem;
}

.tier-pill img {
  aspect-ratio: 1;
  object-fit: contain;
  width: 1.8rem;
}

.tier-bar {
  display: grid;
  gap: 0.18rem;
  grid-template-columns: repeat(10, 1fr);
  height: 0.8rem;
}

.tier-bar span {
  background: var(--inactive-tick);
  border-radius: 999px;
  display: block;
  height: 100%;
}

.tier-bar span.is-active {
  background: var(--tick-color);
}

.site-footer {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.55;
  margin: 2rem auto 0;
  max-width: 46rem;
  opacity: 0.78;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--muted);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.site-footer a:hover {
  color: var(--leaf);
}

@media (max-width: 780px) {
  .app-shell {
    width: min(100% - 1rem, 38rem);
    padding-top: 1rem;
  }

  .mode-row label {
    font-size: 0.86rem;
    min-height: 2.2rem;
    padding: 0.3rem 0.35rem;
    white-space: nowrap;
  }

  .settings-row {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-actions {
    flex: 0 0 auto;
  }

  .theme-switch {
    flex: 0 0 auto;
  }

  .settings-row select,
  .settings-row button {
    width: 100%;
  }

  .custom-list-row {
    display: grid;
    gap: 0.4rem;
    grid-template-columns: minmax(0, 1fr) repeat(4, 2.6rem);
  }

  .custom-list-row label {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }

  .custom-list-row select {
    grid-column: 1;
    min-width: 0;
  }

  .custom-list-row button {
    align-items: center;
    aspect-ratio: 1;
    display: inline-flex;
    font-size: 0.68rem;
    height: 2.6rem;
    justify-content: center;
    min-height: 2.6rem;
    padding: 0;
    width: 2.6rem;
  }

  .custom-list-row .button-label {
    display: none;
  }

  .custom-list-row .button-icon {
    display: inline-block;
    fill: none;
    height: 1.2rem;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 1.2rem;
  }

  .custom-editor input[type="text"],
  .custom-editor input[type="search"] {
    flex: 0 0 auto;
    line-height: 1.2;
    min-height: 2.6rem;
    height: 2.6rem;
    max-height: 2.6rem;
    padding: 0.45rem 0.8rem;
  }

  .main-card {
    grid-template-columns: 1fr;
  }

  .quiz-card-head {
    gap: 0.5rem;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .scoreboard {
    gap: 0.25rem;
    grid-template-columns: repeat(3, auto);
  }

  .scoreboard div {
    min-width: 2.65rem;
    padding: 0.25rem 0.3rem;
  }

  .scoreboard dt {
    font-size: 0.5rem;
  }

  .scoreboard dd {
    font-size: 0.76rem;
    margin-top: 0;
  }

  .pokemon-side img {
    justify-self: center;
    width: min(100%, 12rem);
  }

  .hint-row {
    gap: 0.5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hint-card {
    min-height: 7.25rem;
    padding: 0.55rem;
  }

  .hint-card img {
    width: min(100%, 3.8rem);
  }

  .hint-name {
    font-size: 0.82rem;
  }

  .hint-speed {
    font-size: 1rem;
  }

  .answer-side {
    gap: 0.55rem;
  }

  .option-toggles {
    gap: 0.7rem;
  }

  .toggle-row {
    gap: 0;
    padding: 0.3rem 0.65rem;
  }

  .toggle-row span {
    font-size: 0.9rem;
  }

  .controls {
    grid-template-columns: repeat(3, 1fr);
  }

  .tier-row {
    grid-template-columns: 3.5rem minmax(0, 1fr);
  }

  .tier-bar {
    grid-column: 1 / -1;
  }
}
