@font-face {
  font-family: "IRANSans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/farhang/assets/fonts/IRANSansX-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "IRANSans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/farhang/assets/fonts/IRANSansX-Bold.woff2") format("woff2");
}
:root {
  --bg: #fff;
  --bg-soft: #f6f7f8;
  --ink: #1b1d21;
  --muted: #6b7280;
  --line: #e6e8eb;
  --accent: #1f4e79;
  --accent-soft: rgba(31,78,121,.08);
  --radius: 14px;
  --dock-h: 64px;
  --font: "IRANSans", Tahoma, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100dvh; font-family: var(--font); background: var(--bg); color: var(--ink); }
body *:not(i):not([class*="fa-"]) { font-family: var(--font); }
i[class*="fa-"], .fa-light { font-family: "Font Awesome 6 Pro" !important; font-weight: 300 !important; }
[v-cloak] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { appearance: none; border: 0; background: none; cursor: pointer; }
html.js .seo-crawl, body.js-app .seo-crawl { display: none !important; }
#app { min-height: 100dvh; padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom) + 1rem); }

.shell-top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 56px; padding: 0.4rem 1rem;
  padding-top: calc(0.4rem + env(safe-area-inset-top));
  background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .6rem; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.05rem; }
.brand-text em { font-style: normal; font-size: .7rem; color: var(--muted); }
.top-actions { display: flex; gap: .4rem; }
.icon-btn {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line);
}
.icon-btn.on, .icon-btn:hover { color: var(--accent); }
.icon-btn:disabled { opacity: .35; }

.search-wrap { padding: .75rem 1rem 0; width: min(720px, 100%); margin: 0 auto; position: relative; }
.search-field { position: relative; }
.search-field input {
  width: 100%; border: 1px solid var(--line); background: var(--bg-soft);
  border-radius: 999px; padding: .85rem 2.8rem .85rem 1rem; outline: none;
}
.search-field input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-soft); }
.search-field .fa-magnifying-glass {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted);
}
.suggest {
  position: absolute; right: 0; left: 0; top: calc(100% + 6px); z-index: 30;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.06); overflow: hidden;
}
.suggest button {
  width: 100%; text-align: right; padding: .7rem .9rem;
  display: flex; flex-direction: column; gap: .15rem; border-bottom: 1px solid var(--line);
}
.suggest button:last-child { border: 0; }
.suggest strong { font-size: .95rem; }
.suggest small { color: var(--muted); font-size: .78rem; }

.shell { width: min(720px, 100%); margin: 0 auto; padding: .85rem 1rem 1rem; }
.hero { margin: .4rem 0 1rem; }
.hero h1 { margin: 0 0 .3rem; font-size: clamp(1.3rem, 5vw, 1.7rem); }
.hero p { margin: 0; color: var(--muted); }
.langs {
  display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 .65rem;
}
.langs button {
  height: 34px; padding: 0 .75rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-soft); font-size: .82rem;
}
.langs button.on { background: var(--accent-soft); color: var(--accent); border-color: #d7e3ef; }
.search-field.ltr input { direction: ltr; text-align: left; padding: .85rem 1rem .85rem 2.8rem; }
.search-field.ltr .fa-magnifying-glass { left: 12px; right: auto; }
.word-list.ltr button, .entry-head h1.ltr { direction: ltr; text-align: left; }
.alpha {
  display: flex; flex-wrap: wrap; gap: .35rem; margin: .4rem 0 1rem;
}
.alpha button {
  min-width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg-soft);
}
.alpha button.on { background: var(--accent-soft); color: var(--accent); border-color: #d7e3ef; }

.word-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.word-list button {
  width: 100%; text-align: right; padding: .85rem 1rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  display: flex; flex-direction: column; gap: .2rem;
}
.word-list small { color: var(--muted); font-size: .82rem; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pager { display: flex; align-items: center; justify-content: center; gap: .55rem; margin: 1rem 0; }
.pager span { color: var(--muted); min-width: 4.5rem; text-align: center; }

.entry-head { margin: .3rem 0 1rem; }
.entry-head h1 { margin: 0; font-size: clamp(1.4rem, 5vw, 2rem); }
.ipa { margin: .35rem 0 0; color: var(--accent); direction: ltr; text-align: right; }
.pos { display: inline-block; color: var(--accent); background: var(--accent-soft);
  border-radius: 999px; padding: .1rem .55rem; font-size: .8rem; margin-bottom: .45rem; }
.senses { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.senses li { padding: .2rem 0 .85rem; border-bottom: 1px dashed var(--line); line-height: 1.9; }
.senses .n { color: var(--muted); margin-left: .4rem; }
.ex { margin: .35rem 0 0; color: var(--muted); font-size: .9rem; }
.etym, .related { margin-top: 1.2rem; color: var(--muted); line-height: 1.8; font-size: .92rem; }
.related a { margin-left: .35rem; }
.license { margin-top: 2rem; font-size: .75rem; color: var(--muted); }
.gform { display: grid; gap: .75rem; margin: 0 0 1.2rem; }
.gform label { display: grid; gap: .35rem; font-size: .88rem; color: var(--muted); }
.gform input, .gform select, .gform textarea {
  width: 100%; border: 1px solid var(--line); background: var(--bg-soft);
  border-radius: 12px; padding: .7rem .85rem; outline: none; color: var(--ink);
}
.gform textarea { resize: vertical; min-height: 10rem; line-height: 1.7; }
.gform textarea.ltr { direction: ltr; text-align: left; }
.gform input:focus, .gform select:focus, .gform textarea:focus {
  border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-soft);
}
.hint { margin: 0; font-size: .78rem; color: var(--muted); line-height: 1.7; }
.gmsg { margin: 0; color: var(--accent); font-size: .9rem; }
.gbtn {
  height: 44px; border-radius: 12px; background: var(--accent); color: #fff;
  font-size: .95rem;
}
.gbtn:disabled { opacity: .45; }
.gbtn.ghost { background: var(--bg-soft); color: var(--ink); border: 1px solid var(--line); }
.gbtn.slim { height: 36px; font-size: .85rem; }
.vis-tag {
  display: inline-block; font-size: .72rem; color: var(--accent);
  background: var(--accent-soft); border-radius: 999px; padding: .05rem .5rem; margin-bottom: .35rem;
}
.edit-sense { display: grid; gap: .4rem; }
.edit-sense textarea, .edit-sense input, .edit-sense select,
.glist select {
  width: 100%; border: 1px solid var(--line); background: var(--bg-soft);
  border-radius: 10px; padding: .55rem .7rem; font: inherit;
}
.add-sense { margin-top: 1.2rem; }
.glist { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.glist li {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  padding: .75rem .9rem; border: 1px solid var(--line); border-radius: var(--radius);
}
.glist strong { display: block; }
.glist small { color: var(--muted); font-size: .8rem; }
.state { text-align: center; padding: 2rem 1rem; color: var(--muted); }
.top-progress {
  position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 80;
  overflow: hidden; background: var(--accent-soft); pointer-events: none;
}
.top-progress::after {
  content: ""; display: block; height: 100%; width: 35%; background: var(--accent);
  animation: loadslide .85s ease-in-out infinite alternate;
}
@keyframes loadslide { from { transform: translateX(180%); } to { transform: translateX(-280%); } }

.dock {
  position: fixed; bottom: 0; inset-inline: 0; z-index: 50;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--dock-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255,255,255,.96); border-top: 1px solid var(--line);
}
.dock button, .dock a { color: var(--muted); font-size: 1.15rem; display: grid; place-items: center; text-decoration: none; }
.dock button.on { color: var(--accent); }

@media (min-width: 900px) {
  #app { padding-bottom: 2rem; }
  .dock { display: none; }
  .shell-top {
    width: min(720px, calc(100% - 2rem)); margin: 0 auto; border: 0; background: transparent; padding-inline: 0;
  }
}
