/* Views */
.view-panel {
  background: var(--surface-color);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  min-height: 300px;
  border: 1px solid var(--border-color);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.feature-display {
  max-width: 65ch;
  overflow-y: auto;
  height: 100%;
}

.feature-display h2 {
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--secondary-accent);
  padding-bottom: 0.5rem;
  display: inline-block;
  color: var(--text-primary);
}

#display-content {
  color: var(--text-primary);
  line-height: 1.7;
}

/* Grid View */
.grid-view-wrapper {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  align-items: stretch;
  height: 100%;
  min-height: 0;
}

.grid-info-panel {
  flex: 1;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
}

.grid-info-panel h3, #grid-info-title, #freq-info-title {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--secondary-accent);
  padding-bottom: 0.4rem;
  display: inline-block;
  color: var(--text-primary);
  flex-shrink: 0;
}

.grid-info-stats {
  font-size: 0.9rem;
  color: var(--primary-accent);
  background: var(--hover-bg);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  font-weight: 600;
  flex-shrink: 0;
}

.grid-info-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.grid-area {
  flex: 1.5;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 0;
  min-width: 0;
  container-type: size;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(8, 1fr); /* 8 x 8 grid to accommodate headers */
  grid-template-rows: repeat(8, 1fr);
  gap: 0.5rem;
  width: min(100cqw, 100cqh);
  height: min(100cqw, 100cqh);
  margin: 0 auto;
}

.grid-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  font-family: var(--font-mono);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  transition: all 0.2s ease;
  background: var(--surface-color);
  color: var(--text-primary);
  min-width: 0;
  min-height: 0;
}

.grid-cell:not(.empty-corner):not(.header-cell):hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 10;
}

.header-cell {
  background-color: var(--hover-bg);
  font-size: 1rem;
  color: var(--primary-accent);
  cursor: pointer;
  border-color: var(--border-color);
}

.header-cell:hover {
  background-color: var(--border-color);
}

.empty-corner {
  border: none;
  background: transparent;
  pointer-events: none;
}

.row-header {
  border-right: 2px solid var(--primary-accent);
}

.col-header {
  border-bottom: 2px solid var(--primary-accent);
}

/* Frequency Tables */
.freq-view-wrapper {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  align-items: stretch;
  height: 100%;
  min-height: 0;
}

.freq-area {
  flex: 1.5;
  display: flex;
  min-height: 0;
  min-width: 0;
}

.freq-tables {
  display: flex;
  gap: 1.5rem;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.freq-table-wrapper {
  flex: 1;
  min-width: 0;
  background: var(--surface-color);
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  min-height: 0;
  box-sizing: border-box;
  overflow: hidden;
  container-type: size;
}

.freq-table-wrapper h4 {
  margin-bottom: 0.75rem;
  text-align: center;
  color: var(--primary-accent);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Div-based table grid */
.freq-table-grid {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}

.freq-table-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex-shrink: 0;
  border-bottom: 2px solid var(--border-color);
}

.freq-table-th {
  background: var(--hover-bg);
  color: var(--primary-accent);
  font-weight: 600;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border-color);
}

.freq-table-th:last-child {
  border-right: none;
}

.freq-table-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.freq-table-row {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border-color);
}

.freq-table-row:last-child {
  border-bottom: none;
}

.freq-table-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.5rem;
  transition: background-color 0.2s;
  color: var(--text-primary);
  border-right: 1px solid var(--border-color);
  overflow: hidden;
  font-size: clamp(0.65rem, 1.5cqh, 1rem);
}

.freq-table-cell:last-child {
  border-right: none;
}

body.admin-mode .freq-table-cell {
  cursor: pointer;
}

#view-frequency {
  overflow: hidden;
}

/* Star View */
.star-view-wrapper {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  align-items: stretch;
  height: 100%;
  min-height: 0;
}

.star-info-panel {
  flex: 1;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
}

.star-info-panel h3, #star-info-title {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--secondary-accent);
  padding-bottom: 0.4rem;
  display: inline-block;
  color: var(--text-primary);
  flex-shrink: 0;
}

.star-info-stats {
  font-size: 0.9rem;
  color: var(--primary-accent);
  background: var(--hover-bg);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  font-weight: 600;
  flex-shrink: 0;
}

.star-info-description {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.star-shape-area {
  flex: 1.5;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 0;
  min-width: 0;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  overflow: auto;
}

.shape-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.shape-row {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.shape-counter {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--primary-accent);
  box-shadow: inset 0 -2px 4px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.1);
}

/* Numbers View */
.numbers-view-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
  height: 100%;
  padding-right: 0.5rem;
}

.numbers-empty {
  color: var(--text-secondary);
  font-style: italic;
  text-align: center;
  padding: 2rem;
}

.numbers-entry {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--surface-color);
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
}

.numbers-entry:hover {
  border-color: var(--secondary-accent);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.numbers-entry-highlight {
  border-color: var(--primary-accent) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2) !important;
}

.numbers-entry-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--hover-bg);
}

.numbers-entry-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.5rem;
  height: 3.5rem;
  background: var(--primary-accent);
  color: #fff;
  border-radius: 10px;
  font-size: 1.4rem;
  font-weight: bold;
  font-family: var(--font-mono);
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.numbers-entry-title-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.numbers-entry-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.numbers-entry-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.numbers-entry-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.numbers-entry-text-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.numbers-entry-primary-text {
  font-size: 1.5rem;
  line-height: 1.5;
  font-family: serif;
  color: var(--text-primary);
}

.numbers-entry-primary-text.rtl-text {
  direction: rtl;
  text-align: right;
}

.numbers-entry-secondary-text {
  font-size: 1rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.5;
}

.numbers-entry-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  background: var(--hover-bg);
  padding: 1rem 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.numbers-entry-meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.numbers-entry-meta-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  font-weight: 600;
}

.numbers-entry-meta-value {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 500;
}

.numbers-entry-description {
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.6;
  border-top: 1px dashed var(--border-color);
  padding-top: 1.5rem;
}

.numbers-entry-properties {
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--hover-bg);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.numbers-entry-prop-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.numbers-entry-prop-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  font-weight: 600;
}

.numbers-entry-prop-value {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.numbers-entry-shape-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.numbers-entry-shape-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--surface-color);
  cursor: default;
  transition: all 0.2s;
}

.numbers-entry-shape-icon:hover {
  border-color: var(--primary-accent);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.numbers-entry-breakdown {
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.numbers-entry-breakdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.numbers-entry-breakdown-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
}

.verse-entry-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.verse-stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--hover-bg);
  color: var(--primary-accent);
  border: 1px solid var(--border-color);
  white-space: nowrap;
}

.verse-stat-badge .vsb-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.verse-words-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.verse-word-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem 0.5rem;
  width: 110px;
  min-height: 140px;
  text-align: center;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.verse-word-card:hover {
  border-color: var(--secondary-accent);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.verse-word-native {
  font-size: 1.2rem;
  font-weight: bold;
  line-height: 1.3;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.verse-word-native.lang-hebrew {
  color: var(--success-color);
  direction: rtl;
}

.verse-word-native.lang-greek {
  color: #e67e22;
}

.verse-word-english {
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.verse-word-translit {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.3;
}

.verse-word-gematria {
  font-size: 0.95rem;
  margin-top: 0.4rem;
  cursor: default;
  font-family: var(--font-mono);
}

.verse-word-gematria.lang-hebrew {
  color: var(--success-color);
}

.verse-word-gematria.lang-greek {
  color: #e67e22;
}

.verse-word-gematria.has-definition {
  font-weight: bold;
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 4px;
}

/* Number hover card */
.number-hover-card {
  position: fixed;
  z-index: 9999;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  padding: 1rem 1.25rem;
  min-width: 200px;
  max-width: 300px;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
}

.nhc-number {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-accent);
  margin-bottom: 0.25rem;
  font-family: var(--font-mono);
}

.nhc-word {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.nhc-language {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 0.25rem;
}

.nhc-meaning {
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.4;
}

/* Hover card verse references line */
.nhc-verses {
  font-size: 0.85rem;
  color: var(--secondary-accent);
  font-style: italic;
  margin-top: 0.5rem;
  line-height: 1.4;
}

/* Number hotspots in descriptions */
.num-hotspot {
  cursor: pointer;
  color: var(--primary-accent);
  text-decoration: underline dotted;
  text-underline-offset: 4px;
  transition: all 0.2s;
  font-weight: 500;
}

.num-hotspot:hover {
  color: var(--secondary-accent);
  text-decoration-style: solid;
  background: var(--hover-bg);
  border-radius: 2px;
}

/* Number editor modal */
.number-editor-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.number-editor-dialog {
  background: var(--surface-color);
  border-radius: 12px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.2);
  padding: 2rem;
  width: 100%;
  max-width: 750px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border-color);
}

.number-editor-dialog h3 {
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  border-bottom: 2px solid var(--primary-accent);
  padding-bottom: 0.5rem;
  display: inline-block;
  color: var(--text-primary);
}

.number-editor-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.number-editor-fields label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.number-editor-fields input,
.number-editor-fields select,
.number-editor-fields textarea {
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  background: var(--bg-color);
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.number-editor-fields input:focus,
.number-editor-fields select:focus,
.number-editor-fields textarea:focus {
  outline: none;
  border-color: var(--primary-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.number-editor-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.numbers-sidebar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  background: var(--primary-accent);
  color: #fff;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: bold;
  flex-shrink: 0;
}

/* Hover card factors line */
.nhc-factors {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  font-family: var(--font-mono);
  margin-top: 0.5rem;
}

/* Hover card properties line */
.nhc-properties {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border-color);
}

.nhc-prop-badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--hover-bg);
  color: var(--primary-accent);
  border: 1px solid var(--border-color);
  white-space: nowrap;
  font-weight: 600;
}

/* ---- Number Type Toggle (editor) ---- */
.number-type-toggle {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--hover-bg);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.number-type-toggle-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  flex-shrink: 0;
}

.ntt-option {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
}

.ntt-option input[type="radio"] {
  cursor: pointer;
  width: auto;
  margin: 0;
}

/* ---- Verse Words Section (editor) ---- */
.verse-words-section {
  margin-top: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  background: var(--bg-color);
}

.verse-words-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.verse-words-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-accent);
}

.verse-word-add-btn {
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--secondary-accent);
  border-radius: 6px;
  background: var(--surface-color);
  color: var(--secondary-accent);
  cursor: pointer;
  transition: all 0.2s;
}

.verse-word-add-btn:hover {
  background: var(--secondary-accent);
  color: #fff;
}

/* Inline add/edit form */
.verse-word-add-form {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.verse-word-form-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.verse-word-form-fields label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.verse-word-form-fields input {
  font-size: 0.9rem;
  padding: 0.4rem 0.5rem;
}

.verse-word-form-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.verse-word-form-actions button {
  font-size: 0.85rem;
  padding: 0.3rem 0.75rem;
}

/* Verse word mini-cards (editor list) */
.verse-words-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.verse-word-mini-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  min-width: 140px;
  max-width: 180px;
  width: auto;
  text-align: center;
  font-size: 0.85rem;
  box-sizing: border-box;
  overflow: hidden;
  transition: all 0.2s;
}

.verse-word-mini-card:hover {
  border-color: var(--secondary-accent);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.verse-word-mini-card[draggable="true"] {
  cursor: grab;
}

.verse-word-mini-card[draggable="true"]:active {
  cursor: grabbing;
}

.verse-word-mini-card.drag-over {
  border: 2px dashed var(--primary-accent);
  background: var(--hover-bg);
}

.verse-word-mini-card .vwmc-native {
  font-size: 1.1rem;
  font-weight: bold;
  line-height: 1.3;
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}

.verse-word-mini-card .vwmc-english {
  font-size: 0.8rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.verse-word-mini-card .vwmc-translit {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.verse-word-mini-card .vwmc-gematria {
  font-size: 0.85rem;
  font-weight: bold;
  margin-top: 0.25rem;
  color: var(--primary-accent);
}

.verse-word-mini-card .vwmc-actions {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.verse-word-mini-card .vwmc-actions button {
  font-size: 0.75rem;
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--hover-bg);
  cursor: pointer;
  line-height: 1.3;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.verse-word-mini-card .vwmc-actions button:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

.verse-word-mini-card .vwmc-move {
  display: flex;
  gap: 0.25rem;
}

/* ---- Manual count fields (verse editor) ---- */
.verse-manual-counts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 1rem;
}

/* Quill Editor View Overrides */
.ql-snow .ql-editor.view-rich-text {
  padding: 0;
  overflow-y: visible;
  height: auto;
  font-family: inherit;
  font-size: inherit;
  line-height: 1.6;
  color: inherit;
}

.ql-snow .ql-editor.view-rich-text > *:first-child {
  margin-top: 0;
}

.ql-snow .ql-editor.view-rich-text > *:last-child {
  margin-bottom: 0;
}

.ql-snow .ql-editor.view-rich-text h1,
.ql-snow .ql-editor.view-rich-text h2,
.ql-snow .ql-editor.view-rich-text h3,
.ql-snow .ql-editor.view-rich-text h4,
.ql-snow .ql-editor.view-rich-text h5,
.ql-snow .ql-editor.view-rich-text h6 {
  color: var(--text-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.ql-snow .ql-editor.view-rich-text h1 { font-size: 1.75rem; }
.ql-snow .ql-editor.view-rich-text h2 { font-size: 1.5rem; }
.ql-snow .ql-editor.view-rich-text h3 { font-size: 1.25rem; }
.ql-snow .ql-editor.view-rich-text h4 { font-size: 1.1rem; }

.ql-snow .ql-editor.view-rich-text blockquote {
  border-left: 4px solid var(--primary-accent);
  padding-left: 1rem;
  margin-left: 0;
  color: var(--text-secondary);
  background: var(--hover-bg);
  padding: 0.75rem 1rem;
  border-radius: 0 6px 6px 0;
}

.ql-snow .ql-editor.view-rich-text pre.ql-syntax {
  background: #2d2d2d;
  color: #f8f8f2;
  padding: 1rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  overflow-x: auto;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
}

.ql-snow .ql-editor.view-rich-text img,
.ql-snow .ql-editor.view-rich-text iframe.ql-video {
  max-width: 100%;
  border-radius: 6px;
  margin: 1rem 0;
}

.ql-snow .ql-editor.view-rich-text a {
  color: var(--primary-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ql-snow .ql-editor.view-rich-text a:hover {
  color: var(--secondary-accent);
}

.ql-snow .ql-editor.view-rich-text ul,
.ql-snow .ql-editor.view-rich-text ol {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.ql-snow .ql-editor.view-rich-text li {
  margin-bottom: 0.25rem;
}
