:root {
  color-scheme: light;
  --ink: #1e2440;
  --muted: #5d6685;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: #ffffff;
  --line: rgba(54, 71, 104, 0.17);
  --focus: #2667ff;
  --good: #1c9f78;
  --sun: #ffbe3d;
  --berry: #ff5f7e;
  --sky: #3aa8ff;
  --grass: #70c95e;
  --shadow: 0 18px 48px rgba(40, 58, 87, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  font-family: "Avenir Next", "Trebuchet MS", "Gill Sans", Arial, sans-serif;
  color: var(--ink);
  background: #bfe8ff;
}

button {
  font: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.game-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 520px;
  overflow: hidden;
}

#cityCanvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.hud {
  position: absolute;
  z-index: 2;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hud-tools {
  display: grid;
  grid-template-columns: clamp(240px, 22vw, 270px) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 16px;
  row-gap: 8px;
  top: 12px;
  right: 12px;
  left: 12px;
  width: auto;
  padding: 12px;
  border-radius: 8px;
}

.brand {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin-bottom: 0;
}

.brand > div {
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background:
    linear-gradient(135deg, transparent 48%, rgba(255, 255, 255, 0.75) 49% 55%, transparent 56%),
    conic-gradient(from 15deg, var(--sun), var(--berry), var(--sky), var(--grass), var(--sun));
  box-shadow: 0 6px 16px rgba(30, 36, 64, 0.18);
}

h1 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.brand-title-row h1 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.name-town-button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid rgba(38, 103, 255, 0.36);
  border-radius: 8px;
  color: var(--ink);
  background: #eef5ff;
  cursor: pointer;
  font-weight: 900;
  font-size: 0.78rem;
  line-height: 1;
}

.name-town-button:hover,
.name-town-button:focus-visible {
  border-color: var(--focus);
  outline: none;
}

p {
  margin: 0;
}

.brand p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.interaction-mode {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 0;
  padding: 4px;
  border-radius: 8px;
  background: rgba(30, 36, 64, 0.07);
}

.mode-button {
  min-width: 0;
  min-height: 38px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-weight: 900;
  font-size: 0.86rem;
}

.mode-button[aria-pressed="true"] {
  border-color: rgba(38, 103, 255, 0.28);
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 2px 7px rgba(30, 36, 64, 0.12);
}

.mode-button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.mode-button:disabled .mode-icon {
  filter: grayscale(0.55);
}

.mode-button:focus-visible {
  border-color: var(--focus);
  outline: none;
}

.tool-tabs {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-columns: repeat(6, minmax(64px, 1fr));
  gap: 6px;
  margin-bottom: 0;
  overscroll-behavior-x: contain;
}

.category-button {
  min-width: 0;
  min-height: 34px;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.68);
  cursor: pointer;
  font-weight: 900;
  font-size: 0.76rem;
  line-height: 1.02;
  overflow-wrap: anywhere;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.category-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.category-name {
  display: block;
}

.category-button:hover,
.category-button:focus-visible {
  border-color: rgba(38, 103, 255, 0.45);
  color: var(--ink);
  outline: none;
}

.category-button[aria-selected="true"] {
  border-color: var(--focus);
  color: var(--ink);
  background: #eef5ff;
  box-shadow: inset 0 0 0 2px rgba(38, 103, 255, 0.12);
}

.tool-grid {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(98px, 1fr));
  gap: 6px;
  min-width: 0;
  width: 100%;
  overflow: visible;
}

.tool-button {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 50px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  width: 100%;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.tool-button:hover,
.tool-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(38, 103, 255, 0.45);
  outline: none;
}

.tool-button[aria-pressed="true"] {
  border-color: var(--focus);
  background: #eef5ff;
  box-shadow: inset 0 0 0 2px rgba(38, 103, 255, 0.12);
}

.tool-swatch {
  width: 40px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(30, 36, 64, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-icon {
  font-size: 1.5rem;
  line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
}

.tool-name {
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: left;
  font-weight: 800;
  font-size: 0.82rem;
  line-height: 1.05;
}

.hud-status {
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
}

.status-body {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.status-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-strong);
  padding: 5px 12px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ink);
  cursor: pointer;
}

.status-toggle:hover {
  box-shadow: 0 3px 9px rgba(30, 36, 64, 0.16);
}

.status-toggle:focus-visible {
  border-color: var(--focus);
  outline: none;
}

.status-toggle-chevron {
  font-size: 0.7rem;
  transition: transform 0.16s ease;
}

.hud-status.is-collapsed .status-body {
  display: none;
}

.hud-status.is-collapsed .status-toggle-chevron {
  transform: rotate(180deg);
}

.stat-row {
  display: flex;
  gap: 8px;
}

.status-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.extras-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 32px rgba(28, 49, 38, 0.18);
}

.extras-panel[hidden] {
  display: none;
}

.extras-group {
  display: flex;
  gap: 8px;
}

.extras-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.extras-label {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted);
}

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

.chip-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.92rem;
  font-weight: 800;
  font-family: inherit;
  color: var(--ink);
  background: var(--panel-strong);
  cursor: pointer;
}

.chip-button.is-active {
  border-color: #2667ff;
  background: #dce8ff;
  color: #1d3f9e;
}

.challenge-panel {
  position: absolute;
  left: 16px;
  bottom: 16px;
  width: 230px;
  max-width: 60vw;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(28, 49, 38, 0.2);
  z-index: 6;
}

.challenge-title {
  margin: 0 0 8px;
  font-size: 0.98rem;
}

.challenge-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.challenge-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
}

.challenge-item .challenge-check {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #e7ecef;
  font-size: 0.8rem;
}

.challenge-item.is-done {
  color: #15803d;
}

.challenge-item.is-done .challenge-check {
  background: #bbf7d0;
}

.mini-map {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 128px;
  height: 128px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 8px 22px rgba(28, 49, 38, 0.28);
  background: #bfe3a8;
  z-index: 6;
  pointer-events: none;
}

.color-set {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 220px;
  justify-content: flex-end;
}

.color-chip {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--swatch, #ffffff);
  cursor: pointer;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
}

.color-chip.is-active {
  border-color: #1d3f9e;
  box-shadow: 0 0 0 2px rgba(38, 103, 255, 0.45);
}

.color-chip:focus-visible {
  outline: none;
  border-color: var(--focus);
}

.stat {
  min-width: 72px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  font-size: 1.25rem;
  line-height: 1;
}

.stat-button {
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: transform 0.08s ease, box-shadow 0.12s ease;
}

.stat-button:hover {
  box-shadow: 0 3px 9px rgba(30, 36, 64, 0.16);
}

.stat-button:active {
  transform: scale(0.96);
}

.stat-button:focus-visible {
  border-color: var(--focus);
  outline: none;
}

.mode-icon {
  margin-right: 4px;
  font-size: 0.95em;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel-strong);
  font-weight: 900;
  cursor: pointer;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: rgba(38, 103, 255, 0.5);
  outline: none;
}

.icon-button.danger {
  color: #b62a42;
}

.icon-button.is-active {
  border-color: #2667ff;
  background: #dce8ff;
  box-shadow: 0 0 0 2px rgba(38, 103, 255, 0.35);
}

.icon-button:disabled {
  color: #98a0b7;
  cursor: default;
  opacity: 0.58;
}

.icon-glyph {
  font-size: 1.22rem;
  line-height: 1;
}

.hint {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 2;
  width: min(520px, calc(100vw - 530px));
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-weight: 800;
  text-align: center;
  transform: none;
}

.toast {
  position: absolute;
  right: 18px;
  bottom: 78px;
  z-index: 3;
  max-width: min(330px, calc(100vw - 36px));
  padding: 10px 12px;
  border-radius: 8px;
  background: #1e2440;
  color: #ffffff;
  font-weight: 800;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.speech-bubble {
  position: absolute;
  z-index: 4;
  transform: translate(-50%, -100%);
  max-width: 220px;
  padding: 10px 14px;
  border-radius: 16px;
  background: #ffffff;
  color: #1e2440;
  font-weight: 800;
  font-size: 0.92rem;
  line-height: 1.25;
  text-align: center;
  border: 2px solid #ffd166;
  box-shadow: 0 8px 22px rgba(28, 49, 38, 0.28);
  pointer-events: none;
  opacity: 0;
  transition: opacity 160ms ease;
}

.speech-bubble.is-visible {
  opacity: 1;
}

.speech-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  transform: translateX(-50%);
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 10px solid #ffffff;
  filter: drop-shadow(0 2px 0 #ffd166);
}

.game-shell.is-walking .hud-tools,
.game-shell.is-walking .hud-status,
.game-shell.is-walking .hint,
.game-shell.is-riding-train .hud-tools,
.game-shell.is-riding-train .hud-status,
.game-shell.is-riding-train .hint {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
}

.walk-hud,
.train-hud {
  display: grid;
  gap: 12px;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: none;
}

.walk-hud[hidden],
.train-hud[hidden] {
  display: none;
}

.walk-chip {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  pointer-events: auto;
}

.walk-chip strong {
  padding-inline: 6px;
  font-size: 0.92rem;
}

.walk-exit-button {
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid rgba(38, 103, 255, 0.36);
  border-radius: 8px;
  color: var(--ink);
  background: #eef5ff;
  cursor: pointer;
  font-weight: 900;
}

.walk-pad {
  position: fixed;
  left: max(18px, env(safe-area-inset-left));
  bottom: max(18px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(3, 58px);
  grid-template-rows: repeat(3, 58px);
  gap: 8px;
  pointer-events: auto;
}

.walk-control {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(54, 71, 104, 0.2);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 24px rgba(40, 58, 87, 0.16);
  cursor: pointer;
  font-weight: 900;
  font-size: 1.25rem;
}

.walk-control.is-active {
  border-color: var(--focus);
  background: #eef5ff;
  transform: translateY(1px);
}

.walk-up {
  grid-column: 2;
  grid-row: 1;
}

.walk-left {
  grid-column: 1;
  grid-row: 2;
}

.walk-right {
  grid-column: 3;
  grid-row: 2;
}

.walk-down {
  grid-column: 2;
  grid-row: 3;
}

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

@media (max-width: 1100px) {
  .hud-tools {
    top: 10px;
    left: 10px;
    right: 10px;
    grid-template-columns: clamp(224px, 25vw, 250px) minmax(0, 1fr);
    column-gap: 10px;
    padding: 10px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  h1 {
    font-size: 1.08rem;
  }

  .brand-title-row {
    gap: 5px;
  }

  .name-town-button {
    padding-inline: 7px;
    font-size: 0.7rem;
  }

  .brand p {
    font-size: 0.78rem;
  }

  .hud-status {
    top: auto;
    right: 10px;
    bottom: 78px;
    max-width: calc(100vw - 20px);
  }

  .hint {
    bottom: 10px;
    left: 10px;
    width: min(410px, calc(100vw - 20px));
  }

  .toast {
    bottom: 156px;
  }

  .walk-pad {
    grid-template-columns: repeat(3, 54px);
    grid-template-rows: repeat(3, 54px);
  }
}

@media (max-width: 820px) {
  .game-shell {
    min-height: 620px;
  }

  .hud-tools {
    top: 10px;
    left: 10px;
    right: 10px;
    width: auto;
    padding: 10px;
    grid-template-columns: 224px minmax(0, 1fr);
    column-gap: 8px;
  }

  .brand {
    margin-bottom: 8px;
  }

  .name-town-button {
    padding-inline: 8px;
    font-size: 0.72rem;
  }

  .tool-tabs {
    grid-template-columns: repeat(6, minmax(64px, 1fr));
    gap: 6px;
  }

  .category-button {
    min-height: 32px;
    padding: 5px 6px;
    font-size: 0.68rem;
  }

  .tool-grid {
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    gap: 6px;
  }

  .tool-button {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 4px;
    min-height: 64px;
    padding: 5px 4px;
  }

  .tool-swatch {
    width: 34px;
    height: 34px;
  }

  .tool-icon {
    font-size: 1.3rem;
  }

  .tool-name {
    text-align: center;
    font-size: 0.65rem;
  }

  .hud-status {
    top: auto;
    right: auto;
    left: 10px;
    bottom: 78px;
    width: min(410px, calc(100vw - 20px));
    justify-content: center;
  }

  .stat {
    min-width: 62px;
  }

  .icon-button {
    width: 38px;
    height: 38px;
  }

  .hint {
    left: 50%;
    bottom: 10px;
    width: min(410px, calc(100vw - 20px));
    padding: 9px 10px;
    font-size: 0.86rem;
    overflow-wrap: anywhere;
    transform: translateX(-50%);
  }

  .toast {
    left: 10px;
    right: 10px;
    bottom: 204px;
    max-width: none;
  }

  .walk-pad {
    grid-template-columns: repeat(3, 50px);
    grid-template-rows: repeat(3, 50px);
    gap: 7px;
  }
}

@media (pointer: coarse) {
  .hud-tools {
    top: max(10px, env(safe-area-inset-top));
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
  }

  .hud-status {
    right: max(10px, env(safe-area-inset-right));
  }

  .category-button,
  .tool-button,
  .icon-button,
  .name-town-button,
  .mode-button {
    min-height: 44px;
  }

  .tool-button {
    min-height: 44px;
  }

  .hint {
    bottom: max(10px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 1100px) and (pointer: coarse) {
  .hud-status {
    bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .toast {
    bottom: calc(156px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 600px) {
  .hud-tools {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .brand {
    margin-bottom: 0;
  }

  .tool-tabs {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .tool-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 820px) and (pointer: coarse) {
  .hud-status {
    left: max(10px, env(safe-area-inset-left));
    right: auto;
  }

  .toast {
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: calc(204px + env(safe-area-inset-bottom));
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(24, 38, 30, 0.42);
  backdrop-filter: blur(4px);
  z-index: 50;
  opacity: 0;
  transition: opacity 0.18s ease;
  padding: 20px;
}

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

.modal-overlay.is-open {
  opacity: 1;
}

.modal-card {
  background: #fffdf7;
  border-radius: 22px;
  padding: 26px 26px 22px;
  width: min(360px, 100%);
  box-shadow: 0 22px 60px rgba(28, 49, 38, 0.32);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.18s ease;
  text-align: center;
}

.modal-overlay.is-open .modal-card {
  transform: translateY(0) scale(1);
}

.modal-message {
  margin: 0 0 18px;
  font-size: 1.12rem;
  font-weight: 700;
  color: #2f4a3a;
  line-height: 1.35;
}

.modal-card.is-info {
  width: min(440px, 100%);
  text-align: left;
}

.modal-card.is-info .modal-message {
  white-space: pre-line;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  max-height: 60vh;
  overflow-y: auto;
}

.modal-input {
  width: 100%;
  box-sizing: border-box;
  font-size: 1.05rem;
  padding: 12px 14px;
  border: 2px solid #cfe3cf;
  border-radius: 14px;
  margin-bottom: 18px;
  outline: none;
  font-family: inherit;
}

.modal-input:focus {
  border-color: #69b06b;
}

.modal-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  max-height: 46vh;
  overflow-y: auto;
}

.modal-list-button {
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  padding: 12px 14px;
  border: 2px solid #cfe3cf;
  border-radius: 14px;
  background: #ffffff;
  font: inherit;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
}

.modal-list-button:hover,
.modal-list-button:focus-visible {
  border-color: #69b06b;
  background: #f3fbf3;
  outline: none;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.modal-button {
  flex: 1;
  border: none;
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.modal-button:active {
  transform: scale(0.96);
}

.modal-cancel {
  background: #e8eee6;
  color: #41584a;
}

.modal-ok {
  background: linear-gradient(160deg, #7fd07f, #57b35a);
  color: #ffffff;
}

.modal-button:hover {
  filter: brightness(1.04);
}

@media (prefers-reduced-motion: reduce) {
  .category-button,
  .tool-button,
  .toast {
    transition: none;
  }

  .modal-overlay,
  .modal-card {
    transition: none;
  }
}
