*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

html {
  background: var(--frame-bg);
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--frame-bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: -0.01em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.1), transparent 28%),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.08), transparent 24%);
  pointer-events: none;
}

#app-root {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

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

button,
select,
input[type="text"],
input[type="color"] {
  appearance: none;
  -webkit-appearance: none;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
}

p {
  margin: 0;
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 38px;
  border: 1px solid var(--green);
  border-radius: 12px;
  background: var(--green);
  color: #fffdf8;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-none);
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    opacity 160ms ease;
}

button:hover:not(:disabled) {
  background: var(--green-strong);
  border-color: var(--green-strong);
}

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

button.ghost {
  background: #fffdf9;
  border-color: rgba(102, 82, 56, 0.18);
  color: var(--text);
}

button.ghost:hover:not(:disabled) {
  background: #faf6ef;
}

button.warning {
  background: #fffaf7;
  border-color: rgba(211, 102, 80, 0.35);
  color: var(--warn);
}

button.warning:hover:not(:disabled) {
  background: #fff4ef;
  border-color: rgba(211, 102, 80, 0.48);
}

.button-gold {
  background: var(--gold);
  border-color: var(--gold);
  color: #fffaf0;
}

.button-gold:hover:not(:disabled) {
  background: #b99242;
  border-color: #b99242;
}

input[type="text"],
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(193, 174, 146, 0.54);
  border-radius: 14px;
  background: #f3eadf;
  color: var(--text);
  padding: 0 16px;
  font-size: 16px;
}

input[type="text"]::placeholder {
  color: var(--text-faint);
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(92, 138, 103, 0.16);
}

input[type="range"] {
  width: 100%;
  margin: 0;
  background: transparent;
  accent-color: var(--green);
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(102, 82, 56, 0.2);
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4px;
  border: 0;
  border-radius: 999px;
  background: var(--green);
}

input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(102, 82, 56, 0.2);
}

input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: var(--green);
}

dialog {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
}

dialog::backdrop {
  background: rgba(24, 20, 17, 0.18);
}

.hidden,
[hidden] {
  display: none !important;
}

.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;
}

.toolbar-icon {
  width: 16px;
  height: 16px;
}

.piece-art {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.piece-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.piece-art--seat {
  width: 14px;
  height: 14px;
}

.piece-art--captured {
  width: 15px;
  height: 15px;
}

.piece-art--promotion {
  width: 24px;
  height: 24px;
}
