/* HDFZ Base & Reset Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--hdfz-bg);
  color: var(--hdfz-ink);
  font-family: var(--hdfz-font-sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  overscroll-behavior-y: contain;
  user-select: none;
}

/* Tabular Numerics for Metrics */
.tabular-nums, [data-metric] {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* App Shell Viewport */
#hdfz-app {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Scroll Containers */
.hdfz-scroll-view {
  flex: 1;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 84px);
}

@media (min-width: 900px) {
  .hdfz-scroll-view {
    padding-bottom: 40px;
  }
}

/* Container Width Limiter */
.hdfz-container {
  width: 100%;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
  padding: 16px 20px 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* iOS Pressable Button Effect */
.hdfz-pressable {
  transition: transform var(--hdfz-duration-feedback) var(--hdfz-ease-feedback),
              opacity var(--hdfz-duration-feedback) var(--hdfz-ease-feedback);
  cursor: pointer;
}
.hdfz-pressable:active {
  transform: scale(0.985);
  opacity: 0.78;
}

/* Accessibility Focus */
:focus-visible {
  outline: 2px solid var(--hdfz-accent-strong);
  outline-offset: 2px;
}
