:root {
  --bg: #f5f7fb;
  --bg-elevated: rgba(255,255,255,0.7);
  --surface: rgba(255,255,255,0.82);
  --surface-strong: #ffffff;
  --surface-alt: #eef3ff;
  --text: #101826;
  --text-soft: #4d5d79;
  --text-muted: #7685a0;
  --border: rgba(148, 163, 184, 0.28);
  --accent: #5b6cff;
  --accent-soft: rgba(91,108,255,0.12);
  --accent-strong: #4355e0;
  --success: #12a76d;
  --warning: #f59e0b;
  --danger: #ef4444;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
  --radius: 24px;
  --header-height: 76px;
}

body.dark {
  --bg: #0b1220;
  --bg-elevated: rgba(15, 23, 42, 0.78);
  --surface: rgba(15, 23, 42, 0.92);
  --surface-strong: #121d2b;
  --surface-alt: #1b2a3d;
  --text: #e6edf9;
  --text-soft: #bfd1f0;
  --text-muted: #8ea4c7;
  --border: rgba(148,163,184,0.18);
  --accent: #8b9dff;
  --accent-soft: rgba(139,157,255,0.18);
  --accent-strong: #6d82ff;
  --success: #4ade80;
  --warning: #fbbf24;
  --danger: #f87171;
  --shadow: 0 18px 36px rgba(2, 6, 23, 0.4);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, rgba(91,108,255,0.06), transparent 24%), var(--bg);
  color: var(--text);
  transition: background 0.3s ease, color 0.3s ease;
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }

:focus-visible {
  outline: 3px solid rgba(91,108,255,0.45);
  outline-offset: 2px;
}

body.no-scroll { overflow: hidden; }

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.app-shell {
  min-height: 100vh;
}

header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 76%, transparent);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.04em;
  font-size: 1.25rem;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6d7dff, #30d399);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 18px rgba(91,108,255,0.35);
  position: relative;
  overflow: hidden;
}

.logo-mark::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 10px;
  border: 2px solid rgba(255,255,255,0.9);
}

.logo-mark::after {
  content: "W";
  position: absolute;
  color: white;
  font-weight: 800;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text-soft);
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--accent-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle, .menu-toggle, .icon-button, .primary-button, .ghost-button, .chip, .search-button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  transition: all 0.2s ease;
}

.theme-toggle, .menu-toggle, .icon-button, .ghost-button, .search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle {
  width: 42px;
  height: 42px;
}

.menu-toggle {
  width: 44px;
  height: 44px;
  display: none;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

main {
  padding-bottom: 80px;
}

.page {
  padding-top: 40px;
}

.hero {
  padding: 48px 0 26px;
}

.hero-card {
  background: linear-gradient(135deg, rgba(91,108,255,0.1), rgba(98, 196, 255, 0.06));
  border: 1px solid var(--border);
  border-radius: 32px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 52px);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(91,108,255,0.07);
  border: 1px solid var(--border);
  color: var(--accent-strong);
  font-weight: 600;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.07em;
}

.hero-subtext {
  margin-top: 16px;
  max-width: 560px;
  font-size: 1.08rem;
  color: var(--text-soft);
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding: 14px 18px 14px 16px;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 14px 34px rgba(91,108,255,0.08);
  transition: all 0.25s ease;
}

.search-wrap:focus-within {
  border-color: rgba(91,108,255,0.5);
  box-shadow: 0 22px 42px rgba(91,108,255,0.15);
  transform: translateY(-1px);
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  min-width: 0;
  font-size: 1.08rem;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-button {
  padding: 0 20px;
  height: 48px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  font-weight: 700;
}

.icon-button {
  width: 42px;
  height: 42px;
  background: var(--surface-alt);
  border: none;
}

.clear-button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-muted);
}

.search-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: none;
  overflow: hidden;
  z-index: 10;
}

.search-suggestions.visible { display: block; }

.suggestion-item {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  text-align: left;
}

.suggestion-item:hover,
.suggestion-item.active {
  background: rgba(91,108,255,0.06);
}

.suggestion-label {
  font-weight: 600;
}

.hero-side {
  display: grid;
  gap: 20px;
}

.metric-card, .mini-card, .result-card, .empty-card, .word-card, .about-box, .panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 24px;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.metric-card .title {
  color: var(--text-soft);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.metric-card .value {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.05em;
}

.word-of-day {
  padding: 22px;
}

.word-of-day h3, .panel h3, .empty h3, .result-header h2 {
  margin: 0 0 12px;
  letter-spacing: -0.05em;
}

.word-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border: 1px solid rgba(91,108,255,0.2);
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 0.76rem;
  font-weight: 700;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 20px;
  margin-top: 26px;
}

.content-section {
  margin-top: 18px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(1.6rem, 2vw, 2.2rem);
  letter-spacing: -0.06em;
}

.explore-grid, .favorites-grid, .history-list, .results-grid {
  display: grid;
  gap: 18px;
}

.explore-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.word-card {
  padding: 18px;
  min-width: 0;
}

.word-card .word-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.word-card h4 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.word-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.result-card {
  padding: clamp(20px, 2vw, 30px);
}

.hindi-panel {
  margin: 0 0 18px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(91, 108, 255, 0.2);
  background: linear-gradient(135deg, rgba(91, 108, 255, 0.06), rgba(34, 197, 94, 0.05));
}

.hindi-text {
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--text);
  font-weight: 700;
  word-break: break-word;
  overflow-wrap: anywhere;
  font-family: "Noto Sans Devanagari", "Mangal", "Nirmala UI", sans-serif;
}

.hindi-pair {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  overflow-wrap: anywhere;
}

.hindi-english {
  color: var(--text-soft);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.hindi-definition {
  margin-top: 12px;
  color: var(--text-soft);
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.hindi-unavailable {
  color: var(--text-soft);
  line-height: 1.6;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 18px;
}

.word-title {
  font-size: clamp(2.3rem, 5vw, 4rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.word-meta-block {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--text-soft);
  margin-top: 10px;
}

.pronunciation {
  font-size: 1.05rem;
  font-weight: 600;
}

.definition-groups {
  display: grid;
  gap: 18px;
}

.pos-section {
  padding: 18px 18px 8px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(99, 102, 241, 0.02);
}

.pos-header {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.definition-list {
  display: grid;
  gap: 14px;
}

.definition-item {
  display: flex;
  gap: 14px;
  padding: 14px 12px;
  border-radius: 18px;
  border: 1px solid transparent;
  background: rgba(255,255,255,0.02);
  transition: all 0.2s ease;
}

.definition-item:hover {
  border-color: var(--border);
  background: rgba(91,108,255,0.03);
}

.definition-number {
  min-width: 44px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.88rem;
}

.definition-text {
  color: var(--text)
}

.definition-text strong {
  display: block;
  margin-bottom: 6px;
}

.definition-example {
  margin-top: 8px;
  color: var(--text-soft);
  line-height: 1.6;
}

.inline-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ghost-button, .primary-button {
  padding: 0 16px;
  height: 42px;
  font-weight: 700;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  border: none;
}

.ghost-button {
  background: var(--surface-alt);
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(91,108,255,0.06);
  color: var(--text);
  font-weight: 600;
}

.chip:hover {
  background: rgba(91,108,255,0.1);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.empty {
  text-align: center;
  padding: 56px 20px;
  border: 1px dashed var(--border);
  border-radius: 30px;
  background: rgba(91,108,255,0.02);
}

.empty h3 {
  font-size: 2rem;
  letter-spacing: -0.06em;
}

.empty p {
  color: var(--text-soft);
  margin: 8px auto 0;
  max-width: 500px;
  line-height: 1.7;
}

.empty-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.history-list, .favorites-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.history-item, .favorite-item {
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.history-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.item-word {
  font-size: 1.2rem;
  letter-spacing: -0.04em;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.meta-time {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.remove-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(239,68,68,0.07);
  color: var(--danger);
}

.route-title {
  font-size: clamp(2.1rem, 3vw, 3rem);
  letter-spacing: -0.07em;
  margin: 0 0 18px;
}

.about-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.about-box {
  padding: 22px;
}

.about-box h3 {
  margin: 0 0 12px;
}

.about-box p,
.about-box li {
  color: var(--text-soft);
  line-height: 1.7;
}

.about-box ul {
  margin: 0;
  padding-left: 18px;
}

.toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 150;
}

.toast {
  min-width: min(360px, calc(100vw - 32px));
  background: rgba(15,23,42,0.9);
  color: white;
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 18px 40px rgba(15,23,42,0.24);
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.skeleton {
  background: linear-gradient(90deg, rgba(148,163,184,0.15), rgba(148,163,184,0.28), rgba(148,163,184,0.15));
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: 16px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-title { height: 54px; width: 70%; border-radius: 14px; }
.skeleton-text { height: 18px; width: 100%; border-radius: 12px; }
.skeleton-card { height: 120px; border-radius: 18px; }

.hidden { display: none !important; }

@media (max-width: 880px) {
  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 16px;
    right: 16px;
    padding: 12px;
    background: var(--surface-strong);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    display: none;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links.open { display: flex; }
  .menu-toggle { display: inline-flex; }
  .hero-grid, .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .header-inner { gap: 10px; }
  .brand span { font-size: 1rem; }
  .search-wrap { padding: 10px 12px 10px 10px; }
  .search-button { padding: 0 14px; }
  .result-header { flex-direction: column; }
  .word-title { font-size: 2.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Product surface refinements */
:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --surface-alt: #f0f4f8;
  --text: #172033;
  --text-soft: #58657a;
  --text-muted: #8a96a8;
  --border: #e4e9f0;
  --accent: #176b68;
  --accent-soft: #e4f3f0;
  --accent-strong: #0f5754;
  --shadow: 0 18px 45px rgba(23, 32, 51, 0.07);
  --radius: 18px;
}

body { font-family: Manrope, "Segoe UI", sans-serif; background: var(--bg); }
body.dark { --bg: #111923; --surface: #182431; --surface-strong: #1d2a38; --surface-alt: #223343; --text: #edf3f7; --text-soft: #b7c5d2; --text-muted: #8a9aaa; --border: #2d3d4d; --accent: #67c5b5; --accent-soft: #1c3d3a; --accent-strong: #8bdbcc; --shadow: 0 18px 45px rgba(0,0,0,.2); }
.container { width: min(1160px, calc(100% - 40px)); }
header { background: color-mix(in srgb, var(--bg) 90%, transparent); }
.header-inner { height: 72px; }
.brand { font-size: 1.15rem; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); box-shadow: none; }
.logo-mark::before { inset: 7px; border-radius: 7px; }
.nav-links { gap: 2px; }
.nav-link { padding: 9px 12px; font-size: .86rem; }
.nav-link:hover, .nav-link.active { color: var(--accent); background: var(--accent-soft); }
.profile-button, .theme-toggle { width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--text-soft); }
.hero { padding-top: 56px; }
.hero-card { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); border-radius: 24px; }
.hero-grid { padding: 56px; }
.eyebrow { color: var(--accent); font-weight: 800; letter-spacing: .14em; font-size: .72rem; }
.hero h1 { font-size: clamp(2.6rem, 5vw, 4.5rem); line-height: 1.05; letter-spacing: -.07em; max-width: 680px; }
.hero h1 span { color: var(--accent); }
.hero-subtext, .page-intro { max-width: 650px; color: var(--text-soft); line-height: 1.8; }
.search-wrap { border-radius: 14px; border-color: var(--border); box-shadow: 0 10px 30px rgba(23,32,51,.06); }
.search-button, .primary-button { background: var(--accent); border-radius: 10px; }
.search-button:hover, .primary-button:hover { background: var(--accent-strong); }
.content-section { padding-top: 48px; }
.feature-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.feature-card { position: relative; min-height: 180px; padding: 22px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: 0 10px 26px rgba(23,32,51,.04); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.feature-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); box-shadow: var(--shadow); }
.feature-icon { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 28px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); font-size: 1.2rem; }
.feature-card strong { display: block; font-size: .95rem; }
.feature-card p { margin: 8px 0 0; color: var(--text-soft); font-size: .78rem; line-height: 1.55; }
.feature-arrow { position: absolute; top: 22px; right: 22px; color: var(--text-muted); }
.site-footer { margin-top: 80px; border-top: 1px solid var(--border); }
.footer-inner { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-brand { font-weight: 800; }
.footer-links { display: flex; gap: 20px; color: var(--text-soft); font-size: .82rem; }
.footer-copy { color: var(--text-muted); font-size: .78rem; }
.page { padding-top: 48px; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.route-title { margin: 8px 0 0; letter-spacing: -.06em; }
.dictionary-search { max-width: 760px; margin-top: 0; }
.search-suggestions { pointer-events: none; }
.search-suggestions.visible { pointer-events: auto; }
.dictionary-quick-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; color: var(--text-muted); font-size: .8rem; }
.dictionary-quick-links .chip { min-height: 30px; font-size: .76rem; }
.translator-status { display: inline-flex; align-items: center; gap: 8px; color: var(--text-soft); font-size: .8rem; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.translator-card { padding: 26px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.language-toolbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 16px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.language-field { display: grid; gap: 8px; color: var(--text-muted); font-size: .68rem; font-weight: 800; letter-spacing: .1em; }
.language-field select { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }
.swap-button { width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 50%; background: var(--surface-alt); color: var(--accent); font-size: 1.2rem; }
.translation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-top: 24px; }
.translation-panel { min-height: 230px; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-alt); }
.output-panel { background: var(--surface); }
.panel-label { display: flex; justify-content: space-between; gap: 12px; color: var(--text-muted); font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.panel-label span:last-child { font-size: .68rem; font-weight: 500; text-transform: none; letter-spacing: 0; }
.translation-panel textarea, .translation-output { display: block; width: 100%; height: 145px; min-height: 0; margin-top: 18px; padding: 0; border: 0; resize: vertical; background: transparent; color: var(--text); font-size: 1.04rem; line-height: 1.75; }
.translation-panel textarea:focus { outline: none; }
.translation-output { white-space: pre-wrap; color: var(--text-soft); }
.panel-actions { display: flex; justify-content: flex-end; }
.text-button { border: 0; background: transparent; color: var(--accent); font-size: .78rem; font-weight: 700; }
.translator-footer { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding-top: 22px; }
.translator-hint { margin: 0; color: var(--text-muted); font-size: .78rem; }
.button-icon { margin-right: 6px; }
.loading { opacity: .65; pointer-events: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.admin-role, .admin-check { display: inline-flex; align-items: center; padding: 7px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .72rem; font-weight: 800; }
.admin-grid { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 16px; }
.admin-card { padding: 24px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); box-shadow: 0 10px 26px rgba(23,32,51,.04); }
.profile-card { display: flex; align-items: center; gap: 16px; background: var(--accent-soft); border-color: transparent; }
.admin-avatar { display: grid; place-items: center; width: 54px; height: 54px; flex: 0 0 auto; border-radius: 50%; background: var(--accent); color: white; font-size: 1.3rem; font-weight: 800; }
.admin-card h2 { margin: 5px 0 8px; font-size: 1.05rem; letter-spacing: -.03em; }
.profile-card h2 { margin: 0 0 4px; }
.admin-card p { margin: 0; color: var(--text-soft); font-size: .82rem; }
.admin-card-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.admin-field { display: grid; gap: 7px; margin-bottom: 14px; color: var(--text-soft); font-size: .78rem; font-weight: 700; }
.admin-field input { width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text); }
.admin-stat { display: flex; align-items: baseline; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.admin-stat strong { font-size: 1.6rem; color: var(--accent); }
.admin-stat span { color: var(--text-soft); font-size: .78rem; }
.admin-link { display: inline-flex; width: 100%; justify-content: space-between; margin-top: 18px; }

@media (max-width: 980px) {
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-grid { padding: 42px; }
  .nav-links { position: absolute; top: 72px; left: 20px; right: 20px; display: none; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
  .nav-links.open { display: grid; }
  .menu-toggle { display: inline-flex; }
}
@media (max-width: 640px) {
  .container { width: min(100% - 24px, 1160px); }
  .hero { padding-top: 24px; }
  .hero-grid { padding: 28px 20px; }
  .hero h1 { font-size: 2.7rem; }
  .search-wrap { flex-wrap: wrap; }
  .search-input { flex-basis: calc(100% - 40px); }
  .search-button { width: 100%; }
  .feature-grid, .translation-grid { grid-template-columns: 1fr; }
  .admin-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: 145px; }
  .page-heading, .translator-footer, .footer-inner { align-items: flex-start; flex-direction: column; }
  .language-toolbar { grid-template-columns: 1fr; align-items: stretch; }
  .swap-button { justify-self: center; transform: rotate(90deg); }
  .translator-card { padding: 16px; }
  .footer-inner { padding: 22px 0; }
}
