body {
  margin: 0;
  background: var(--brand-bg);
}

#root {
  min-height: 100vh;
}

.tool-shell {
  min-height: 100vh;
  background: var(--brand-bg);
}

.content-wrap {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0 40px;
}

.brand-share-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 20;
  min-width: 220px;
  padding: 8px;
  border: 1px solid var(--brand-border);
  border-radius: 12px;
  background: var(--brand-surface);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.08);
}

.tool2-settings-menu {
  position: absolute;
  top: 56px;
  right: 0;
  z-index: 10;
  display: flex;
  gap: 12px;
  width: max-content;
  max-width: min(520px, calc(100vw - 32px));
  padding: 12px;
  border: 1px solid var(--brand-border);
  border-radius: 16px;
  background: var(--brand-surface);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.08);
}

.tool2-panel {
  border-radius: 24px;
}

.tool2-results-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tool2-footer-note {
  padding-bottom: 8px;
}

.tool2-mobile-compare-grid {
  display: grid;
  gap: 12px;
}

@media (max-width: 640px) {
  .content-wrap {
    width: min(100% - 24px, 1280px);
    padding: 84px 0 32px;
  }

  .brand-share-panel {
    min-width: min(220px, calc(100vw - 24px));
  }

  .tool2-settings-menu {
    position: fixed;
    top: 72px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    flex-direction: column;
    gap: 10px;
    max-height: calc(100vh - 96px);
    overflow: auto;
  }

  .tool2-panel {
    border-radius: 20px;
  }

  .tool2-results-grid {
    grid-template-columns: 1fr;
  }

  .tool2-mobile-compare-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .content-wrap {
    width: min(100% - 16px, 1280px);
    padding: 76px 0 24px;
  }

  .tool2-settings-menu {
    top: 64px;
    left: 8px;
    right: 8px;
  }

  .tool2-panel {
    border-radius: 18px;
  }

  .tool2-footer-note {
    padding: 0 8px 8px;
  }
}
