*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  background-color: var(--cream-50);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--cream-50);
  min-height: 100dvh;
  overflow-x: clip;
}

.skip-link {
  position: fixed;
  top: -120px;
  left: var(--space-4);
  z-index: 2000;
  background-color: var(--wine-700);
  color: var(--cream-50);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-pill);
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--shadow-warm-lg);
  transition: top 0.15s ease;
}

.skip-link:focus-visible {
  top: var(--space-4);
  box-shadow: var(--focus-ring);
}

h1,
h2,
h3,
h4,
.font-display {
  font-family: var(--font-display);
  color: var(--wine-900);
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); font-weight: 600; }

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

button {
  cursor: pointer;
  background: none;
  border: none;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.tabular,
.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

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

/* Traço de pincel artesanal */
.brush-divider {
  width: 72px;
  height: 5px;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--yellow-500) 0%, var(--yellow-300) 75%, transparent 100%);
  margin: var(--space-2) 0 var(--space-4);
}

/* Shell Principal Responsivo */
.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.main-area {
  flex: 1;
  width: 100%;
  padding: var(--space-4);
  padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + var(--space-6));
}

.main-inner {
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .app-shell {
    flex-direction: row;
  }

  .main-area {
    margin-left: var(--sidebar-width);
    padding: var(--space-8);
    padding-bottom: var(--space-8);
  }
}

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