/* Sense viewer panel (SENSE-VIEWER-SPEC-v1.0 3.3). Mobile first, 375 px. */

.overlay-header-right.sense-panel-active #word-copy-btn,
.overlay-header-right.sense-panel-active #word-edit-btn {
  display: none !important;
}

.sense-panel {
  padding: 16px;
  font-family: var(--font-family-sans, sans-serif);
  color: var(--fg, #111);
  max-width: 40rem;
}

.sense-sentence {
  font-size: 1.05rem;
  line-height: 1.45;
  margin: 0 0 12px;
}

.sense-word {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.sense-form {
  font-weight: 600;
}

.sense-translit {
  color: var(--fg-secondary, #555);
  font-size: 0.95rem;
}

.sense-share {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--fg-secondary, #555);
}

.sense-others {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.sense-other {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--ui-chrome, #ddd);
  font-size: 0.92rem;
  line-height: 1.35;
}

.sense-other-n {
  flex: 0 0 2.2rem;
  color: var(--fg-secondary, #555);
}

.sense-all {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--ui-chrome, #ccc);
  border-radius: 8px;
  background: var(--bg, #fff);
  color: var(--fg, #111);
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
}

.sense-all:active {
  transform: scale(0.99);
}

@media (min-width: 1280px) {
  .sense-panel {
    padding: 24px 28px;
  }
  .sense-sentence {
    font-size: 1.15rem;
  }
}

.sense-tree {
  position: fixed;
  inset: 0;
  z-index: 3100;
  background: var(--bg, #fff);
  color: var(--fg, #111);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sense-tree[hidden] {
  display: none !important;
}

.sense-tree-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--ui-chrome, #ddd);
  min-height: 48px;
}

.sense-tree-title {
  flex: 1;
  font-size: 1rem;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sense-tree-close,
.sense-tree-step button,
.sense-more {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 10px;
  border: 1px solid var(--ui-chrome, #ccc);
  border-radius: 8px;
  background: var(--bg, #fff);
  color: var(--fg, #111);
  cursor: pointer;
}

.sense-tree-step {
  display: flex;
  gap: 6px;
}

.sense-tree-canvas {
  overflow: hidden;
  flex: 0 0 auto;
}

.sense-tree-canvas.is-pan {
  overflow: auto;
}

.sense-tree-svg {
  display: block;
  overflow: visible;
}

.sense-root {
  fill: var(--fg, #111);
}

.sense-dot {
  fill: var(--fg-secondary, #666);
  cursor: pointer;
}

.sense-dot.is-current {
  fill: var(--fg, #111);
  stroke: var(--fg, #111);
  stroke-width: 3;
}

.sense-edge {
  stroke: var(--ui-chrome, #ccc);
  stroke-width: 1.5;
}

.sense-root-label,
.sense-dot-label {
  font-size: 12px;
  fill: var(--fg, #111);
  font-family: var(--font-family-sans, sans-serif);
  pointer-events: none;
}

.sense-full-sentence {
  margin: 8px 16px;
  font-size: 0.95rem;
  line-height: 1.4;
}

.sense-verses {
  list-style: none;
  margin: 0;
  padding: 0 12px 16px;
  overflow-y: auto;
  flex: 1 1 auto;
}

.sense-verse {
  padding: 10px 4px;
  border-top: 1px solid var(--ui-chrome, #eee);
  min-height: 44px;
  cursor: pointer;
  font-size: 0.92rem;
  line-height: 1.4;
}

.sense-verse-ref {
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}

.sense-verse mark {
  background: var(--highlight, #ffe08a);
  color: inherit;
}

.sense-more {
  margin: 0 12px 12px;
  width: calc(100% - 24px);
}

.sense-index {
  position: fixed;
  inset: 0;
  z-index: 3100;
  background: var(--bg, #fff);
  color: var(--fg, #111);
  display: flex;
  flex-direction: column;
}

.sense-index[hidden] {
  display: none !important;
}

.sense-index-list {
  list-style: none;
  margin: 0;
  padding: 0 12px 16px;
  overflow-y: auto;
  flex: 1 1 auto;
}

.sense-index-row {
  padding: 12px 4px;
  border-top: 1px solid var(--ui-chrome, #eee);
  min-height: 44px;
  cursor: pointer;
}

.sense-index-form {
  font-weight: 600;
}

.sense-index-tr,
.sense-index-gloss,
.sense-index-n {
  color: var(--fg-secondary, #555);
  font-size: 0.9rem;
}
