.vdt { max-width: 780px; }
.vdt-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.vdt-tab {
  padding: 8px 12px; font-size: 13px; font-weight: 700; border: 1px solid #d9e0d4; border-radius: 6px;
  background: #fff; cursor: pointer; color: #27331f;
}
.vdt-tab-active { background: #19616a; border-color: #19616a; color: #fff; }
.vdt-panel { display: flex; flex-direction: column; gap: 12px; }
.vdt-panel label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: #27331f; }
.vdt-panel input, .vdt-panel select, .vdt-panel textarea {
  padding: 9px 11px; font-size: 14.5px; border: 1px solid #d9e0d4; border-radius: 6px; font-family: inherit;
}
.vdt-panel input:focus, .vdt-panel select:focus, .vdt-panel textarea:focus { outline: 2px solid #19616a; outline-offset: 1px; }
.vdt-row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.vdt-row2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.vdt-hint { font-size: 12.5px; color: #5b6b56; margin: 4px 0 0; }
.vdt-note { margin-top: 16px; font-size: 13px; color: #5b6b56; }
.vdt-subnote { font-size: 12px; color: #5b6b56; margin: 6px 0 0; font-style: italic; }
.vdt-h3 { font-size: 15px; font-weight: 700; color: #27331f; margin: 6px 0 0; }

/* Buttons */
.vdt-btn {
  padding: 9px 14px; font-size: 13.5px; font-weight: 700; border: 1px solid #19616a; border-radius: 6px;
  background: #19616a; color: #fff; cursor: pointer; align-self: flex-start;
}
.vdt-btn:hover { background: #144e55; }
.vdt-btn-ghost {
  padding: 7px 11px; font-size: 12.5px; font-weight: 700; border: 1px solid #d9e0d4; border-radius: 6px;
  background: #fff; color: #27331f; cursor: pointer;
}
.vdt-btn-ghost:hover { border-color: #19616a; color: #19616a; }
.vdt-btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* Output command block (shared with entity-combat-commands look) */
.vdt-out { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.vdt-cmd {
  display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; background: #f3f4f8; border: 1px solid #d9e0d4; border-radius: 6px;
}
.vdt-cmd code { font-family: ui-monospace, monospace; font-size: 13px; color: #19616a; font-weight: 700; word-break: break-all; }
.vdt-cmd span { font-size: 12.5px; color: #5b6b56; }

/* ---------- Banner Designer ---------- */
.vdt-banner-layout { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.vdt-banner-controls { flex: 1 1 340px; display: flex; flex-direction: column; gap: 12px; min-width: 280px; }
.vdt-banner-preview-wrap { flex: 0 0 160px; display: flex; flex-direction: column; align-items: center; gap: 8px; }

.vdt-banner-frame {
  width: 128px; height: 152px; background: #7a7a7a; border: 3px solid #4a3826; border-radius: 2px 2px 6px 6px;
  position: relative; overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.vdt-banner-pole { width: 8px; height: 22px; background: #4a3826; margin: 0 auto; }
.vdt-banner-layer { position: absolute; inset: 0; }

.vdt-layers { display: flex; flex-direction: column; gap: 10px; }
.vdt-layer-row {
  display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end;
  padding: 10px; background: #f3f4f8; border: 1px solid #d9e0d4; border-radius: 6px;
}
.vdt-layer-row label { font-size: 12px; }
.vdt-layer-remove {
  padding: 8px 10px; font-size: 12px; font-weight: 700; border: 1px solid #c94b4b; border-radius: 6px;
  background: #fff; color: #c94b4b; cursor: pointer; height: 38px;
}
.vdt-layer-remove:hover { background: #c94b4b; color: #fff; }
.vdt-layer-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid #d9e0d4; vertical-align: -2px; margin-right: 6px; }

/* ---------- Tables (paintings / discs / particles) ---------- */
.vdt-table-wrap { overflow-x: auto; border: 1px solid #d9e0d4; border-radius: 6px; }
table.vdt-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.vdt-table th {
  text-align: left; background: #f3f4f8; color: #27331f; font-weight: 700; padding: 9px 11px;
  border-bottom: 1px solid #d9e0d4; position: sticky; top: 0;
}
table.vdt-table td { padding: 8px 11px; border-bottom: 1px solid #eef0e9; color: #27331f; vertical-align: top; }
table.vdt-table tr:last-child td { border-bottom: none; }
table.vdt-table tr:hover td { background: #fafbf7; }
table.vdt-table code { font-family: ui-monospace, monospace; font-size: 12.5px; color: #19616a; }

/* ---------- Color Codes ---------- */
.vdt-color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.vdt-swatch {
  display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid #d9e0d4; border-radius: 6px;
  background: #fff; cursor: pointer; text-align: left;
}
.vdt-swatch:hover { border-color: #19616a; }
.vdt-swatch-block { width: 100%; height: 34px; border-radius: 4px; border: 1px solid rgba(0,0,0,.12); }
.vdt-swatch-name { font-size: 12.5px; font-weight: 700; color: #27331f; }
.vdt-swatch-code { font-size: 12px; color: #5b6b56; font-family: ui-monospace, monospace; }
.vdt-copied { color: #19616a !important; font-weight: 700; }

/* ---------- Font Generator ---------- */
.vdt-font-canvas-wrap {
  border: 1px solid #d9e0d4; border-radius: 6px; background: #313131; padding: 18px; overflow-x: auto;
  display: flex; align-items: center; justify-content: center; min-height: 90px;
}
.vdt-font-preview {
  font-family: "Courier New", ui-monospace, monospace; font-weight: 700; letter-spacing: 3px;
  color: #fff; text-shadow: 3px 3px 0 #3f3f3f, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
  image-rendering: pixelated; font-size: 34px; white-space: pre; line-height: 1.3;
}

/* ---------- Enchanting Translator ---------- */
.vdt-galactic-out {
  display: flex; flex-wrap: wrap; gap: 4px; padding: 16px; background: #2b2140; border: 1px solid #d9e0d4;
  border-radius: 6px; align-items: center; min-height: 60px;
}
.vdt-glyph { width: 26px; height: 26px; }
.vdt-glyph-space { width: 14px; }

/* ---------- Flag Banners ---------- */
.vdt-flag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.vdt-flag-card { border: 1px solid #d9e0d4; border-radius: 6px; padding: 12px; background: #fff; display: flex; flex-direction: column; gap: 6px; }
.vdt-flag-card h4 { margin: 0; font-size: 14px; color: #27331f; }
.vdt-flag-card ul { margin: 0; padding-left: 18px; font-size: 12.5px; color: #5b6b56; }
.vdt-flag-card ul code { color: #19616a; }

.vdt-search {
  padding: 9px 11px; font-size: 14.5px; border: 1px solid #d9e0d4; border-radius: 6px; width: 100%; max-width: 320px;
}

@media (max-width: 640px) {
  .vdt-row3, .vdt-row2 { grid-template-columns: 1fr; }
  .vdt-layer-row { grid-template-columns: 1fr 1fr; }
  .vdt-layer-remove { grid-column: span 2; }
  .vdt-banner-layout { flex-direction: column; align-items: stretch; }
  .vdt-banner-preview-wrap { align-self: center; }
}
