/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
@layer theme, base, components, utilities;
@layer utilities {
  .tw\:bg-card {
    background-color: var(--card);
  }
}
:root {
  --bg: #F5F5F2;
  --card: #FFFFFF;
  --line: #E4E4DF;
  --sunk: #EBEBE6;
  --fg: #17181C;
  --fg2: #4A4D55;
  --muted: #63666E;
  --btn: #17181C;
  --btn-fg: #FFFFFF;
  --src-bg: #FBEFC2;
  --src-fg: #6B4E00;
  --hl: rgba(242,196,40,.38);
  --hl-on: rgba(242,180,20,.72);
  --ai-bg: #ECEBFD;
  --ai-fg: #3E3BB0;
  --you-bg: #DDF1E8;
  --you-fg: #1B6448;
  --warn-bg: #FDE7DA;
  --warn-fg: #8A3A0F;
  --scan: #0E0F12;
  --scan-2: #1C1D22;
  --shadow: 0 10px 28px rgba(23,24,28,.18);
  --f-word: "Newsreader", "Vazirmatn", Georgia, "Times New Roman", serif;
  --f-ui: "Geist", "Vazirmatn", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-fa: "Vazirmatn", Tahoma, sans-serif;
  --f-mono: "Geist Mono", "Vazirmatn", ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111214;
    --card: #1A1B1F;
    --line: #2B2C31;
    --sunk: #232429;
    --fg: #EDEDEA;
    --fg2: #BDBEBA;
    --muted: #9C9EA5;
    --btn: #EDEDEA;
    --btn-fg: #111214;
    --src-bg: #3A300C;
    --src-fg: #F2D45C;
    --hl: rgba(242,200,60,.30);
    --hl-on: rgba(242,200,60,.62);
    --ai-bg: #25244C;
    --ai-fg: #BDBBFF;
    --you-bg: #0F2E22;
    --you-fg: #86DDB3;
    --warn-bg: #3B1E10;
    --warn-fg: #F4B48E;
    --shadow: 0 10px 28px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111214;
  --card: #1A1B1F;
  --line: #2B2C31;
  --sunk: #232429;
  --fg: #EDEDEA;
  --fg2: #BDBEBA;
  --muted: #9C9EA5;
  --btn: #EDEDEA;
  --btn-fg: #111214;
  --src-bg: #3A300C;
  --src-fg: #F2D45C;
  --hl: rgba(242,200,60,.30);
  --hl-on: rgba(242,200,60,.62);
  --ai-bg: #25244C;
  --ai-fg: #BDBBFF;
  --you-bg: #0F2E22;
  --you-fg: #86DDB3;
  --warn-bg: #3B1E10;
  --warn-fg: #F4B48E;
  --shadow: 0 10px 28px rgba(0,0,0,.5);
  color-scheme: dark;
}
html,body {
  height: 100%;
}
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-ui);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top,0px);
  z-index: 30;
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
button,input,select,textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
:focus-visible {
  outline: 2px solid var(--ai-fg);
  outline-offset: 2px;
  border-radius: 8px;
}
.w {
  font-family: var(--f-word);
}
.mono {
  font-family: var(--f-mono);
}
.muted {
  color: var(--muted);
}
h1,h2,h3 {
  margin: 0;
  text-wrap: balance;
}
#app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100%;
  padding-left: max(20px,env(safe-area-inset-left,0px));
  padding-right: max(20px,env(safe-area-inset-right,0px));
  padding-block: 20px calc(110px + env(safe-area-inset-bottom,0px));
}
#app.bare {
  padding-bottom: calc(120px + env(safe-area-inset-bottom,0px));
}
.screen {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
}
.screen > .top:first-child, .scanin > .top:first-child, .screen > .stick-head:first-child, .scanin > .stick-head:first-child {
  position: sticky;
  top: 0;
  z-index: 24;
  margin: -20px -20px 0;
  padding: calc(12px + env(safe-area-inset-top,0px)) 20px 10px;
  background: var(--bg);
  @supports (color: color-mix(in lab, red, red)) {
    background: color-mix(in srgb,var(--bg) 90%,transparent);
  }
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.stick-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.scanin > .top:first-child, .scanin > .stick-head:first-child {
  margin-top: calc(-16px - env(safe-area-inset-top,0px));
}
html.scrolled .screen > .top:first-child, .scanwrap.scrolled .scanin > .top:first-child, html.scrolled .screen > .stick-head:first-child, .scanwrap.scrolled .scanin > .stick-head:first-child {
  border-bottom-color: var(--line);
}
.scan-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  gap: 10px;
  margin: 0 -20px calc(-28px - env(safe-area-inset-bottom,0px));
  padding: 12px 20px calc(14px + env(safe-area-inset-bottom,0px));
  background: var(--bg);
  @supports (color: color-mix(in lab, red, red)) {
    background: color-mix(in srgb,var(--bg) 92%,transparent);
  }
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.scan-actions.col {
  flex-direction: column;
  gap: 12px;
}
.study-actions > * {
  max-width: 480px;
  margin-inline: auto;
}
.study-actions .btn {
  display: flex;
  width: 100%;
}
.study-actions {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  padding: 12px 20px calc(14px + env(safe-area-inset-bottom,0px));
  border-top: 1px solid var(--line);
  background: var(--bg);
  @supports (color: color-mix(in lab, red, red)) {
    background: color-mix(in srgb,var(--bg) 92%,transparent);
  }
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.title {
  font-family: var(--f-word);
  font-weight: 400;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: -.01em;
}
.sub {
  font-size: 13px;
  color: var(--muted);
}
.eyebrow {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.sec {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sec-h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.sec-h h2 {
  font-size: 15px;
  font-weight: 600;
}
.sec-h a {
  font-size: 13px;
  color: var(--muted);
  padding: 6px 0;
}
.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.icon-btn.ghost {
  border: 0;
  background: transparent;
}
.btn {
  height: 52px;
  border-radius: 16px;
  border: 0;
  background: var(--btn);
  color: var(--btn-fg);
  font-size: 16px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
}
.btn.big {
  height: 58px;
}
.btn.sec2 {
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--line);
}
.btn.small {
  height: 40px;
  font-size: 14px;
  border-radius: 12px;
  padding: 0 14px;
}
.btn[disabled] {
  opacity: .45;
  cursor: default;
}
.link {
  background: none;
  border: 0;
  padding: 8px 0;
  color: var(--ai-fg);
  font-size: 14px;
  font-weight: 500;
}
.card {
  background: var(--card);
  border-radius: 18px;
}
.field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 16px;
}
.field.ai {
  color: var(--ai-fg);
}
.field.ai input {
  color: var(--fg);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 8px;
}
.stat {
  background: var(--card);
  border-radius: 14px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat b {
  font-size: 21px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.stat span {
  font-size: 12px;
  color: var(--muted);
}
.hscroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin: 0 -20px;
  padding: 2px 20px 6px;
  scrollbar-width: none;
}
.hscroll::-webkit-scrollbar {
  display: none;
}
.wcard {
  flex: 0 0 152px;
  background: var(--card);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  border: 0;
}
.wcard .w {
  font-size: 21px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.wcard .meta {
  font-size: 12px;
  color: var(--muted);
}
.thumbs {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 10px;
}
.thumb {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.thumb .img {
  aspect-ratio: 3/4;
  max-width: 100%;
  border-radius: 10px;
  background: var(--sunk) center/cover no-repeat;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.thumb .cap {
  font-size: 12px;
  color: var(--fg2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.badge {
  position: absolute;
  left: 6px;
  bottom: 6px;
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 6px;
  background: var(--src-bg);
  color: var(--src-fg);
  font-weight: 500;
}
.badge.review {
  background: var(--warn-bg);
  color: var(--warn-fg);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips.scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  margin: 0 -20px;
  padding: 0 20px;
  scrollbar-width: none;
}
.chip {
  padding: 0 14px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 14px;
  white-space: nowrap;
  flex: none;
}
.chip[aria-pressed="true"] {
  background: var(--btn);
  color: var(--btn-fg);
  border-color: var(--btn);
}
.chip .n {
  margin-left: 6px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.chip[aria-pressed="true"] .n {
  color: inherit;
  opacity: .7;
}
.o {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
  line-height: 1.5;
}
.o-source {
  background: var(--src-bg);
  color: var(--src-fg);
}
.o-ai {
  background: var(--ai-bg);
  color: var(--ai-fg);
}
.o-user {
  background: var(--you-bg);
  color: var(--you-fg);
}
.list {
  background: var(--card);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  min-height: 64px;
  border-top: 1px solid var(--line);
}
.row:first-child {
  border-top: 0;
}
.row .l {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.row .w {
  font-size: 20px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.row .art {
  color: var(--muted);
}
.row .meta {
  font-size: 13px;
  color: var(--muted);
}
.pages-pill {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--src-bg);
  color: var(--src-fg);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.empty {
  background: var(--card);
  border-radius: 20px;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}
.empty h2 {
  font-family: var(--f-word);
  font-weight: 400;
  font-size: 26px;
  line-height: 1.15;
}
.empty p {
  margin: 0;
  color: var(--fg2);
  max-width: 46ch;
}
.note {
  font-size: 13px;
  line-height: 1.5;
  padding: 12px 14px;
  border-radius: 12px;
}
.note.ai {
  background: var(--ai-bg);
  color: var(--ai-fg);
}
.note.src {
  background: var(--src-bg);
  color: var(--src-fg);
}
.note.warn {
  background: var(--warn-bg);
  color: var(--warn-fg);
}
nav.tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  pointer-events: none;
  padding: 0 max(12px,env(safe-area-inset-right,0px)) calc(10px + env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px));
}
nav.tabs .in {
  pointer-events: auto;
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  height: 68px;
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  align-items: center;
  padding: 0 6px;
  border-radius: 26px;
  background: var(--card);
  @supports (color: color-mix(in lab, red, red)) {
    background: color-mix(in srgb,var(--card) 94%,transparent);
  }
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--line);
  @supports (color: color-mix(in lab, red, red)) {
    border: 1px solid color-mix(in srgb,var(--line) 80%,transparent);
  }
  box-shadow: 0 10px 30px rgba(20,20,24,.12),0 1px 0 rgba(255,255,255,.5) inset;
}
nav.tabs .ind {
  position: absolute;
  top: 8px;
  left: 0;
  height: 52px;
  border-radius: 19px;
  background: var(--sunk);
  transition: transform .32s cubic-bezier(.3,1.25,.4,1),width .32s;
  pointer-events: none;
  opacity: 0;
}
nav.tabs .ind.show {
  opacity: 1;
}
nav.tabs a {
  position: relative;
  z-index: 1;
  height: 52px;
  margin: 0 3px;
  border-radius: 19px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--muted);
  transition: color .2s,transform .15s;
}
nav.tabs a svg {
  transition: transform .25s cubic-bezier(.3,1.4,.4,1),stroke-width .2s;
}
nav.tabs a[aria-current="page"] {
  color: var(--fg);
  font-weight: 600;
}
nav.tabs a[aria-current="page"] svg {
  transform: translateY(-1px) scale(1.08);
  stroke-width: 2;
}
nav.tabs a:active {
  transform: scale(.92);
}
nav.tabs .scan {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 2;
  height: 52px;
}
#aidock {
  position: fixed;
  left: 0;
  right: var(--dl-w,0px);
  bottom: calc(10px + env(safe-area-inset-bottom,0px));
  z-index: 52;
  pointer-events: none;
  padding: 0 12px;
}
#aidock[hidden] {
  display: none;
}
nav.tabs .in {
  width: calc(100% - 72px);
  max-width: 424px;
  transform: translateX(-36px);
}
#aidock .in {
  position: relative;
  max-width: 424px;
  width: calc(100% - 72px);
  margin: 0 auto;
  height: 68px;
  transform: translateX(-36px);
}
#aidock .ai-orb {
  position: absolute;
  right: -72px;
  top: 3px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  padding: 0;
  justify-content: center;
}
#aidock .ai-orb .orb {
  width: 62px;
  height: 62px;
  margin: 0;
  box-shadow: 0 10px 26px rgba(60,50,150,.32);
}
#aidock .ai-orb .orb svg {
  width: 26px;
  height: 26px;
}
#aidock .ai-orb .orb-lbl {
  display: none;
}
.orb-tab {
  pointer-events: auto;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 52px;
  padding: 0;
  margin: 0 auto;
  background: none;
  border: 0;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .01em;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
nav.tabs a.orb-tab {
  height: 52px;
  margin: 0 auto;
  border-radius: 0;
  gap: 4px;
  justify-content: center;
}
.orb-tab .orb {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-top: -24px;
  box-shadow: 0 0 0 4px var(--card),0 8px 20px rgba(20,20,24,.24);
  @supports (color: color-mix(in lab, red, red)) {
    box-shadow: 0 0 0 4px color-mix(in srgb,var(--card) 92%,transparent),0 8px 20px rgba(20,20,24,.24);
  }
  transition: transform .15s;
}
.orb-tab .orb svg {
  width: 24px;
  height: 24px;
  transform: none !important;
}
.orb-tab:active .orb {
  transform: scale(.92);
}
.scan-orb .orb {
  background: var(--btn);
  color: var(--btn-fg);
}
.ai-orb .orb {
  background: var(--ai-fg);
  color: #fff;
}
.orb-lbl {
  line-height: 1;
  font-size: 10.5px;
}
html.no-nav .orb-tab .orb-lbl {
  visibility: hidden;
}
#app.bare {
  padding-bottom: calc(200px + env(safe-area-inset-bottom,0px)) !important;
}
.savebar,.study-actions {
  padding-bottom: calc(92px + env(safe-area-inset-bottom,0px)) !important;
}
.scan-actions {
  padding-bottom: calc(92px + env(safe-area-inset-bottom,0px)) !important;
}
.sheet {
  padding-bottom: calc(96px + env(safe-area-inset-bottom,0px)) !important;
}
.scanwrap {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--bg);
  color: var(--fg);
  overflow-y: auto;
}
.scanin {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: calc(16px + env(safe-area-inset-top,0px)) max(20px,env(safe-area-inset-right,0px)) calc(28px + env(safe-area-inset-bottom,0px)) max(20px,env(safe-area-inset-left,0px));
}
.scanin .icon-btn {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--fg);
}
.viewfinder {
  flex: 1;
  min-height: 300px;
  border-radius: 22px;
  background: var(--sunk);
  border: 1px solid var(--line);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.viewfinder .frame {
  position: absolute;
  inset: 26px 30px;
  border-radius: 12px;
  border: 2px dashed var(--src-fg);
  opacity: .7;
}
.viewfinder p {
  position: relative;
  max-width: 28ch;
  text-align: center;
  color: var(--fg2);
  margin: 0;
  font-size: 14px;
}
.dark-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dark-field label {
  font-size: 12px;
  color: var(--fg2);
}
.dark-field select,.dark-field input {
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  padding: 0 12px;
  font-size: 16px;
  width: 100%;
}
.dark-field select option {
  color: var(--fg);
  background: var(--card);
}
.scanrow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.scan-sample {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 46px;
  border-radius: 14px;
  border: 1px dashed var(--line);
  background: var(--card);
  color: var(--fg);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.sample-pick {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sp-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.sp-opt .sp-img {
  width: 58px;
  height: 76px;
  flex: none;
  border-radius: 8px;
  background: var(--sunk) center/cover no-repeat;
  border: 1px solid var(--line);
  margin: 0;
}
.sp-opt .l {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.shutter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px;
}
.shutter {
  width: 80px;
  height: 80px;
  border-radius: 40px;
  border: 4px solid var(--fg);
  padding: 5px;
  display: block;
  cursor: pointer;
}
.shutter span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--fg);
}
.sidebtn {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--fg);
}
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.steps {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: 6px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  text-align: center;
}
.steps span {
  padding: 6px 0;
  border-radius: 7px;
  background: var(--sunk);
  color: var(--muted);
}
.steps span.on {
  background: var(--btn);
  color: var(--btn-fg);
}
.steps span.done {
  background: var(--src-bg);
  color: var(--src-fg);
}
.preview-img {
  width: 100%;
  border-radius: 14px;
  display: block;
  max-height: 58vh;
  object-fit: contain;
  background: var(--sunk);
  border: 1px solid var(--line);
}
.pagebox {
  position: relative;
  border-radius: 14px;
  overflow: auto;
  background: var(--sunk);
  border: 1px solid var(--line);
  max-height: 70vh;
  -webkit-overflow-scrolling: touch;
}
.pagezoom {
  position: relative;
  width: 100%;
}
.pagezoom img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
}
.hlbox {
  position: absolute;
  background: var(--hl);
  border-radius: 3px;
  border: 0;
  padding: 0;
  mix-blend-mode: multiply;
}
:root[data-theme="dark"] .hlbox {
  mix-blend-mode: normal;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hlbox {
    mix-blend-mode: normal;
  }
}
.hlbox.on {
  background: var(--hl-on);
  outline: 2px solid var(--src-fg);
  outline-offset: 1px;
}
.zoombar {
  display: flex;
  gap: 6px;
  align-items: center;
}
.scanning {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.scanning::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 22%;
  top: -22%;
  background: linear-gradient(180deg,transparent,rgba(94,92,230,.22),transparent);
  animation: sweep 2.2s ease-in-out infinite;
}
@keyframes sweep {
  to {
    top: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .scanning::after {
    animation: none;
    top: 39%;
  }
}
.sheet-bg {
  position: fixed;
  inset: 0;
  background: rgba(10,10,12,.35);
  z-index: 50;
}
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 51;
  background: var(--card);
  border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow);
  padding: 10px max(20px,env(safe-area-inset-right,0px)) calc(24px + env(safe-area-inset-bottom,0px)) max(20px,env(safe-area-inset-left,0px));
  max-width: 520px;
  margin: 0 auto;
  max-height: 85vh;
  overflow-y: auto;
}
.sheet .grab {
  width: 40px;
  height: 5px;
  border-radius: 3px;
  background: var(--line);
  margin: 0 auto 14px;
}
.sheet-in {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rv-top {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.rv-thumb {
  flex: 0 0 96px;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--sunk);
}
.rv-thumb img {
  display: block;
  width: 100%;
}
.rv-thumb .hlbox {
  mix-blend-mode: normal;
  background: rgba(242,196,40,.5);
}
.rv-list {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 18px;
  overflow: clip;
}
.rv {
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.rv:first-child {
  border-top: 0;
}
.rv-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px 6px 4px;
  min-height: 62px;
}
.rv-head .chk {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  cursor: pointer;
}
.rv-head .chk input {
  width: 20px;
  height: 20px;
  accent-color: var(--fg);
}
.rv-head .main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: none;
  border: 0;
  text-align: left;
  padding: 6px 0;
}
.rv-head .w {
  font-size: 19px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.rv-head .meta {
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.rv.off .rv-head .w,.rv.off .rv-head .meta {
  opacity: .45;
}
.rv.off .rv-head .w {
  text-decoration: line-through;
}
.rv-filter {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rv-trash {
  color: var(--warn-fg);
}
.opt.danger .opt-i {
  background: var(--warn-bg);
  color: var(--warn-fg);
}
.opt.danger .l > span:first-child {
  color: var(--warn-fg);
}
.rv-sum {
  display: flex;
  gap: 12px;
  align-items: center;
}
.rv-thumb.sm {
  flex: 0 0 46px;
  border-radius: 8px;
}
.rv-sum .l {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.rv-sum-t {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.rv-chiprow {
  flex-wrap: nowrap;
  align-items: center;
}
.rv-chiprow .chip {
  flex: none;
  height: 34px;
}
.rv-div {
  flex: none;
  width: 1px;
  height: 20px;
  background: var(--line);
  margin: 0 2px;
}
.rv-listhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 16px;
  background: var(--sunk);
  font-size: 14px;
}
.rv-listhead + .rv {
  border-top: 0;
}
.rv-words {
  gap: 10px !important;
}
.rv-searchbtn {
  width: 38px;
  padding: 0 !important;
  justify-content: center;
  display: inline-flex;
  align-items: center;
}
.rv-search {
  height: 46px;
}
.rv-search .icon-btn {
  width: 32px;
  height: 32px;
  margin-right: -6px;
}
.rv-selall {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--fg2);
  cursor: pointer;
}
.rv-selall input {
  width: 20px;
  height: 20px;
  accent-color: var(--fg);
}
.rv-words {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rv-words[hidden],#rv-cols[hidden],.rv[hidden] {
  display: none !important;
}
.seg.rv-tabs {
  grid-template-columns: repeat(2,minmax(0,1fr));
}
.seg.rv-tabs button {
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.rvc-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
.rvc {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rvc-h {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rvc-h .l {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rvc-n {
  font: 600 13px/1 'Geist Mono',monospace;
  background: var(--you-bg);
  color: var(--you-fg);
  padding: 6px 8px;
  border-radius: 999px;
}
.rvc-g {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rvc-gl {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg2);
}
.rvc-gl.w {
  font-size: 17px;
  font-weight: 500;
  color: var(--fg);
}
button.wchip {
  border: 0;
  font: inherit;
  cursor: pointer;
}
.rv-join {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rv-join .lab {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--src-fg);
  font-weight: 600;
}
.rv-filter .chip {
  height: 34px;
}
.seg.rv-seg {
  grid-template-columns: repeat(3,minmax(0,1fr));
}
.rv.open {
  margin: 10px 8px;
  border: 1.5px solid var(--fg);
  border-radius: 16px;
  background: var(--bg);
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  overflow: clip;
}
.rv.open + .rv {
  border-top: 0;
}
.rv.open .rv-head {
  position: sticky;
  top: var(--hdr-h,0px);
  z-index: 6;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  border-radius: 14px 14px 0 0;
}
.rv.open .rv-head .w {
  font-size: 22px;
  font-weight: 500;
}
.rv-editing {
  font: 600 10px/1 'Geist Mono',ui-monospace,monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--btn-fg);
  background: var(--btn);
  padding: 4px 6px;
  border-radius: 6px;
}
.rv-done {
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  flex: none;
  margin-right: 4px;
}
.rv-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 16px 18px;
}
.rv-form .ef input {
  background: var(--card);
}
.rv-form input.big {
  height: 50px;
  font-size: 22px;
}
.rv-ctx {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--src-bg);
  border-radius: 12px;
  padding: 10px 12px;
}
.rv-ctx .lab {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--src-fg);
}
.rv-ctx p {
  margin: 0;
  font-size: 17px;
  font-style: italic;
  color: var(--fg);
}
.rv-sec-t {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg2);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 2px;
}
.rv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rv-chips button {
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.rv-chips button[aria-checked="true"] {
  background: var(--btn);
  color: var(--btn-fg);
  border-color: var(--btn);
}
.rv-two {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(120px,1fr));
  gap: 12px;
}
.rv-ai {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--ai-bg);
  border-radius: 14px;
  padding: 12px;
}
.rv-ai-h {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--ai-fg);
  font-size: 14px;
}
.rv-ai .chip.sm,.chip.sm {
  height: 30px;
  font-size: 13px;
  padding: 0 10px;
}
.rv-turn {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rv-q {
  align-self: flex-end;
  background: var(--btn);
  color: var(--btn-fg);
  padding: 7px 11px;
  border-radius: 12px 12px 4px 12px;
  font-size: 14px;
  max-width: 85%;
}
.rv-a {
  background: var(--card);
  padding: 9px 11px;
  border-radius: 12px 12px 12px 4px;
  font-size: 14px;
  line-height: 1.55;
  max-width: 92%;
}
.rv-ex {
  background: var(--card);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid transparent;
}
.rv-ex.on {
  border-color: var(--ai-fg);
}
.rv-ex p {
  margin: 0;
}
.rv-ex .w {
  font-size: 17px;
}
.rv-ex .tr {
  font-size: 13.5px;
  color: var(--fg2);
}
.rv-ex-f {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}
.rv-sug {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
}
.rv-ai-in {
  display: flex;
  gap: 8px;
}
.rv-ai-in input {
  flex: 1;
  min-width: 0;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  padding: 0 12px;
  font: inherit;
  font-size: 15px;
}
.rv-edit {
  padding: 4px 16px 18px 52px;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
}
.rv-edit .full {
  grid-column: 1/-1;
}
.ef {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.ef .lab {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.ef input,.ef select {
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  padding: 0 10px;
  font-size: 16px;
  width: 100%;
  min-width: 0;
}
.ef input.w {
  font-size: 18px;
}
.ctx {
  font-family: var(--f-word);
  font-style: italic;
  font-size: 15px;
  color: var(--fg2);
  background: var(--src-bg);
  color: var(--src-fg);
  padding: 8px 10px;
  border-radius: 10px;
}
.savebar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  background: var(--bg);
  @supports (color: color-mix(in lab, red, red)) {
    background: color-mix(in srgb,var(--bg) 92%,transparent);
  }
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 12px max(20px,env(safe-area-inset-right,0px)) calc(12px + env(safe-area-inset-bottom,0px)) max(20px,env(safe-area-inset-left,0px));
}
.savebar .in {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
}
.savebar .btn {
  flex: 1;
}
.wd-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wd-word {
  font-family: var(--f-word);
  font-size: 46px;
  line-height: 1.02;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}
.wd-word .art {
  color: var(--muted);
  font-size: 30px;
}
.kv {
  display: flex;
  flex-direction: column;
}
.kv .r {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}
.kv .r:first-child {
  border-top: 0;
}
.kv .k {
  font-size: 13px;
  color: var(--muted);
  flex: none;
}
.kv .v {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: right;
  min-width: 0;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.kv .v .w {
  font-size: 18px;
}
.meaning {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.meaning .m {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.meaning .m span.t {
  font-size: 18px;
}
.fa,[dir="rtl"] {
  direction: rtl;
  font-family: var(--f-fa);
  font-style: normal;
  letter-spacing: 0;
  line-height: 1.7;
}
.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(150px + env(safe-area-inset-bottom,0px));
  z-index: 60;
  background: var(--btn);
  color: var(--btn-fg);
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 14px;
  box-shadow: var(--shadow);
  max-width: calc(100% - 40px);
}
.example-tag {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--sunk);
  color: var(--fg2);
}
.doc-card {
  background: var(--card);
  border-radius: 18px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.doc-card .h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.doc-card .h a {
  font-size: 16px;
  font-weight: 500;
  min-width: 0;
}
.thumbs4 {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 8px;
}
.seg {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 4px;
  background: var(--sunk);
  padding: 4px;
  border-radius: 12px;
}
.seg button {
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 13px;
  color: var(--fg2);
}
.seg button[aria-pressed="true"] {
  background: var(--card);
  color: var(--fg);
  font-weight: 500;
}
select.plain {
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 0 10px;
  font-size: 14px;
}
.backlink {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 44px;
  border: 0;
  background: none;
  padding: 0 8px 0 0;
  font-size: 17px;
  color: var(--fg);
}
.icon-btn.sm {
  width: 36px;
  height: 36px;
}
.wd-word {
  font-family: var(--f-word);
  font-weight: 400;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
}
.wd-word .art {
  color: var(--muted);
  font-size: .6em;
}
.wd-word .pfx,.pfx {
  color: var(--ai-fg);
}
.wd-word .refl {
  color: var(--muted);
  font-size: .6em;
}
.tag {
  height: 34px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  background: var(--sunk);
  font-size: 14px;
  color: var(--fg);
}
.lbl {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--muted);
  flex-wrap: wrap;
}
.lbl .o {
  font-family: var(--f-mono);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 3px 8px;
}
.meaning-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  font-size: 21px;
  flex-wrap: wrap;
}
.meaning-row .fa {
  font-size: 22px;
}
.src-card {
  background: var(--src-bg);
  @supports (color: color-mix(in lab, red, red)) {
    background: color-mix(in srgb,var(--src-bg) 28%,var(--card));
  }
  border: 1px solid var(--src-fg);
  @supports (color: color-mix(in lab, red, red)) {
    border: 1px solid color-mix(in srgb,var(--src-fg) 18%,var(--line));
  }
  border-radius: 20px;
  padding: 18px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.src-sent {
  margin: 0;
  font-size: 22px;
  line-height: 1.4;
}
mark.mk-src {
  background: var(--hl-on);
  color: inherit;
  border-radius: 4px;
  padding: 0 3px;
}
mark.mk-ai {
  background: none;
  color: var(--ai-fg);
  font-weight: 500;
  box-shadow: inset 0 -2px 0 var(--ai-fg);
  @supports (color: color-mix(in lab, red, red)) {
    box-shadow: inset 0 -2px 0 color-mix(in srgb,var(--ai-fg) 35%,transparent);
  }
}
.src-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--src-fg);
  font-size: 15px;
  font-weight: 500;
  align-self: flex-start;
  padding: 6px 0;
}
.cells {
  display: grid;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.cell {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-left: 1px solid var(--line);
  min-width: 0;
}
.cell:first-child {
  border-left: 0;
}
.cell .w {
  font-size: 21px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.cell-k {
  font-size: 13px;
  color: var(--muted);
}
.cell-sub {
  font-size: 12px;
  color: var(--muted);
}
.gnote {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg2);
}
.w.it {
  font-style: italic;
}
.ex-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ex {
  background: var(--card);
  border-radius: 16px;
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ex-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 28px;
}
.ex-use {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--muted);
  text-transform: uppercase;
}
.ex-de {
  margin: 0;
  font-size: 20px;
  line-height: 1.35;
}
.ex-fa {
  margin: 0;
  font-size: 15px;
  color: var(--fg2);
  text-align: right;
}
.ex.skel span {
  display: block;
  height: 14px;
  border-radius: 7px;
  background: var(--sunk);
}
.ex.skel span:first-child {
  width: 80%;
  height: 18px;
}
.ex.skel span:last-child {
  width: 50%;
  align-self: flex-end;
}
@media (max-width:380px) {
  .wd-word {
    font-size: 46px !important;
  }
  .cells {
    grid-template-columns: 1fr !important;
  }
  .cell {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .cell:first-child {
    border-top: 0;
  }
}
.fam-mean {
  font-size: 17px;
  color: var(--fg2);
}
.tree {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-left: 28px;
  margin-left: 8px;
}
.tree::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 34px;
  width: 1.5px;
  background: var(--line);
}
.fam-node {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px 14px 14px 18px;
  min-height: 72px;
}
.fam-node::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 50%;
  width: 28px;
  height: 1.5px;
  background: var(--line);
}
.fam-node.on {
  border: 1.5px solid var(--fg);
  background: var(--sunk);
  @supports (color: color-mix(in lab, red, red)) {
    background: color-mix(in srgb,var(--sunk) 55%,var(--card));
  }
}
.fam-l {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.fam-w {
  font-size: 24px;
  line-height: 1.15;
  display: flex;
  align-items: baseline;
  gap: 3px;
  flex-wrap: wrap;
}
.pchip {
  background: var(--ai-bg);
  color: var(--ai-fg);
  border-radius: 7px;
  padding: 0 6px;
}
.fam-w .rest {
  color: var(--fg2);
}
.fam-en {
  font-size: 14.5px;
  color: var(--fg2);
}
.fam-r {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.pg {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--src-fg);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.ai-box {
  background: var(--ai-bg);
  @supports (color: color-mix(in lab, red, red)) {
    background: color-mix(in srgb,var(--ai-bg) 45%,var(--bg));
  }
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pairs {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(140px,100%),1fr));
  gap: 10px;
}
.pair {
  background: var(--card);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.pair .w {
  font-size: 20px;
  font-weight: 500;
}
.pm {
  font-size: 14px;
  color: var(--fg2);
}
.fam-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border-radius: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
}
.fam-card .l {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
a.famlink {
  color: var(--fg);
  text-decoration: none;
}
.col-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
}
.col-card {
  background: var(--card);
  border-radius: 18px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.col-card .cover {
  height: 72px;
  border-radius: 12px;
  background: var(--ai-bg);
  color: var(--ai-fg);
  display: flex;
  align-items: flex-end;
  padding: 8px 10px;
  font-size: 24px;
  margin-bottom: 8px;
}
#app.swiping {
  transition: none;
  box-shadow: -10px 0 28px rgba(0,0,0,.12);
  background: var(--bg);
  will-change: transform;
}
#app.settling {
  transition: transform .2s cubic-bezier(.2,.8,.2,1);
  box-shadow: -10px 0 28px rgba(0,0,0,.12);
  background: var(--bg);
}
.swipe-shade {
  display: none;
  position: fixed;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}
#app.enter-back {
  animation: enterBack .22s cubic-bezier(.2,.8,.2,1);
}
@keyframes enterBack {
  from {
    transform: translateX(-28px);
    opacity: .55;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  #app.enter-back {
    animation: none;
  }
  #app.settling {
    transition: none;
  }
}
:root[data-app-theme="light"] {
  --bg: #F5F5F2;
  --card: #FFFFFF;
  --line: #E4E4DF;
  --sunk: #EBEBE6;
  --fg: #17181C;
  --fg2: #4A4D55;
  --muted: #63666E;
  --btn: #17181C;
  --btn-fg: #FFFFFF;
  --src-bg: #FBEFC2;
  --src-fg: #6B4E00;
  --hl: rgba(242,196,40,.38);
  --hl-on: rgba(242,180,20,.72);
  --ai-bg: #ECEBFD;
  --ai-fg: #3E3BB0;
  --you-bg: #DDF1E8;
  --you-fg: #1B6448;
  --warn-bg: #FDE7DA;
  --warn-fg: #8A3A0F;
  --scan: #0E0F12;
  --scan-2: #1C1D22;
  --shadow: 0 10px 28px rgba(23,24,28,.18);
  color-scheme: light;
}
:root[data-app-theme="dark"] {
  --bg: #111214;
  --card: #1A1B1F;
  --line: #2B2C31;
  --sunk: #232429;
  --fg: #EDEDEA;
  --fg2: #BDBEBA;
  --muted: #9C9EA5;
  --btn: #EDEDEA;
  --btn-fg: #111214;
  --src-bg: #3A300C;
  --src-fg: #F2D45C;
  --hl: rgba(242,200,60,.30);
  --hl-on: rgba(242,200,60,.62);
  --ai-bg: #25244C;
  --ai-fg: #BDBBFF;
  --you-bg: #0F2E22;
  --you-fg: #86DDB3;
  --warn-bg: #3B1E10;
  --warn-fg: #F4B48E;
  --shadow: 0 10px 28px rgba(0,0,0,.5);
  color-scheme: dark;
}
:root[data-app-theme="paper"] {
  --bg: #F2ECDF;
  --card: #FBF7EE;
  --line: #E1D8C6;
  --sunk: #E9E1D0;
  --fg: #2A251E;
  --fg2: #544B3F;
  --muted: #6B6153;
  --btn: #2A251E;
  --btn-fg: #FBF7EE;
  --src-bg: #F6E3A6;
  --src-fg: #674A05;
  --hl: rgba(236,186,40,.40);
  --hl-on: rgba(232,172,20,.72);
  --ai-bg: #E9E5F6;
  --ai-fg: #46409E;
  --you-bg: #DCEBDC;
  --you-fg: #2B5E37;
  --warn-bg: #F6DFCF;
  --warn-fg: #86380F;
  --scan: #14120F;
  --scan-2: #24211C;
  --shadow: 0 10px 28px rgba(60,45,20,.16);
  color-scheme: light;
}
:root[data-app-theme="paper"] body {
  background-image: radial-gradient(rgba(120,90,40,.035) 1px,transparent 1.2px);
  background-size: 5px 5px;
}
:root[data-app-theme="paper"] .card,:root[data-app-theme="paper"] .list,:root[data-app-theme="paper"] .ex,:root[data-app-theme="paper"] .fam-node {
  box-shadow: 0 1px 0 rgba(90,70,30,.06);
}
:root[data-app-theme="light"] .hlbox,:root[data-app-theme="paper"] .hlbox {
  mix-blend-mode: multiply;
}
:root[data-app-theme="dark"] .hlbox {
  mix-blend-mode: normal;
}
.seg.theme {
  grid-template-columns: repeat(4,minmax(0,1fr));
}
.seg.theme button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: auto;
  padding: 8px 0;
}
.swatch {
  width: 26px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid rgba(0,0,0,.15);
}
.src-head {
  align-items: flex-end;
}
.src-seg {
  padding: 4px;
  border-radius: 14px;
}
.src-seg button {
  height: 40px;
  font-size: 15px;
  border-radius: 11px;
}
.sp-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sp-h {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}
.sp-h .l {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sp-title {
  font-family: var(--f-word);
  font-size: 27px;
  line-height: 1.15;
  color: var(--fg);
}
.sp-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  margin: 0 -20px;
  padding: 0 20px 4px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.sp-row::-webkit-scrollbar {
  display: none;
}
.sp-card {
  flex: 0 0 108px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scroll-snap-align: start;
  min-width: 0;
}
.sp-img {
  aspect-ratio: 2/3;
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card) center/cover no-repeat;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.sp-t {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-m {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
@media (min-width:430px) {
  .sp-card {
    flex-basis: 124px;
  }
}
.ask-link {
  color: var(--ai-fg);
  font-size: 16px;
  height: auto;
  min-height: 52px;
  padding: 0 16px;
  gap: 10px;
  flex-wrap: nowrap;
}
.ask-link svg {
  flex: none;
}
.ask-link span {
  color: var(--muted);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.col-card .cover {
  height: 84px;
  border-radius: 12px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 8px 10px;
  font-size: 23px;
  margin-bottom: 8px;
  position: relative;
}
.col-card .cover-manual {
  background: var(--sunk);
  color: var(--fg);
}
.col-card div.cover-ai {
  background: var(--ai-bg);
  color: var(--ai-fg);
}
.col-card .cover-family {
  background: var(--ai-bg);
  @supports (color: color-mix(in lab, red, red)) {
    background: color-mix(in srgb,var(--ai-bg) 60%,var(--card));
  }
  color: var(--ai-fg);
}
.cover .w {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
span.cover-ai {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  display: flex;
}
.col-t {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.col-empty {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  text-align: left;
  padding: 16px;
  border-radius: 18px;
  border: 1.5px dashed var(--line);
  background: transparent;
  width: 100%;
}
.opt {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.opt .l {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.opt-i {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.opt-i.ai {
  background: var(--ai-bg);
  color: var(--ai-fg);
}
.text-in {
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 0 12px;
  font-size: 16px;
  flex: 1;
  min-width: 0;
  width: 100%;
}
.ask-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ask-box textarea {
  border: 0;
  outline: 0;
  background: transparent;
  resize: none;
  font-size: 18px;
  line-height: 1.4;
  width: 100%;
  font-family: var(--f-word);
}
.ai-thinking {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}
.sel-row {
  cursor: pointer;
  justify-content: flex-start;
}
.sel-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--fg);
  flex: none;
}
.pick-row {
  width: 100%;
  background: none;
  border: 0;
  border-top: 1px solid var(--line);
  text-align: left;
}
.pick-row:first-child {
  border-top: 0;
}
.tick {
  width: 26px;
  height: 26px;
  border-radius: 13px;
  border: 1.5px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex: none;
}
.tick.on {
  background: var(--btn);
  border-color: var(--btn);
  color: var(--btn-fg);
}
.aw-list {
  max-height: 46vh;
  overflow-y: auto;
}
.selbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(92px + env(safe-area-inset-bottom,0px));
  z-index: 22;
  padding: 0 max(20px,env(safe-area-inset-right,0px)) 0 max(20px,env(safe-area-inset-left,0px));
}
.selbar .in {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: var(--btn);
  color: var(--btn-fg);
  border-radius: 16px;
  padding: 8px 8px 8px 16px;
  box-shadow: var(--shadow);
}
.selbar .btn {
  background: var(--btn-fg);
  color: var(--btn);
}
.study {
  gap: 18px;
}
.prog {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--sunk);
  overflow: hidden;
}
.st-top {
  gap: 8px;
}
#study .fc {
  position: relative;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  transition: transform .22s ease;
}
#study .fc.dragging {
  transition: none;
  cursor: grabbing;
}
#study .fc.fly {
  transition: transform .17s ease-in;
}
#study .fc::after {
  content: '';
  position: absolute;
  top: 16px;
  padding: 6px 12px;
  border-radius: 10px;
  font: 700 15px/1 'Geist',system-ui,sans-serif;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: 2px solid;
  opacity: 0;
  transition: opacity .12s;
  pointer-events: none;
}
#study .fc[data-swipe="good"]::after {
  content: 'Good';
  left: 16px;
  color: #2E7D4F;
  border-color: #2E7D4F;
  opacity: 1;
  transform: rotate(8deg);
}
#study .fc[data-swipe="again"]::after {
  content: 'Again';
  right: 16px;
  color: var(--warn-fg);
  border-color: var(--warn-fg);
  opacity: 1;
  transform: rotate(-8deg);
}
#study .fc[data-swipe="show"]::after {
  content: 'Show';
  left: 50%;
  transform: translateX(-50%);
  color: var(--fg2);
  border-color: var(--line);
  opacity: 1;
}
.fc-hint {
  display: flex;
  justify-content: center;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
  margin-top: -4px;
}
.fc-hint span:first-child:not(:only-child) {
  color: var(--warn-fg);
}
.fc-hint span:last-child:not(:only-child) {
  color: #2E7D4F;
}
.st-strip {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: nowrap;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  height: 36px;
  align-items: center;
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  color: var(--fg2);
  cursor: pointer;
  white-space: nowrap;
}
.st-strip b {
  color: var(--fg);
  font-weight: 600;
}
.st-strip svg {
  flex: none;
  opacity: .6;
}
@media (max-width:400px) {
  .st-wk {
    display: none;
  }
}
.st-fire b::before {
  content: '● ';
  color: #E8833A;
  font-size: 10px;
  vertical-align: 1px;
}
.st-left {
  min-width: 32px;
  text-align: right;
  color: var(--fg2);
  font-size: 14px;
}
.st-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.st-modes {
  display: inline-flex;
  background: var(--sunk);
  border-radius: 999px;
  padding: 3px;
}
.st-modes button {
  border: 0;
  background: transparent;
  color: var(--fg2);
  font: 600 11.5px/1 'Geist Mono',ui-monospace,monospace;
  letter-spacing: .02em;
  padding: 7px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.st-modes button[aria-checked="true"] {
  background: var(--card);
  color: var(--fg);
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.st-col {
  font-size: 12px;
  color: var(--fg2);
  background: var(--sunk);
  padding: 6px 10px;
  border-radius: 999px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.st-note {
  text-align: center;
  font-size: 12.5px;
  color: var(--ai-fg);
  background: var(--ai-bg);
  padding: 7px 12px;
  border-radius: 10px;
}
.st-sheet {
  gap: 16px;
}
.st-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.st-box {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.st-box b {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.st-box .sub {
  font-size: 12.5px;
}
.st-bars {
  display: grid;
  grid-template-columns: repeat(7,1fr);
  gap: 8px;
  height: 150px;
  align-items: end;
  padding-top: 6px;
}
.st-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}
.st-bar .b {
  width: 100%;
  max-width: 30px;
  min-height: 3px;
  border-radius: 6px 6px 3px 3px;
  background: var(--sunk);
  border: 1px solid var(--line);
}
.st-bar.today .b {
  background: var(--fg);
  border-color: var(--fg);
}
.st-bar .n {
  font: 500 11px/1 'Geist Mono',monospace;
  color: var(--fg2);
}
.st-bar .d {
  font-size: 11px;
  color: var(--fg2);
}
.prog span {
  display: block;
  height: 100%;
  background: var(--fg);
  border-radius: 3px;
  transition: width .3s;
}
.fc {
  background: var(--card);
  border-radius: 24px;
  padding: 18px 20px 22px;
  min-height: 330px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 1px 0 rgba(0,0,0,.03),0 12px 30px rgba(0,0,0,.05);
}
.fc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 36px;
}
.fc-ask {
  font-size: 13px;
  color: var(--muted);
  font-family: var(--f-mono);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.fc-word {
  font-size: 50px;
  line-height: 1.05;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
  margin: 6px 0;
}
.fc-word .art {
  color: var(--muted);
  font-size: .6em;
}
.fc-mean {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 22px;
  flex-wrap: wrap;
}
.fc-ex {
  margin: 0;
  font-size: 21px;
  line-height: 1.45;
  color: var(--fg2);
}
.gap {
  display: inline-block;
  min-width: 48px;
  border-bottom: 2px solid var(--ai-fg);
  color: transparent;
  line-height: 1.1;
}
.fc-back {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}
.fc-sent {
  background: var(--bg);
  border-radius: 14px;
  padding: 12px 14px;
}
.fc-sent p {
  margin: 0;
}
.fc-sent p.w {
  font-size: 19px;
  line-height: 1.4;
}
.fc-sent p.fa {
  text-align: right;
  margin-top: 4px;
}
.fc-src {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--src-fg);
  font-size: 14px;
  align-self: flex-start;
  padding: 4px 0;
}
.grades {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 8px;
}
.grade {
  height: 64px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 15px;
  font-weight: 500;
}
.grade small {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.grade.g1 {
  color: var(--warn-fg);
}
.grade.g3 {
  background: var(--btn);
  color: var(--btn-fg);
  border-color: var(--btn);
}
.grade.g3 small {
  color: inherit;
  opacity: .7;
}
.study-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border-radius: 18px;
  padding: 16px 16px 16px 18px;
  border: 1px solid var(--line);
}
.study-card .l {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sc-n {
  font-size: 17px;
}
.sc-n b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.sc-go {
  height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  background: var(--you-bg);
  color: var(--you-fg);
  display: flex;
  align-items: center;
  font-weight: 600;
}
.mem {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--muted);
}
.mem .dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--muted);
}
.mem .dot.review {
  background: var(--you-fg);
}
.mem .dot.learning,.mem .dot.relearning {
  background: var(--src-fg);
}
.wd-word.ph {
  font-size: 40px;
  line-height: 1.1;
}
.wd-word.ph-l {
  font-size: 32px;
  line-height: 1.15;
}
.row .w {
  overflow-wrap: anywhere;
}
.hlbox.ph {
  background: transparent;
  mix-blend-mode: normal !important;
  border-bottom: 2.5px solid var(--ai-fg);
  @supports (color: color-mix(in lab, red, red)) {
    border-bottom: 2.5px solid color-mix(in srgb,var(--ai-fg) 70%,transparent);
  }
  border-radius: 2px;
}
.hlbox.ph.on {
  background: var(--ai-bg);
  @supports (color: color-mix(in lab, red, red)) {
    background: color-mix(in srgb,var(--ai-bg) 70%,transparent);
  }
  outline: 2px solid var(--ai-fg);
}
.mode-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mode {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}
.mode .l {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.mode-t {
  font-size: 21px;
  font-weight: 500;
}
.mode-n {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}
.mode.last {
  border: 1.5px solid var(--fg);
}
.fc-fa {
  font-size: 30px;
  line-height: 1.3;
  text-align: right;
}
.col-list {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
}
.col-row {
  display: flex;
  align-items: stretch;
  border-top: 1px solid var(--line);
}
.col-row:first-child {
  border-top: 0;
}
.col-main {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 12px;
  padding: 14px 12px 14px 14px;
  align-items: flex-start;
}
.col-main .l {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.ci {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  font-size: 20px;
}
.ci.ai {
  background: var(--ai-bg);
  color: var(--ai-fg);
}
.ci.fam {
  background: var(--ai-bg);
  @supports (color: color-mix(in lab, red, red)) {
    background: color-mix(in srgb,var(--ai-bg) 55%,var(--card));
  }
  color: var(--ai-fg);
  font-size: 17px;
}
.ci.man {
  background: var(--sunk);
  color: var(--fg);
}
.col-main .meta {
  font-size: 13px;
  color: var(--muted);
}
.col-t {
  font-weight: 500;
  font-size: 16px;
}
.col-prev {
  font-size: 15px;
  color: var(--fg2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--sunk);
  overflow: hidden;
  margin-top: 4px;
  max-width: 180px;
}
.bar span {
  display: block;
  height: 100%;
  background: var(--you-fg);
  border-radius: 2px;
}
.col-study {
  flex: none;
  width: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  border-left: 1px solid var(--line);
  color: var(--you-fg);
  background: var(--you-bg);
  @supports (color: color-mix(in lab, red, red)) {
    background: color-mix(in srgb,var(--you-bg) 45%,var(--card));
  }
}
.col-study b {
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.col-study small {
  font-size: 11.5px;
}
.col-study.idle {
  background: transparent;
  color: var(--muted);
}
.ver-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 0 2px;
  border-top: 1px solid var(--line);
  margin-top: 6px;
}
.ver-row .l {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ver-link {
  font-size: 14px;
  color: var(--ai-fg);
  font-weight: 500;
}
.cl {
  background: var(--card);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cl[dir="rtl"] {
  font-family: var(--f-fa);
  line-height: 1.8;
}
.cl-h {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}
.cl-v {
  font-family: var(--f-word);
  font-size: 28px;
}
.cl[dir="rtl"] .cl-v {
  font-family: var(--f-fa);
  font-size: 24px;
  font-weight: 600;
}
.cl-sub {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 6px;
}
.cl-sec {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 6px;
}
.cl-sec h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
}
.cl-sec ul {
  margin: 0;
  padding-inline-start: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cl-sec li {
  font-size: 14.5px;
  color: var(--fg2);
  line-height: 1.6;
}
.cl[dir="rtl"] .cl-sec li {
  line-height: 1.9;
}
.peek-sheet {
  padding-top: 8px;
  overflow-x: hidden;
}
.peek {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.peek-top {
  display: flex;
  align-items: center;
  gap: 4px;
}
.peek-top button[disabled] {
  opacity: .3;
}
.peek-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  touch-action: pan-y;
  will-change: transform;
  min-height: 280px;
}
.pk-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.pk-word {
  font-family: var(--f-word);
  font-weight: 400;
  font-size: 40px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.pk-word .art {
  color: var(--muted);
  font-size: .6em;
}
.pk-word.ph {
  font-size: 28px;
  line-height: 1.2;
}
.pk-mean {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pk-src {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--src-bg);
  @supports (color: color-mix(in lab, red, red)) {
    background: color-mix(in srgb,var(--src-bg) 28%,var(--card));
  }
  border: 1px solid var(--src-fg);
  @supports (color: color-mix(in lab, red, red)) {
    border: 1px solid color-mix(in srgb,var(--src-fg) 18%,var(--line));
  }
  border-radius: 16px;
  padding: 12px 14px;
}
.pk-sent {
  font-size: 18px;
  line-height: 1.45;
  color: var(--fg);
}
.pk-ex {
  background: var(--bg);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pk-ex p {
  margin: 0;
}
.pk-ex p.w {
  font-size: 18px;
  line-height: 1.4;
}
.pk-ex p.fa {
  text-align: right;
}
.peek-sheet {
  max-height: 92vh;
  padding-top: 0;
}
.peek-sheet .grab {
  display: none;
}
.peek-top {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--card);
  padding: 14px 0 8px;
  margin: 0 -4px;
  border-bottom: 1px solid transparent;
}
.peek-top::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  width: 40px;
  height: 5px;
  margin-left: -20px;
  border-radius: 3px;
  background: var(--line);
}
.in-sheet {
  gap: 20px;
  padding-bottom: 8px;
}
.in-sheet .wd-word {
  font-size: 46px;
}
.in-sheet .wd-word.ph {
  font-size: 34px;
}
.in-sheet .wd-word.ph-l {
  font-size: 28px;
}
.in-sheet .ex,.in-sheet .cells,.in-sheet .card,.in-sheet .list,.in-sheet .fam-card,.in-sheet .cell {
  background: var(--bg);
}
.in-sheet .cell .w {
  font-size: 18px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.sheet {
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.sheet-bg {
  touch-action: none;
  overscroll-behavior: contain;
}
select.plain.on {
  background: var(--btn);
  color: var(--btn-fg);
  border-color: var(--btn);
}
.prof-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.home-acts {
  display: flex;
  align-items: center;
  gap: 8px;
}
.prof-btn {
  width: 40px;
  height: 40px;
  background: var(--card) !important;
  border: 1px solid var(--line) !important;
  color: var(--fg) !important;
}
.top .scan-btn {
  flex: none;
  margin-left: 2px;
}
.top-acts {
  display: flex;
  align-items: center;
  gap: 8px;
}
.scan-btn {
  width: 40px;
  height: 40px;
  background: var(--btn) !important;
  color: var(--btn-fg) !important;
  border: 0 !important;
}
.chat-fab {
  position: fixed;
  right: max(16px, calc((100% - var(--dl-w,0px) - 520px)/2 + var(--dl-w,0px) + 16px));
  bottom: calc(98px + env(safe-area-inset-bottom,0px));
  z-index: 30;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  border: 0;
  background: var(--ai-fg);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(60,50,150,.28);
  cursor: pointer;
}
.chat-fab svg {
  width: 24px;
  height: 24px;
}
.chat-fab.lift {
  bottom: calc(104px + env(safe-area-inset-bottom,0px));
}
.chat-fab[hidden] {
  display: none;
}
.chat-fab.on-sheet {
  z-index: 55;
  bottom: calc(20px + env(safe-area-inset-bottom,0px));
}
html.chat-open #chatpane {
  z-index: 56;
}
#chatpane {
  position: fixed;
  z-index: 48;
  left: 0;
  right: var(--dl-w,0px);
  bottom: 0;
  margin-inline: auto;
  width: min(520px,100%);
  height: min(66vh,640px);
  background: var(--bg);
  @supports (color: color-mix(in lab, red, red)) {
    background: color-mix(in srgb,var(--bg) 50%,transparent);
  }
  backdrop-filter: blur(8px) saturate(1.2);
  -webkit-backdrop-filter: blur(8px) saturate(1.2);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -14px 40px rgba(0,0,0,.16);
  display: flex;
  flex-direction: column;
  transition: height .22s ease;
}
#chatpane.full {
  height: calc(100% - 56px - env(safe-area-inset-top,0px));
}
#chatpane.dragging {
  transition: none;
}
#chatpane[hidden] {
  display: none;
}
html.chat-open #app {
  padding-bottom: calc(min(66vh,640px) + 24px);
}
.cp-grab {
  display: flex;
  justify-content: center;
  padding: 8px 0 2px;
  cursor: grab;
  touch-action: none;
}
.cp-grab span {
  width: 40px;
  height: 5px;
  border-radius: 3px;
  background: var(--line);
}
@media (min-width:900px) {
  html {
    --dl-w: 0px;
    --cp-w: 0px;
  }
  html.dl-open {
    --dl-w: 364px;
  }
  #chatpane {
    right: var(--dl-w);
  }
  html.chat-open body, html.dl-open body {
    padding-right: calc(var(--dl-w) + var(--cp-w));
  }
  html.chat-open nav.tabs, html.chat-open .savebar, html.chat-open .scanwrap, html.chat-open .study-actions, html.chat-open .selbar, html.chat-open .sheet, html.chat-open .sheet-bg, html.chat-open .chat-in, html.dl-open nav.tabs, html.dl-open .savebar, html.dl-open .scanwrap, html.dl-open .study-actions, html.dl-open .selbar, html.dl-open .sheet, html.dl-open .sheet-bg, html.dl-open .chat-in {
    right: calc(var(--dl-w) + var(--cp-w));
  }
  html.chat-open .toast, html.dl-open .toast {
    left: calc((100% - var(--dl-w) - var(--cp-w))/2);
  }
}
.cp-head {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 8px 8px 18px;
  border-bottom: 1px solid var(--line);
}
.cp-head .l {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.cp-head b {
  font-size: 16px;
}
.cp-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cp-foot {
  border-top: 1px solid var(--line);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom,0px));
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: transparent;
}
.cp-hints {
  flex-wrap: nowrap;
}
.cp-hints .chip {
  flex: none;
  height: 32px;
  font-size: 13px;
}
.cp-ctx {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: var(--src-fg);
  background: var(--src-bg);
  padding: 6px 10px;
  border-radius: 10px;
}
.cp-ctx > span {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.cp-ctx > span > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cp-ctx svg {
  flex: none;
  width: 14px;
  height: 14px;
}
.cp-ctx.off {
  background: var(--sunk);
  color: var(--fg2);
}
.cp-in {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.cp-in textarea {
  flex: 1;
  min-width: 0;
  resize: none;
  min-height: 44px;
  max-height: 140px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  padding: 11px 13px;
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
}
.cp-in .btn {
  height: 44px;
}
.cp-hist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cp-th {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  font: inherit;
  cursor: pointer;
}
.cp-th.on {
  border-color: var(--fg);
}
.cp-th .l {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cp-th .t {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.icon-btn[aria-pressed="true"] {
  background: var(--sunk);
}
.cm-ctx {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--fg2);
  margin-bottom: -8px;
}
.cm-ctx svg {
  width: 12px;
  height: 12px;
}
.ask-btn {
  background: var(--ai-bg) !important;
  color: var(--ai-fg) !important;
  border: 0 !important;
  width: 40px;
  height: 40px;
}
.chat .cm-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 90px;
}
.chat-empty {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  margin-top: 18px;
}
.chat-empty h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -.01em;
}
.chat-empty p {
  margin: 0;
}
.cm {
  max-width: 88%;
  font-size: 15px;
  line-height: 1.6;
}
.cm.user {
  align-self: flex-end;
  background: var(--btn);
  color: var(--btn-fg);
  padding: 9px 13px;
  border-radius: 16px 16px 4px 16px;
  white-space: pre-wrap;
}
.cm.ai {
  align-self: stretch;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cm-t {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 11px 14px;
  border-radius: 16px 16px 16px 4px;
  white-space: pre-wrap;
  align-self: flex-start;
  max-width: 92%;
}
.cw-list {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.cw {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px 11px 14px;
  border-top: 1px solid var(--line);
}
.cw:first-child {
  border-top: 0;
}
.cw-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cw-l {
  font-size: 19px;
}
.cw-ex {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  color: var(--fg2);
  margin-top: 3px;
  gap: 1px;
}
.cw-ex .w {
  font-size: 14.5px;
  font-style: italic;
  color: var(--fg);
}
.cw-st {
  flex: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: 999px;
  padding: 7px 11px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  font-family: inherit;
  cursor: pointer;
}
.cw-st svg {
  width: 14px;
  height: 14px;
}
.cw-st.add {
  background: var(--btn);
  color: var(--btn-fg);
}
.cw-st.in {
  background: var(--src-bg);
  color: var(--src-fg);
}
.cw-st.done {
  background: var(--you-bg);
  color: var(--you-fg);
}
.chat-in > .in {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.chat-in {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom,0px));
  background: var(--bg);
  @supports (color: color-mix(in lab, red, red)) {
    background: color-mix(in srgb,var(--bg) 92%,transparent);
  }
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
.chat-in textarea {
  flex: 1;
  min-width: 0;
  resize: none;
  min-height: 46px;
  max-height: 140px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  padding: 12px 14px;
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
}
.chat-in .btn {
  height: 46px;
}
@media (min-width:900px) {
  html.dl-open .chat-in {
    right: var(--dl-w);
  }
}
.scan-doc {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sdoc-card,.doc-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.doc-cover {
  width: 40px;
  height: 52px;
  flex: none;
  border-radius: 7px;
  background: var(--sunk) center/cover no-repeat;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--fg2);
}
.doc-cover.new {
  border-style: dashed;
}
.sdoc-card .l,.doc-opt .l {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.doc-t {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.doc-chg {
  font-size: 14px;
  color: var(--link,var(--src-fg));
  font-weight: 500;
}
.doc-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.doc-opt[aria-pressed="true"] {
  border-color: var(--fg);
}
.new-doc {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.doc-cover.kind {
  background: var(--src-bg);
  color: var(--src-fg);
  border-color: transparent;
}
.new-pill {
  display: inline-block;
  font: 600 10px/1 'Geist',system-ui,sans-serif;
  letter-spacing: .02em;
  text-transform: none;
  background: var(--you-bg);
  color: var(--you-fg);
  padding: 3px 6px;
  border-radius: 6px;
  vertical-align: 1px;
}
.nd-form {
  gap: 18px;
}
.nd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nd-head h2 {
  margin: 0;
  font-size: 18px;
}
.nd-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nd-field label,.nd-field .lab-t {
  font-size: 13px;
  color: var(--fg2);
  font-weight: 500;
}
.nd-field input {
  height: 52px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: 18px;
  width: 100%;
}
.nd-field input:focus {
  outline: 2px solid var(--fg);
  outline-offset: -1px;
}
.nd-kinds {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.nd-kind {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  font: inherit;
  text-align: left;
  cursor: pointer;
  min-height: 104px;
}
.nd-kind .ic {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--sunk);
  color: var(--fg2);
  margin-bottom: 4px;
}
.nd-kind .t {
  font-weight: 600;
  font-size: 15px;
}
.nd-kind .h {
  font-size: 12px;
  color: var(--fg2);
  line-height: 1.35;
}
.nd-kind[aria-checked="true"] {
  border: 2px solid var(--fg);
  padding: 11px;
}
.nd-kind[aria-checked="true"] .ic {
  background: var(--src-bg);
  color: var(--src-fg);
}
.new-doc .text-in {
  height: 48px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  font: inherit;
  font-size: 16px;
  width: 100%;
}
.page-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.page-row label {
  font-size: 14px;
  color: var(--fg2);
}
.stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  overflow: hidden;
}
.stepper button {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--fg);
  font-size: 20px;
  cursor: pointer;
}
.stepper input {
  width: 110px;
  height: 44px;
  border: 0;
  border-inline: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  text-align: center;
  font: inherit;
  font-size: 16px;
}
.dl-tools {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--sunk);
}
.dl-tools-h {
  font: 600 10px/1 'Geist Mono',monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--fg2);
}
.dl-samples {
  display: flex;
  gap: 8px;
}
.dl-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}
.dl-go {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  font: inherit;
  font-size: 14px;
  padding: 0 10px;
}
.dl-samples button {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: var(--fg2);
  font: inherit;
}
.dl-samples span {
  display: block;
  aspect-ratio: 3/4;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card) center/cover no-repeat;
}
.dl-samples small {
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#devlog {
  position: fixed;
  z-index: 45;
  right: 12px;
  top: calc(12px + env(safe-area-inset-top,0px));
  font-size: 13px;
  line-height: 1.5;
  color: var(--fg);
}
#devlog.open {
  width: min(360px,calc(100vw - 24px));
  max-height: min(62vh,640px);
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
#devlog:not(.open) {
  top: auto;
  right: 0;
  bottom: calc(196px + env(safe-area-inset-bottom,0px));
}
#devlog:not(.open) .dl-tab {
  border-radius: 12px 0 0 12px;
  border-right: 0;
}
@media (min-width:900px) {
  #devlog.open {
    top: 12px;
    bottom: 12px;
    max-height: none;
    width: 340px;
  }
}
@media (max-width:899px) {
  #devlog.open {
    inset: 0;
    width: auto;
    max-height: none;
    border-radius: 0;
    border: 0;
    z-index: 70;
    padding-top: env(safe-area-inset-top,0px);
  }
  html.dl-open body {
    overflow: hidden;
  }
}
.dl-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 6px 9px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg2);
  font: 600 11px/1.2 'Geist Mono',ui-monospace,monospace;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: .92;
}
.dl-tab span {
  font: 500 9px/1 'Geist',system-ui,sans-serif;
  letter-spacing: .02em;
}
.dl-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px 10px 14px;
  border-bottom: 1px solid var(--line);
}
.dl-head b {
  font-size: 14px;
}
.dl-badge {
  font: 700 10px/1 'Geist Mono',monospace;
  background: var(--warn-bg);
  color: var(--warn-fg);
  padding: 4px 6px;
  border-radius: 6px;
}
.dl-cur {
  font: 500 12px/1 'Geist Mono',monospace;
  color: var(--fg2);
}
.dl-langs {
  margin-left: auto;
  display: flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.dl-langs button {
  border: 0;
  background: transparent;
  color: var(--fg2);
  font: 600 11px/1 'Geist Mono',monospace;
  padding: 5px 7px;
  cursor: pointer;
}
.dl-langs button[aria-pressed="true"] {
  background: var(--btn);
  color: var(--btn-fg);
}
.dl-x {
  border: 0;
  background: transparent;
  color: var(--fg2);
  display: flex;
  padding: 4px;
  cursor: pointer;
}
.dl-x svg {
  width: 18px;
  height: 18px;
}
.dl-body {
  overflow-y: auto;
  padding: 6px 14px 14px;
  overscroll-behavior: contain;
}
.dl-body[dir="rtl"] {
  font-family: 'Vazirmatn',system-ui,sans-serif;
}
.dl-rel {
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}
.dl-rel:last-child {
  border-bottom: 0;
}
.dl-rel summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}
.dl-rel summary::-webkit-details-marker {
  display: none;
}
.dl-v {
  font: 600 12px/1 'Geist Mono',monospace;
  color: var(--src-fg);
  background: var(--src-bg);
  padding: 3px 6px;
  border-radius: 6px;
  direction: ltr;
}
.dl-t {
  font-weight: 600;
  flex: 1;
}
.dl-d {
  color: var(--fg2);
  font-size: 11px;
  white-space: nowrap;
}
.dl-sec h4 {
  margin: 10px 0 2px;
  font-size: 12px;
  color: var(--fg2);
  font-weight: 600;
}
.dl-sec ul {
  margin: 0;
  padding-inline-start: 18px;
}
.dl-sec li {
  margin: 3px 0;
}
.ci.smart,.opt-i.smart {
  background: var(--src-bg);
  color: var(--src-fg);
}
.o-rule {
  background: var(--src-bg);
  color: var(--src-fg);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.rule-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px dashed var(--line);
  background: var(--card);
}
.rule-box .lbl {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--fg2);
}
.chip.static {
  cursor: default;
  height: 32px;
  font-size: 13px;
}
.grp-pick {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.grp-pick .chip {
  height: 34px;
}
.sg-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sg {
  background: var(--card);
  border-radius: 16px;
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid var(--line);
}
.sg-h {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.sg-t {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.sg-t.w {
  font-size: 22px;
  font-weight: 500;
}
.sg-n {
  font: 500 12px/1 'Geist Mono',ui-monospace,monospace;
  color: var(--fg2);
  background: var(--sunk);
  padding: 4px 7px;
  border-radius: 999px;
}
.sg-acts {
  margin-left: auto;
  display: flex;
  gap: 12px;
}
.link.sm {
  font-size: 13px;
  padding: 0;
}
.sg-words {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.wchip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--sunk);
  color: var(--fg);
  text-decoration: none;
  max-width: 100%;
}
.wchip .w {
  font-size: 17px;
}
.wchip .g {
  font-size: 12px;
  color: var(--fg2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.sb-step {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sb-step h2 {
  margin: 0;
  font-size: 18px;
}
.sb-n {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--btn);
  color: var(--btn-fg);
  display: grid;
  place-items: center;
  font: 600 12px/1 'Geist Mono',monospace;
}
button.opt {
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.lang-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 10px 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg2);
  font: 500 12px/1 'Geist Mono',ui-monospace,monospace;
  letter-spacing: .02em;
  cursor: pointer;
  white-space: nowrap;
}
.lang-pill svg {
  width: 14px;
  height: 14px;
}
.lang-now {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lang-big {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -.01em;
}
.lib-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.lib-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  color: var(--fg);
  font: inherit;
  text-align: left;
  cursor: pointer;
  min-height: 56px;
}
.lib-row:first-child {
  border-top: 0;
}
.lib-row .l {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lib-row[aria-pressed="true"] {
  background: var(--sunk);
}
.lang-sel {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  font: inherit;
  font-size: 16px;
  padding: 0 10px;
}
.sheet-in .ef {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.prof-src {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border-radius: 18px;
  padding: 14px 16px;
}
.prof-src .l {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
@media (prefers-reduced-motion: reduce) {
  nav.tabs .ind,nav.tabs a,nav.tabs a svg {
    transition: none;
  }
}
:root[data-theme="dark"] nav.tabs .in,:root[data-app-theme="dark"] nav.tabs .in {
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-app-theme="light"]):not([data-app-theme="paper"]) nav.tabs .in {
    box-shadow: 0 10px 30px rgba(0,0,0,.45);
  }
}
.smart {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#home-results:empty {
  display: none;
}
.smart-h {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-family: var(--f-mono);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ai-fg);
}
.chip.smart-chip {
  height: 34px;
  padding: 0 12px;
  border-color: var(--ai-fg);
  @supports (color: color-mix(in lab, red, red)) {
    border-color: color-mix(in srgb,var(--ai-fg) 25%,var(--line));
  }
  color: var(--ai-fg);
  background: var(--ai-bg);
  @supports (color: color-mix(in lab, red, red)) {
    background: color-mix(in srgb,var(--ai-bg) 40%,var(--card));
  }
}
.chip.smart-chip .n {
  color: var(--ai-fg);
  @supports (color: color-mix(in lab, red, red)) {
    color: color-mix(in srgb,var(--ai-fg) 70%,transparent);
  }
}
.chip.smart-chip[aria-pressed="true"] {
  background: var(--ai-fg);
  color: var(--card);
  border-color: var(--ai-fg);
}
.chip.smart-chip[aria-pressed="true"] .n {
  color: inherit;
}
.g-row {
  align-items: center;
  justify-content: flex-start;
}
.g-row .l {
  flex: 1;
}
.g-ic {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--you-bg);
  color: var(--you-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-word);
  font-size: 20px;
  flex: none;
}
.g-t {
  font-family: var(--f-word);
  font-size: 18px;
  line-height: 1.25;
}
.g-title {
  font-family: var(--f-word);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -.005em;
}
.g-sum {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.g-sum p.fa {
  margin: 0;
  font-size: 17px;
  line-height: 1.9;
}
.g-table-wrap {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
}
.g-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 280px;
}
.g-table th {
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  color: var(--fg2);
  background: var(--sunk);
  padding: 10px 12px;
}
.g-table td {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  font-size: 17px;
}
.g-table td.fa {
  text-align: right;
  font-size: 15px;
}
.g-rules {
  margin: 0;
  padding-inline-start: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.g-rules li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.g-rules li .fa {
  font-size: 16px;
  line-height: 1.8;
}
.g-rules li .sub {
  font-size: 13.5px;
}
.gbox {
  position: absolute;
  border: 2px dashed var(--you-fg);
  @supports (color: color-mix(in lab, red, red)) {
    border: 2px dashed color-mix(in srgb,var(--you-fg) 70%,transparent);
  }
  border-radius: 8px;
  background: var(--you-bg);
  @supports (color: color-mix(in lab, red, red)) {
    background: color-mix(in srgb,var(--you-bg) 18%,transparent);
  }
  padding: 0;
}
.gbox.on {
  background: var(--you-bg);
  @supports (color: color-mix(in lab, red, red)) {
    background: color-mix(in srgb,var(--you-bg) 40%,transparent);
  }
  border-style: solid;
}
.gtag {
  position: absolute;
  top: -1px;
  left: -1px;
  transform: translateY(-100%);
  background: var(--you-fg);
  color: var(--card);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px 6px 0 0;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
a.stat {
  color: inherit;
}
.g-rules li .fa {
  text-align: right;
}
bdi.fa {
  display: inline;
}
.g-fa {
  font-size: 14px;
  color: var(--fg2);
  text-align: right;
  line-height: 1.6;
}
