:root {
  --bg: #f7f7f2;
  --ink: #171717;
  --muted: #5b5b55;
  --line: #242424;
  --panel: #fffdf7;
  --accent: #e62d2d;
  --accent-dark: #9f1818;
  --lime: #b8f24b;
  --cyan: #63d7e8;
  --shadow: 8px 8px 0 #171717;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(23, 23, 23, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(23, 23, 23, 0.06) 1px, transparent 1px),
    var(--bg);
  background-size: 28px 28px;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body.modal-open {
  overflow: hidden;
}

body.modal-open .app {
  pointer-events: none;
  user-select: none;
}

[hidden] {
  display: none !important;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

button {
  border: 2px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink);
  background: var(--lime);
  min-height: 48px;
  padding: 0 18px;
  font-weight: 800;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--ink);
}

button:active {
  transform: translate(0, 0);
  box-shadow: none;
}

a {
  color: var(--accent-dark);
  font-weight: 800;
}

.disclaimer-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(23, 23, 23, 0.72);
}

.disclaimer-panel {
  width: min(840px, 100%);
  max-height: min(86vh, 880px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 22px;
}

.disclaimer-head h2 {
  font-size: 34px;
  line-height: 1.12;
}

.disclaimer-head p {
  margin-top: 10px;
  color: var(--accent-dark);
  font-weight: 900;
  line-height: 1.65;
}

.disclaimer-body {
  overflow: auto;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
}

.disclaimer-body section + section {
  margin-top: 18px;
}

.disclaimer-body h3 {
  margin-bottom: 8px;
  font-size: 17px;
}

.disclaimer-body p,
.disclaimer-body li {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.85;
}

.disclaimer-body ul {
  margin: 0;
  padding-left: 20px;
}

.app {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.hero {
  min-height: 64vh;
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  gap: 28px;
  padding: 36px 0 28px;
}

.hero-copy {
  max-width: 780px;
}

.brand-lockup {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 10px;
}

.brand-name,
.brand-slogan {
  margin: 0;
  font-weight: 900;
  line-height: 1.05;
}

.brand-name {
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--cyan);
  padding: 8px 12px;
  font-size: 42px;
}

.brand-slogan {
  font-size: 38px;
}

.brand-taunt {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 32px;
  font-weight: 900;
  line-height: 1.4;
}

.author-line {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.6;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--cyan);
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 760px;
  font-size: 64px;
  line-height: 1.05;
}

.search-surface {
  width: min(760px, 100%);
}

.search-surface label {
  display: block;
  margin-bottom: 10px;
  font-weight: 900;
  font-size: 18px;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.search-row input {
  width: 100%;
  min-height: 58px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 0 16px;
  font-size: 20px;
  font-weight: 800;
  outline: none;
  box-shadow: var(--shadow);
}

.search-row input:focus {
  border-color: var(--accent);
}

.search-help {
  margin-top: 16px;
  color: var(--muted);
  font-size: 15px;
}

.suggestions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-height: 96px;
  margin-top: 18px;
}

.suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 76px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
  text-align: left;
}

.suggestion:hover,
.suggestion.is-active {
  background: var(--lime);
}

.suggestion strong {
  display: block;
  font-size: 18px;
}

.suggestion span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.quick-pick {
  padding-top: 22px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: 28px;
  line-height: 1.2;
}

.text-button,
.secondary-button {
  background: var(--panel);
}

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

.chip {
  min-height: 42px;
  padding: 0 12px;
  background: var(--panel);
  font-size: 14px;
}

.chip:hover {
  background: var(--cyan);
}

.result-panel {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: start;
  margin-top: 32px;
  padding: 24px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.result-media {
  position: sticky;
  top: 24px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.result-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.result-copy h2 {
  font-size: 44px;
  line-height: 1.1;
}

.result-intro {
  margin-top: 12px;
  color: var(--accent-dark);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.5;
}

.verdict {
  margin-top: 24px;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: var(--lime);
  padding: 18px;
}

.verdict h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.verdict p,
details p {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.85;
}

.nmti-line {
  margin-bottom: 12px;
  font-size: 24px !important;
  font-weight: 900;
  line-height: 1.35 !important;
}

details {
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
}

details {
  margin-top: 14px;
}

summary {
  cursor: pointer;
  font-weight: 900;
}

details p {
  margin-top: 12px;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.toast {
  color: var(--accent-dark);
}

@media (max-width: 860px) {
  .app {
    width: min(100% - 24px, 760px);
    padding-top: 18px;
  }

  .hero {
    min-height: 62vh;
    padding-top: 24px;
  }

  h1 {
    font-size: 38px;
  }

  .brand-name {
    font-size: 34px;
  }

  .brand-slogan {
    font-size: 30px;
  }

  .brand-taunt {
    font-size: 24px;
  }

  .search-row,
  .suggestions,
  .result-panel {
    grid-template-columns: 1fr;
  }

  .search-row button {
    width: 100%;
  }

  .result-panel {
    padding: 14px;
  }

  .result-media {
    position: static;
    max-height: 440px;
  }

  .result-copy h2 {
    font-size: 34px;
  }
}

@media (max-width: 420px) {
  .app {
    width: min(100% - 16px, 760px);
  }

  h1 {
    font-size: 32px;
  }

  .brand-name,
  .brand-slogan {
    font-size: 26px;
  }

  .brand-taunt {
    font-size: 21px;
  }

  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}
