/* texture-maker-9mc.css — Texture Maker tren skins.9minecraft.net.
 * ⛔ CSS goc `#tmk` chi LAYOUT, mau tu tool-theme.css (khong mang sang) -> shim them MAU.
 *    Khoa `.tmk9`, token THEME-AWARE. active (.tmk-on) = outline grass (goc dung currentColor). */
.tmk9 {
  --surface:#ffffff; --surface-2:#f0f4f1; --surface-3:#e3eae5;
  --line:rgba(6,78,59,.14); --line-strong:rgba(6,78,59,.30);
  --fg:#0b1410; --fg-muted:#4a5a51;
  --grass:#059669; --grass-deep:#d1fae5; --grass-bright:#065f46;
  color: var(--fg);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tmk9 {
    --surface:#1b212b; --surface-2:#242b36; --surface-3:#2d3542;
    --line:rgba(255,255,255,.12); --line-strong:rgba(255,255,255,.26);
    --fg:#e8eaed; --fg-muted:#9aa0a6; --grass:#10b981; --grass-deep:#064e3b; --grass-bright:#34d399;
  }
}
:root[data-theme="dark"] .tmk9 {
  --surface:#1b212b; --surface-2:#242b36; --surface-3:#2d3542;
  --line:rgba(255,255,255,.12); --line-strong:rgba(255,255,255,.26);
  --fg:#e8eaed; --fg-muted:#9aa0a6; --grass:#10b981; --grass-deep:#064e3b; --grass-bright:#34d399;
}

/* ---------- layout (tu texture-maker.css, khoa .tmk9) ---------- */
.tmk9 .tmk { display: block; }
.tmk9 .tmk-grid { display: grid; grid-template-columns: minmax(210px, 250px) minmax(0, 1fr) minmax(200px, 240px); gap: 20px; align-items: start; }
@media (max-width: 900px) { .tmk9 .tmk-grid { grid-template-columns: minmax(0, 1fr); } }
.tmk9 .tmk-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tmk9 .tmk-field { display: block; min-width: 0; }
.tmk9 .tmk-label { display: block; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; opacity: .72; margin-bottom: 7px; }
.tmk9 .tmk-sub { font-weight: 600; letter-spacing: 0; text-transform: none; opacity: .72; }

.tmk9 .tmk-search { width: 100%; box-sizing: border-box; padding: 8px 11px; font-size: 13px; border-radius: 9px; }
.tmk9 .tmk-tabs { display: flex; gap: 5px; margin-top: 8px; }
.tmk9 .tmk-tab { flex: 1 1 0; padding: 6px 4px; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 700; }
.tmk9 .tmk-tab.tmk-on { outline: 2px solid var(--grass); outline-offset: -2px; }

.tmk9 .tmk-list { display: flex; flex-direction: column; gap: 3px; max-height: 460px; overflow-y: auto; padding-right: 3px; }
.tmk9 .tmk-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px 9px; border-radius: 9px; cursor: pointer; text-align: left; }
.tmk9 .tmk-item.tmk-on { outline: 2px solid var(--grass); outline-offset: -2px; }
.tmk9 .tmk-thumb { width: 22px; height: 22px; flex: 0 0 auto; border-radius: 3px; image-rendering: pixelated; background: rgba(127,127,127,.18); }
.tmk9 .tmk-itemname { flex: 1 1 auto; font-size: 12.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tmk9 .tmk-itemkind { font-size: 10px; opacity: .55; text-transform: uppercase; letter-spacing: .05em; flex: 0 0 auto; }
.tmk9 .tmk-item.tmk-edited .tmk-itemname::after { content: " \2022"; opacity: .9; }
.tmk9 .tmk-empty { margin: 8px 0 0; font-size: 13px; opacity: .7; }

.tmk9 .tmk-stage { display: flex; align-items: center; justify-content: center; padding: 12px; border-radius: 14px; background: rgba(127,127,127,.12); }
.tmk9 .tmk-stage canvas {
  display: block; max-width: 100%; height: auto; image-rendering: pixelated; border-radius: 4px; touch-action: none;
  background-color: #6e6e6e;
  background-image:
    linear-gradient(45deg, rgba(0,0,0,.22) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.22) 75%),
    linear-gradient(45deg, rgba(0,0,0,.22) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.22) 75%);
  background-size: 16px 16px; background-position: 0 0, 8px 8px;
}
.tmk9 .tmk-under { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; }
.tmk9 .tmk-coord { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; opacity: .75; min-width: 9ch; }
.tmk9 .tmk-check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.tmk9 .tmk-zoom { display: inline-flex; align-items: center; gap: 8px; flex: 1 1 130px; min-width: 0; }
.tmk9 .tmk-zoom input[type="range"] { flex: 1 1 auto; min-width: 0; margin: 0; box-sizing: border-box; accent-color: var(--grass); }

.tmk9 .tmk-toolset { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tmk9 .tmk-tool { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 9px 11px; border-radius: 9px; cursor: pointer; font-size: 12.5px; font-weight: 700; }
.tmk9 .tmk-tool.tmk-on { outline: 2px solid var(--grass); outline-offset: -2px; }
.tmk9 .tmk-key { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 10px; opacity: .5; }

.tmk9 .tmk-colour { display: flex; align-items: center; gap: 8px; }
.tmk9 .tmk-colour input[type="color"] { width: 44px; height: 34px; padding: 2px; border-radius: 8px; cursor: pointer; flex: 0 0 auto; }
.tmk9 .tmk-hex { flex: 1 1 auto; min-width: 0; box-sizing: border-box; padding: 7px 9px; border-radius: 8px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; text-transform: uppercase; }
.tmk9 .tmk-swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; margin-top: 9px; }
.tmk9 .tmk-swatch { aspect-ratio: 1 / 1; border-radius: 6px; cursor: pointer; padding: 0; border: 1px solid rgba(127,127,127,.4); }

.tmk9 .tmk-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.tmk9 .tmk-btn { padding: 8px 14px; border-radius: 9px; font-size: 13px; font-weight: 700; cursor: pointer; }
.tmk9 .tmk-primary { width: 100%; box-sizing: border-box; padding: 11px 15px; font-size: 14px; }
.tmk9 .tmk-note { margin: 0; min-height: 1.2em; font-size: 13px; line-height: 1.55; opacity: .85; }
.tmk9 .tmk-hint { margin: 9px 0 0; font-size: 12px; line-height: 1.55; opacity: .7; }
.tmk9 .tmk-help { margin-top: 26px; font-size: 14.5px; line-height: 1.65; max-width: 72ch; }
.tmk9 .tmk-help p { margin: 0; }
.tmk9 [hidden] { display: none !important; }

/* ---------- MAU (thay cho tool-theme.css) ---------- */
.tmk9 .tmk-search, .tmk9 .tmk-hex { background: var(--surface); border: 1px solid var(--line); color: var(--fg); }
.tmk9 .tmk-search:focus, .tmk9 .tmk-hex:focus { outline: none; border-color: var(--grass); }
.tmk9 .tmk-tab, .tmk9 .tmk-item, .tmk9 .tmk-tool, .tmk9 .tmk-btn {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--fg);
}
.tmk9 .tmk-btn:hover:not(:disabled) { border-color: var(--line-strong); background: var(--surface-3); }
.tmk9 .tmk-btn:disabled { opacity: .5; cursor: not-allowed; }
.tmk9 .tmk-primary { background: var(--grass-deep); border-color: var(--line-strong); color: var(--grass-bright); }
.tmk9 .tmk-primary:hover:not(:disabled) { background: var(--grass); border-color: var(--grass); color: #fff; }
.tmk9 .tmk-colour input[type="color"] { border: 1px solid var(--line); background: var(--surface); }
