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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  touch-action: manipulation;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-deep);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html[data-theme-mode="light"] body {
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
  touch-action: none;
}

img,
iconify-icon {
  display: block;
  max-width: 100%;
}

iconify-icon.icon-inline {
  display: inline-block;
  vertical-align: middle;
}

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

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

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

ul,
ol {
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

::selection {
  background: rgba(0, 255, 157, 0.25);
  color: var(--text-primary);
}

/* Scrollbar sutil */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: var(--radius-full);
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  background-color: var(--bg-deep);
}

.app-page-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
}

.app-shell--stack {
  min-height: 100dvh;
}

.app-main {
  flex: 1;
  padding-top: calc(var(--header-h) + var(--safe-top));
  padding-bottom: calc(var(--nav-bottom-h) + var(--safe-bottom) + var(--layout-gap-inner));
}

.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.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 (min-width: 768px) {
  .app-main {
    padding-bottom: var(--layout-gap-page);
  }
}
