/* VEIL v2.1 — base.css */

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

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text-main);
  font-family: var(--font-body);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: var(--font-size-base);
  line-height: var(--line-height-body);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  font-weight: 400;
  letter-spacing: var(--letter-spacing-body);
}

html, body {
  overscroll-behavior-y: none;
  -webkit-overflow-scrolling: touch;
}

/* ── Desktop: sidebar padding ── */
body.app-loaded {
  padding-top: var(--header-height);
}

@media (min-width: 1024px) {
  body.app-loaded {
    padding-top: 0 !important;
    padding-left: var(--sidebar-left-width);
    padding-right: var(--sidebar-right-width);
  }
  
  /* When profile panel is open on desktop, adjust right padding */
  body.app-loaded.profile-open {
    padding-right: 0;
  }
}

body.auth-screen {
  padding: 0 !important;
  margin: 0;
  overflow: hidden;
  background: #050505;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  margin: 0;
  line-height: var(--line-height-heading);
  letter-spacing: var(--letter-spacing-heading);
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.85;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: none;
  font-size: inherit;
  color: inherit;
  font-weight: 500;
}

img {
  content-visibility: auto;
}

/* ── Touch optimizations ── */
@media (hover: none) and (pointer: coarse) {
  .art-piece:hover {
    border-color: var(--border);
    box-shadow: none;
  }
  .art-piece:hover img {
    transform: none;
  }
  .art-card-action {
    padding: 8px 4px;
    min-height: 44px;
  }
  .art-card-action i {
    font-size: 22px;
  }
  .art-card-avatar {
    width: 36px;
    height: 36px;
  }
}

/* ── Reduced motion ── */
@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;
  }
}

/* ── Safe areas ── */
@supports (padding: max(0px)) {
  .bottom-nav, .header {
    padding-left: min(0px, env(safe-area-inset-left));
    padding-right: min(0px, env(safe-area-inset-right));
  }
}
