.translate-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

.tr-intro {
  max-width: 820px;
}

.tr-intro code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--panel);
}

.tr-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tr-new-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 12px;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
}

#tr-search {
  min-width: 260px;
}

.tr-notice {
  margin: 0 0 16px;
  padding: 10px 14px;
  border: 1px solid #2f6b45;
  border-radius: 8px;
  color: #7fd39b;
  font-size: 14px;
}

.tr-notice.is-error {
  border-color: #7a3a3a;
  color: #ff8a8a;
}

.tr-table th,
.tr-table td {
  white-space: normal;
  vertical-align: top;
}

.tr-col-key {
  width: 16%;
}

.tr-col-text {
  width: 24%;
}

.tr-col-meta {
  width: 1%;
  white-space: nowrap;
}

.tr-col-status {
  text-align: center;
}

.tr-table .tr-status {
  text-align: center;
  font-size: 16px;
  font-weight: 700;
}

.tr-table .tr-status.is-done {
  color: #7fd39b;
}

.tr-table .tr-status.is-todo {
  color: #ffa45c;
}

.tr-col-yours {
  width: 30%;
}

.tr-table tbody .tr-section th {
  position: static;
  padding: 0;
  background: var(--bg);
  color: var(--text);
}

.tr-section-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.tr-section-toggle:hover .tr-section-name {
  color: var(--accent);
}

.tr-section-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.tr-chevron {
  flex: none;
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid currentColor;
  transition: transform 0.15s ease;
}

.tr-section.is-open .tr-chevron {
  transform: rotate(90deg);
}

.tr-section-name {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
}

.tr-section-count {
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 400;
}

.tr-count-edited {
  color: var(--accent);
}

.tr-count-warning {
  color: #ffa45c;
}

.tr-section-todo {
  margin-left: auto;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(255, 164, 92, 0.15);
  color: #ffa45c;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.tr-section-todo.is-done {
  background: rgba(127, 211, 155, 0.15);
  color: #7fd39b;
}

.tr-key {
  color: var(--text-dim);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
}

.tr-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.tr-missing {
  color: #ffa45c;
  font-style: italic;
}

.tr-table .tr-meta {
  color: var(--text-dim);
  white-space: nowrap;
}

.tr-input {
  display: block;
  width: 100%;
  min-width: 220px;
  resize: vertical;
  line-height: 1.4;
}

.tr-table tr.is-edited .tr-input {
  border-color: var(--accent);
}

.tr-table tr.has-warning .tr-input {
  border-color: #ffa45c;
}

.tr-warning {
  margin: 6px 0 0;
  color: #ffa45c;
  font-size: 12px;
}

.tr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.tr-note {
  margin: 6px 0 0;
  color: var(--text-dim);
  font-size: 12px;
  font-style: italic;
  white-space: pre-wrap;
}

.tr-note-input {
  display: block;
  width: 100%;
  min-width: 220px;
  margin-top: 6px;
  resize: vertical;
  font-size: 12px;
  line-height: 1.4;
}

.tr-language-notes {
  max-width: 820px;
  margin-bottom: 16px;
}

.tr-language-notes textarea {
  width: 100%;
  resize: vertical;
  line-height: 1.4;
}

.tr-language-notes textarea.is-edited {
  border-color: var(--accent);
}

@media (max-width: 800px) {
  .translate-main {
    padding: 16px;
  }

  #tr-search {
    min-width: 0;
    width: 100%;
  }
}
