/* Writing Studio — floating vocabulary panel (Practice Mode only). Never shown in Strict Exam. */
.pr-helpers { flex-wrap: wrap; }
.pr-vocab-btn,
.pr-answer-btn {
  flex: 0 0 auto;
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  font: 650 13px/1 var(--font-ui);
  letter-spacing: .02em;
}
.pr-helpers .pr-vocab-btn { margin-left: 0; }

.vocab-float {
  position: fixed;
  z-index: 240;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: 340px;
  max-width: calc(100vw - 16px);
  min-width: 240px;
  height: 57vh;
  max-height: calc(100dvh - 16px);
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 70%, var(--glass-edge, #fff));
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface, #fff) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.35) blur(16px);
  backdrop-filter: saturate(1.35) blur(16px);
  box-shadow: 0 10px 32px color-mix(in srgb, var(--ink, #000) 22%, transparent),
              inset 0 1px 0 color-mix(in srgb, #fff 55%, transparent);
  color: var(--text);
}
[data-theme=dark] .vocab-float {
  background: color-mix(in srgb, var(--surface, #1a1c22) 88%, #000);
  box-shadow: 0 12px 36px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.08);
}
.vocab-float[hidden] { display: none !important; }
.vocab-float.is-dragging,
.vocab-float.is-resizing { user-select: none; -webkit-user-select: none; }

.vocab-float-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: none;
  min-height: 48px;
  padding: 4px 4px 4px 12px;
  cursor: grab;
  touch-action: none;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}
.vocab-float.is-dragging .vocab-float-head { cursor: grabbing; }
.vocab-float-titles { min-width: 0; flex: 1 1 auto; }
.vocab-float-head .eyebrow {
  margin: 0;
  font: 650 10px/1.2 var(--font-ui);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.vocab-float-head h2 {
  margin: 1px 0 0;
  font: 650 14px/1.25 var(--font-head, var(--font-ui));
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vocab-float-actions { display: flex; flex: none; }
.vocab-float-actions .icon-btn { width: 44px; height: 44px; }

.vocab-float-main {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.vocab-float.is-collapsed {
  height: auto !important;
  min-height: 0;
}
.vocab-float.is-collapsed .vocab-float-main,
.vocab-float.is-collapsed .vocab-resize { display: none; }
.vocab-float.is-collapsed .vocab-float-head { border-bottom: 0; }

.vocab-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: none;
  padding: 8px 10px 8px;
}
.vocab-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--line) 55%, var(--surface, #fff));
}
.vocab-tab {
  appearance: none;
  flex: 1 1 0;
  min-height: 40px;
  min-width: 0;
  margin: 0;
  padding: 4px 6px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: 650 11.5px/1.2 var(--font-ui);
  cursor: pointer;
  text-align: center;
  white-space: normal;
  -webkit-tap-highlight-color: transparent;
}
.vocab-tab.is-on {
  background: var(--surface, #fff);
  color: var(--text);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--ink, #000) 16%, transparent);
}
.vocab-tab:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.vocab-search {
  width: 100%;
  box-sizing: border-box;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface, #fff);
  color: var(--text);
  font: 400 16px/1.3 var(--font-ui);
}
.vocab-search:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.vocab-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0 10px 14px;
  -webkit-overflow-scrolling: touch;
}

.vocab-sec { margin: 0 0 14px; }
.vocab-sec h3 {
  margin: 0 0 6px;
  font: 650 12.5px/1.3 var(--font-ui);
  color: var(--muted);
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.vocab-count {
  font: 650 11px/1 var(--font-ui);
  color: var(--text);
  background: color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 999px;
  padding: 2px 6px;
}

.vocab-item {
  margin: 0 0 7px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface, #fff) 78%, transparent);
}
.vocab-item-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin: 0 0 2px;
}
.vocab-word {
  margin: 0;
  font: 700 14.5px/1.3 var(--font-ui);
  color: var(--text);
}
.vocab-pos {
  font: 500 11.5px/1.3 var(--font-ui);
  color: var(--muted);
}
.vocab-bn {
  margin: 0 0 4px;
  font: 500 13.5px/1.45 "Noto Sans Bengali", "Nirmala UI", "SolaimanLipi", sans-serif;
  color: var(--text);
}
.vocab-ex {
  margin: 0;
  font: 400 13px/1.45 var(--font-essay, var(--font));
  color: var(--text);
}
.vocab-ex mark {
  background: color-mix(in srgb, #e0b44a 42%, transparent);
  color: inherit;
  padding: 0 .12em;
  border-radius: 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  font-weight: 650;
}
[data-theme=dark] .vocab-ex mark {
  background: color-mix(in srgb, #e0b44a 32%, transparent);
}
.vocab-empty {
  margin: 8px 0 0;
  font: 500 13.5px/1.45 var(--font-ui);
  color: var(--muted);
}

.vocab-resize {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 22px;
  height: 22px;
  cursor: nwse-resize;
  touch-action: none;
}
.vocab-float { position: fixed; }
.vocab-resize::before {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 9px;
  height: 9px;
  border-right: 2px solid color-mix(in srgb, var(--muted) 70%, transparent);
  border-bottom: 2px solid color-mix(in srgb, var(--muted) 70%, transparent);
  border-radius: 0 0 2px 0;
}

@media (max-width: 899.98px) {
  .vocab-float {
    width: 92vw;
    height: 43vh;
  }
  .vocab-tab { font-size: 11px; padding: 4px 4px; min-height: 38px; }
}

.vocab-starter .vocab-word { font-size: 13.5px; }
