:root {
  --text: #202124;
  --muted: #4d5156;
  --line: #dadce0;
  --page: #ffffff;
  --chip: #f8f9fa;
  --shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
  --blue: #1a73e8;
  --google-blue: #4285f4;
  --google-red: #ea4335;
  --google-yellow: #fbbc05;
  --google-green: #34a853;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--page);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

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

button,
input {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
}

.utility-bar {
  display: flex;
  justify-content: flex-end;
  padding: 14px 24px 0;
}

.utility-links {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}

.utility-links a:hover {
  text-decoration: underline;
}

.apps-button {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  border-radius: 50%;
  display: grid;
  grid-template-columns: repeat(3, 4px);
  grid-template-rows: repeat(3, 4px);
  gap: 4px;
  justify-content: center;
  align-content: center;
  cursor: pointer;
}

.apps-button span {
  width: 4px;
  height: 4px;
  background: #5f6368;
  border-radius: 50%;
}

.signin-button {
  border: 0;
  background: var(--blue);
  color: #fff;
  border-radius: 999px;
  height: 40px;
  padding: 0 24px;
  font-size: 14px;
  cursor: pointer;
}

.page-body {
  min-height: calc(100vh - 120px);
}

.brand-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 15vh;
}

.brand-mark {
  font-size: 92px;
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 500;
  user-select: none;
}

.brand-mark span:nth-child(1) { color: var(--google-blue); }
.brand-mark span:nth-child(2) { color: var(--google-red); }
.brand-mark span:nth-child(3) { color: var(--google-yellow); }
.brand-mark span:nth-child(4) { color: var(--google-blue); }
.brand-mark span:nth-child(5) { color: var(--google-green); }
.brand-mark span:nth-child(6) { color: var(--google-red); }
.brand-mark span:nth-child(7) { color: var(--google-blue); }
.brand-mark span:nth-child(8) { color: var(--google-green); }
.brand-mark span:nth-child(9) { color: var(--google-red); }

.search-form {
  width: min(746px, calc(100vw - 48px));
  margin-top: 28px;
  position: relative;
}

.search-box {
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 24px;
  display: grid;
  grid-template-columns: 44px 1fr 38px 1px 38px 38px auto;
  align-items: center;
  padding: 0 14px 0 10px;
  background: #fff;
}

.search-box:hover,
.search-form.is-open .search-box,
body[data-view="results"] .search-box {
  box-shadow: var(--shadow);
  border-color: transparent;
}

.search-form.is-open .search-box {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.search-addon,
.search-icon,
.ai-button {
  border: 0;
  background: transparent;
}

.search-addon {
  color: #5f6368;
  font-size: 28px;
}

.search-input {
  border: 0;
  outline: none;
  font-size: 16px;
  width: 100%;
  color: var(--text);
}

.search-input::-webkit-search-cancel-button {
  display: none;
}

.search-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #5f6368;
  font-size: 20px;
}

.search-divider {
  width: 1px;
  height: 24px;
  background: var(--line);
}

.ai-button {
  justify-self: end;
  border-radius: 999px;
  background: #f1f3f4;
  height: 34px;
  padding: 0 16px;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}

.ai-button.is-active {
  background: #e8f0fe;
  color: var(--blue);
}

.clear-button {
  visibility: hidden;
}

.suggestion-panel {
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid transparent;
  border-top: 0;
  border-radius: 0 0 24px 24px;
  box-shadow: var(--shadow);
  padding: 6px 0 14px;
  z-index: 4;
}

.suggestion-item {
  width: 100%;
  border: 0;
  background: transparent;
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 6px;
  text-align: left;
  padding: 10px 18px;
  cursor: pointer;
}

.suggestion-item:hover,
.suggestion-item.is-active {
  background: #f8f9fa;
}

.suggestion-icon {
  color: #9aa0a6;
  font-size: 18px;
  text-align: center;
}

.suggestion-label {
  font-size: 16px;
  color: var(--text);
}

.home-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.action-button {
  min-width: 126px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid #f8f9fa;
  background: #f8f9fa;
  border-radius: 4px;
  color: #3c4043;
  cursor: pointer;
}

.action-button:hover {
  border-color: var(--line);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.language-row {
  margin-top: 28px;
  font-size: 14px;
  color: var(--muted);
}

.language-row a {
  color: #1a0dab;
  margin-left: 8px;
}

.results-head,
.results-wrap {
  width: min(720px, calc(100vw - 270px));
  margin-left: 182px;
}

.results-head {
  border-bottom: 1px solid #ebebeb;
  margin-top: 8px;
}

.result-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 22px;
  font-size: 14px;
  position: relative;
}

.result-tab,
.tools-toggle {
  border: 0;
  background: transparent;
  color: #5f6368;
  padding: 18px 0 12px;
  border-bottom: 3px solid transparent;
  cursor: pointer;
}

.result-tab.is-active,
.tools-toggle.is-open {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.tabs-more {
  position: relative;
}

.more-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.more-menu {
  position: absolute;
  top: 50px;
  left: 0;
  min-width: 150px;
  padding: 10px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(32, 33, 36, 0.16);
  z-index: 6;
}

.more-link {
  display: block;
  padding: 10px 16px;
  color: var(--text);
  font-size: 14px;
}

.more-link:hover {
  background: #f8f9fa;
}

.results-meta {
  margin: 12px 0 0;
  font-size: 14px;
  color: #70757a;
}

.results-notice {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid #d2e3fc;
  background: #f8fbff;
  color: #3c4043;
  border-radius: 14px;
  font-size: 14px;
}

.tools-panel {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding: 16px 18px;
  border: 1px solid #ebebeb;
  border-radius: 16px;
  background: #fff;
}

.tool-section h3 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: #3c4043;
}

.tool-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tool-chip {
  border: 1px solid var(--line);
  background: #fff;
  color: #3c4043;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
}

.tool-chip:hover {
  border-color: #c7d1f8;
  background: #f8fbff;
}

.results-wrap {
  padding: 14px 0 120px;
}

.pinned-results {
  margin-bottom: 34px;
}

.pinned-results-head {
  max-width: 652px;
  margin-bottom: 18px;
}

.pinned-results-head p {
  margin: 10px 0 0;
  color: #4d5156;
  font-size: 14px;
}

.pinned-results-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #eef3fd;
  color: #1a73e8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pinned-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.results-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.results-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(186px, 1fr));
  gap: 18px;
}

.results-videos,
.results-shorts {
  gap: 20px;
}

.results-shopping {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.result-card {
  max-width: 652px;
}

.result-card.is-pinned {
  position: relative;
}

.pinned-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fce8e6;
  color: #c5221f;
  font-size: 12px;
  font-weight: 700;
}

.image-card,
.shop-card {
  border: 1px solid #ebebeb;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
}

.image-thumb,
.shop-thumb,
.media-thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #eef3fd, #f7f8fb);
}

.image-thumb {
  aspect-ratio: 1 / 1;
}

.shop-thumb {
  aspect-ratio: 4 / 3;
}

.media-thumb {
  width: 240px;
  min-width: 240px;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
}

.image-thumb img,
.shop-thumb img,
.media-thumb img,
.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-thumb span,
.shop-thumb span,
.media-thumb span {
  padding: 18px;
  text-align: center;
  font-size: 13px;
  color: #5f6368;
}

.image-card h3,
.shop-card h3 {
  margin: 14px 14px 6px;
  font-size: 16px;
  line-height: 1.4;
}

.image-card p,
.shop-card p {
  margin: 0 14px 14px;
  font-size: 13px;
  color: #5f6368;
}

.media-card,
.news-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.media-copy,
.news-copy {
  min-width: 0;
}

.media-meta {
  margin: 6px 0 8px;
  font-size: 13px;
  color: #5f6368;
}

.media-duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 7px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 12px;
}

.news-thumb {
  width: 136px;
  min-width: 136px;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  overflow: hidden;
  background: #f1f3f4;
}

.shop-card {
  position: relative;
  padding-bottom: 14px;
}

.shop-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 8px;
  border-radius: 999px;
  background: #d93025;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.shop-price {
  color: #202124;
  font-size: 18px;
  font-weight: 700;
}

.shop-rating {
  color: #b06000;
}

.shop-snippet {
  line-height: 1.45;
}

.ai-answer-card {
  max-width: 720px;
  padding: 24px;
  border: 1px solid #d2e3fc;
  border-radius: 22px;
  background: linear-gradient(180deg, #f8fbff, #ffffff);
}

.ai-answer-card h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.ai-answer-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: #3c4043;
}

.result-source {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
}

.result-site {
  color: var(--text);
}

.result-path {
  color: #4d5156;
}

.result-title {
  margin: 6px 0 6px;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.3;
}

.result-title a {
  color: #1a0dab;
}

.result-title a:hover {
  text-decoration: underline;
}

.result-snippet {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.58;
}

.pager {
  display: flex;
  gap: 12px;
  margin-top: 34px;
}

.pager button {
  height: 36px;
  padding: 0 18px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 18px;
  cursor: pointer;
  color: var(--blue);
}

.pager button:disabled {
  color: #9aa0a6;
  cursor: not-allowed;
}

.error-card {
  max-width: 652px;
  border: 1px solid #f0d7d7;
  background: #fff7f7;
  border-radius: 16px;
  padding: 18px 20px;
}

.error-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.error-card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.skeleton {
  height: 112px;
  border-radius: 16px;
  background: linear-gradient(90deg, #f5f7f8, #eef1f3, #f5f7f8);
  background-size: 200% 100%;
  animation: shimmer 1.25s infinite linear;
}

@keyframes shimmer {
  100% {
    background-position: -200% 0;
  }
}

.page-footer {
  background: #f2f2f2;
  color: #70757a;
  font-size: 15px;
}

.footer-location {
  padding: 14px 30px;
  border-bottom: 1px solid #dadce0;
}

.footer-links {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 0 30px;
  min-height: 46px;
  align-items: center;
}

.footer-left,
.footer-right {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

body[data-view="results"] .brand-stage {
  align-items: flex-start;
  padding-top: 18px;
  padding-left: 28px;
}

body[data-view="results"] .brand-mark {
  font-size: 32px;
}

body[data-view="results"] .search-form {
  width: min(720px, calc(100vw - 270px));
  margin-top: -40px;
  margin-left: 154px;
}

body[data-view="results"] .home-actions,
body[data-view="results"] .language-row {
  display: none;
}

@media (max-width: 960px) {
  .results-head,
  .results-wrap,
  body[data-view="results"] .search-form {
    width: calc(100vw - 32px);
    margin-left: 16px;
  }

  body[data-view="results"] .brand-stage {
    padding-left: 16px;
  }

  body[data-view="results"] .brand-mark {
    font-size: 28px;
  }

  body[data-view="results"] .search-form {
    margin-top: 12px;
  }

  .footer-links {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 20px;
  }
}

@media (max-width: 640px) {
  .utility-bar {
    padding: 12px 12px 0;
  }

  .utility-links {
    gap: 10px;
  }

  .brand-stage {
    padding-top: 10vh;
  }

  .brand-mark {
    font-size: 62px;
  }

  .search-form {
    width: calc(100vw - 24px);
    margin-top: 24px;
  }

  .search-box {
    grid-template-columns: 34px 1fr 32px 1px 32px 32px;
    padding-right: 8px;
  }

  .ai-button,
  .search-divider {
    display: none;
  }

  .home-actions {
    flex-wrap: wrap;
  }

  .result-tabs {
    gap: 14px;
  }

  .media-card,
  .news-card {
    flex-direction: column;
  }

  .media-thumb,
  .news-thumb {
    width: 100%;
    min-width: 0;
  }

  .results-images,
  .results-shopping {
    grid-template-columns: 1fr 1fr;
  }

  .page-footer {
    font-size: 14px;
  }
}
