:root {
  --dictionary-accent: #1e7f98;
  --dictionary-accent-soft: rgba(30, 127, 152, 0.12);
  --dictionary-good: #1f7a66;
  --dictionary-note: #415b73;
}

.dictionary-page {
  margin: 0;
}

.dictionary-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 2.5rem 1rem 3rem;
  display: grid;
  gap: 14px;
}

.dictionary-hero {
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 0;
  text-align: center;
}

.dictionary-hero h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 5vw, 3.1rem);
}

.dictionary-hero .subtitle {
  margin: 0 auto;
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.5;
}

.dictionary-panel {
  width: 100%;
  padding: 18px;
}

.lookup-form label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

.row input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 11px 12px;
  font: inherit;
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
}

.row input:focus {
  outline: 2px solid rgba(30, 127, 152, 0.45);
  outline-offset: 1px;
}

.row button {
  border: 1px solid rgba(30, 127, 152, 0.45);
  border-radius: 12px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #166a80, #1f87a2);
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease;
}

.row button:hover {
  transform: translateY(-1px);
  filter: saturate(1.08);
}

.row button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.autocorrect-hint {
  margin: 9px 0 0;
  color: var(--dictionary-note);
  font-size: 0.86rem;
}

.autocorrect-hint strong {
  color: #14495a;
}

.result {
  margin-top: 16px;
}

.status {
  margin: 0 0 10px;
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(30, 127, 152, 0.38);
  background: var(--dictionary-accent-soft);
  color: #0f4250;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.status.error {
  border-color: rgba(155, 60, 68, 0.4);
  background: rgba(155, 60, 68, 0.12);
  color: #7d2b34;
}

.output {
  display: grid;
  gap: 10px;
}

.empty-card,
.entry-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.entry-word {
  margin: 0;
  font-size: 1.2rem;
  color: #0f2436;
}

.entry-phonetic {
  margin: 4px 0 0;
  color: var(--dictionary-note);
  font-family: "Space Grotesk", sans-serif;
}

.meaning {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(79, 121, 152, 0.2);
}

.meaning:first-of-type {
  margin-top: 10px;
}

.part-of-speech {
  margin: 0 0 6px;
  display: inline-block;
  border-radius: 999px;
  border: 1px solid rgba(30, 127, 152, 0.26);
  background: rgba(30, 127, 152, 0.08);
  color: #185567;
  padding: 3px 9px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.meaning-list {
  margin: 0;
  padding-left: 18px;
  color: #173247;
  line-height: 1.5;
}

.meaning-list li {
  margin: 0 0 6px;
}

.example {
  margin: 6px 0 0;
  color: var(--dictionary-good);
  font-size: 0.9rem;
}

.tool-banner-ad {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.8rem;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.tool-banner-ad .ad-label {
  margin: 0 0 0.45rem;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 700;
}

.tool-banner-ad .ad-box {
  min-height: 110px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  padding: 0.5rem;
}

@media (max-width: 700px) {
  .dictionary-shell {
    padding-top: 1.5rem;
  }

  .dictionary-panel {
    padding: 14px;
  }

  .row {
    grid-template-columns: 1fr;
  }

  .row button {
    width: 100%;
  }
}
