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

html {
  min-width: 320px;
  color-scheme: light;
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font-ui);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body.has-open-layer {
  overflow: hidden;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
}

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

.ui-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: var(--icon-stroke);
  stroke-linecap: round;
  stroke-linejoin: round;
}

:focus-visible {
  outline: 2px solid var(--copper-deep);
  outline-offset: 3px;
}

.clipboard-field {
  position: fixed;
  inset: 0 auto auto 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.app-toast {
  position: fixed;
  z-index: 100;
  right: 16px;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 16px;
  width: min(440px, calc(100% - 32px));
  margin-inline: auto;
  padding: 14px 18px;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(26, 23, 20, 0.97);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.2);
  font-size: 0.77rem;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity var(--motion-fast) ease, transform var(--motion-fast) ease;
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (forced-colors: active) {
  :focus-visible { outline-color: Highlight; }
  .ui-icon { color: CanvasText; }
}
