html {
  touch-action: manipulation;
}
.skip-link {
  position: absolute;
  left: max(12px, env(safe-area-inset-left));
  top: max(12px, env(safe-area-inset-top));
  z-index: 10000;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;

  &:focus,
  &:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  overflow-x: hidden;
  background-color: var(--bg);
}

.home {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  /* Optical center: brand ~22–26% / bar ~32–36% of viewport */
  padding-top: clamp(calc(env(safe-area-inset-top, 0px) + 72px), 24vh, 280px);
  padding-right: 20px;
  padding-bottom: max(48px, env(safe-area-inset-bottom));
  padding-left: 20px;
  width: 100%;
  box-sizing: border-box;
}

.search-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 584px);
}

.brand-name {
  margin: 0 0 32px;
  display: flex;
  justify-content: center;
  width: 100%;
  line-height: 1;
  user-select: none;
  pointer-events: none;
}

.brand-name .brand-logo {
  width: clamp(11rem, 30vw, 16rem);
  height: calc(clamp(11rem, 30vw, 16rem) * 38 / 200);
  background-color: var(--text);
}

form {
  width: 100%;
}

.search-bar {
  height: 52px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 20px 0 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--omnibox-radius, 999px);
  cursor: text;
  /* Closed shadow ≈ Google .RNNXgb */
  box-shadow: rgba(31, 31, 31, 0.08) 0px 3px 10px 0px;
  transition:
    border-color 0.12s ease,
    box-shadow 0.12s ease;

  &:hover {
    box-shadow: rgba(64, 60, 67, 0.24) 0px 2px 8px 1px;
  }

  &:has(input:focus):not(.omnibox-open) {
    box-shadow: rgba(64, 60, 67, 0.24) 0px 2px 8px 1px;
  }

  .search-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--muted);
    pointer-events: none;
  }

  input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: none;
    background: transparent;
    padding: 0 10px;
    font: inherit;
    font-size: 16px;
    color: var(--text);
    outline: none;
    field-sizing: fixed;

    &::placeholder {
      color: var(--muted);
    }
  }
}

:root[data-theme="dark"] .search-bar {
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.35);

  &:hover,
  &:has(input:focus):not(.omnibox-open) {
    border-color: var(--border-strong);
    box-shadow: 0 2px 10px rgb(0 0 0 / 0.45);
  }
}

@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.22s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 480px) {
  .brand-name {
    margin-bottom: 24px;
  }

  .search-bar {
    height: 48px;
  }
}
