/* ------------------------------------------------------------------ */
/* Word page                                                           */
/* ------------------------------------------------------------------ */

.word-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.word-head-main {
  min-width: 0;
  flex: 1;
}

.word-owner {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 9px;
}

.term-input {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.05;
  width: 100%;
  border: 0;
  border-bottom: 1px dashed transparent;
  background: transparent;
  color: var(--ink);
  padding: 2px 0;
  outline: none;
  border-radius: 0;
}

.term-input:hover {
  border-bottom-color: var(--line-strong);
}

.term-input:focus {
  border-bottom-color: var(--accent);
  box-shadow: none;
}

.word-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--ink-faint);
  margin-top: 10px;
}

.word-savebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 26px 0 14px;
}

.save-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--ink-faint);
}

.save-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-faint);
  flex: none;
}

.save-status.saved {
  color: var(--ok);
}

.save-status.saved .save-dot {
  background: var(--ok);
}

.save-status.saving {
  color: var(--warn);
}

.save-status.saving .save-dot {
  background: var(--warn);
  animation: pulse 0.9s ease-in-out infinite;
}

.save-status.dirty {
  color: var(--warn);
}

.save-status.dirty .save-dot {
  background: var(--warn);
}

.save-status.error {
  color: var(--danger);
}

.save-status.error .save-dot {
  background: var(--danger);
}

.autosave-note {
  font-size: 11px;
  color: var(--ink-faint);
}

.sheets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
  align-items: stretch;
}

.sheet {
  display: flex;
  flex-direction: column;
  min-height: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sheet:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.sheet-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.sheet-icon {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  flex: none;
}

.sheet-title {
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-soft);
}

.sheet-hint {
  margin-left: auto;
  font-size: 10px;
  color: var(--ink-faint);
}

.sheet textarea {
  flex: 1;
  width: 100%;
  min-height: 340px;
  border: 0;
  resize: vertical;
  padding: 13px 16px 20px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.65;
  outline: none;
}

.sheet textarea::placeholder {
  color: var(--ink-faint);
}
