/* editor-dong.css — PREVIEW STUDIO skins.9minecraft.net/editor/ (05/12/2026). Xem editor-dong.js.
 * ⛔ Màu chỉ lấy biến --e9-* (sáng/tối đã có trong editor-9mc.css). Không vạch màu 1 cạnh, không nền đậm ở chế độ sáng.
 * ⛔ .ed9 * { border-color: transparent !important } ở editor-9mc.css ⇒ viền vẽ bằng box-shadow. */

/* ── desktop: khung editor RỘNG BẰNG các sub khác (1260px), bỏ zoom 0.9/width 90% cũ ── */
@media (min-width: 1201px) {
  .ed9 main.editor-page { zoom: 1 !important; width: 100% !important; max-width: none !important; }
  .ed9 .editor-layout { grid-template-columns: 210px minmax(0, 1fr) 300px !important; }
  .ed9 #previewCanvas { height: clamp(560px, 74vh, 820px) !important; }
}
.ed9 .preview-wrap { background-size: cover !important; background-position: center !important; background-repeat: no-repeat !important;
  transition: background-image .25s ease; }

/* ⛔ 05/12 LỖI CŨ trên live: #tool-root mang data-tool="skin-editor" (khung v17) ⇒ widget-core gom nó vào ui.toolButtons ([data-tool])
   và gắn .is-disabled khi đang phát clip ⇒ CẢ editor (kể cả STOP) không bấm được. Trả lại thao tác cho khối bọc; nút thật vẫn khoá riêng. */
#tool-root.is-disabled, #tool-root.is-active { pointer-events: auto !important; opacity: 1 !important; filter: none !important; }

/* điều khiển cũ: engine vẫn bám ID, người dùng không thấy */
.ed9 .edd-cu { display: none !important; }

/* ── khung studio ── */
.edd { --edd-r: 14px; --edd-nhan: var(--e9-nhan, #1a73e8); margin-top: 12px; padding: 10px; border-radius: 18px; background: var(--e9-mat2, #f8f9fa);
  color: var(--e9-chu, #1f1f1f); font: 500 14px/1.3 'Google Sans Text', 'Google Sans', Roboto, system-ui, sans-serif; min-height: 318px; contain: layout paint; }
.edd *, .edd *::before { box-sizing: border-box; }
.edd button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.edd button:focus-visible, .edd input:focus-visible, .edd label:focus-within { outline: 2px solid var(--edd-nhan); outline-offset: 2px; }
.edd svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.edd [hidden] { display: none !important; }

.edd-ic { display: inline-block; flex: none; width: 32px; height: 32px; background: url(/vendor/edd/Studio-Icons.png?v=1) 0 0 / 7000% 100% no-repeat;
  image-rendering: pixelated; image-rendering: crisp-edges; }
.edd-sp { width: 32px; height: 32px; object-fit: contain; image-rendering: pixelated; flex: none; }

.edd-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.edd-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--e9-mat, #fff); box-shadow: var(--e9-bong1); }
.edd-tab { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px 0 10px; border: 0; border-radius: 999px; background: none;
  font-weight: 700 !important; letter-spacing: .01em; transition: background-color .2s, color .2s; }
.edd-tab .edd-ic { width: 24px; height: 24px; }
.edd-tab:hover { background: var(--e9-mat2); }
.edd-tab[aria-selected="true"] { background: var(--e9-nhan-nh, #e8f0fe); color: var(--edd-nhan); }

/* thanh nổi Zoom + Snapshot ngay trên khung 3D (than.html đặt .edd-zoom trong #previewWrap) */
.ed9 .preview-wrap { position: relative !important; }
.edd-zoom { position: absolute; left: 50%; bottom: 12px; z-index: 3; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; padding: 3px;
  border-radius: 999px; background: rgba(15, 23, 42, .66); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25), inset 0 0 0 1px rgba(255, 255, 255, .14); font: 700 14px/1 'Google Sans Text', Roboto, system-ui, sans-serif;
  opacity: .92; transition: opacity .2s; touch-action: manipulation; }
.edd-zoom:hover, .edd-zoom:focus-within { opacity: 1; }
.edd-zoom button { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px;
  background: none; color: #fff; font: inherit; font-size: 20px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.edd-zoom button:hover { background: rgba(255, 255, 255, .16); }
.edd-zoom button:focus-visible, .edd-zoom input:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.edd-zoom svg { width: 20px; height: 20px; fill: currentColor; }
.edd-zoom .edd-snap { padding: 0 14px 0 12px; font-size: 14px; margin-left: 2px; background: rgba(255, 255, 255, .14); }
.edd-zoom output { min-width: 38px; text-align: center; font-variant-numeric: tabular-nums; font-size: 13px; color: rgba(255, 255, 255, .85); }
.edd-zoom input[type=range] { -webkit-appearance: none; appearance: none; width: 110px; height: 44px; background: none; margin: 0 4px; cursor: pointer; }
.edd-zoom input[type=range]::-webkit-slider-runnable-track { height: 5px; border-radius: 3px;
  background: linear-gradient(90deg, #fff var(--p, 20%), rgba(255, 255, 255, .3) var(--p, 20%)); }
.edd-zoom input[type=range]::-moz-range-track { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .3); }
.edd-zoom input[type=range]::-moz-range-progress { height: 5px; border-radius: 3px; background: #fff; }
.edd-zoom input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7.5px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.edd-zoom input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: #fff; }

/* ── Moves ── */
.edd-wpn { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; padding: 2px 2px 8px; }
.edd-w { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 84px; padding: 8px 4px; border: 0;
  border-radius: var(--edd-r); background: var(--e9-mat); box-shadow: var(--e9-bong1); scroll-snap-align: start; transition: transform .15s, box-shadow .2s, background-color .2s; }
.edd-w .edd-sp { width: 44px; height: 44px; }
.edd-w .edd-ic--to { width: 40px; height: 40px; }
.edd-w span { font-size: 12.5px; font-weight: 700; line-height: 1.15; text-align: center; }
.edd-w:hover { transform: translateY(-2px); box-shadow: var(--e9-bong2); }
.edd-w[aria-selected="true"] { background: var(--e9-nhan-nh); color: var(--edd-nhan); box-shadow: 0 0 0 2px var(--edd-nhan), var(--e9-bong1); }

.edd-cbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
.edd-chips { display: flex; gap: 6px; overflow-x: auto; flex: 1 1 260px; min-width: 0; padding: 2px; scrollbar-width: none; }
.edd-chips::-webkit-scrollbar { display: none; }
.edd-chip { display: flex; align-items: center; gap: 5px; flex: none; min-height: 40px; padding: 0 12px 0 8px; border: 0; border-radius: 999px;
  background: var(--e9-mat); box-shadow: var(--e9-bong1); font-size: 13px !important; font-weight: 600 !important; white-space: nowrap; }
.edd-chip .edd-ic { width: 20px; height: 20px; }
.edd-chip b { font-size: 11.5px; font-weight: 700; color: var(--e9-chu2); }
.edd-chip[aria-pressed="true"] { background: var(--e9-nhan-nh); color: var(--edd-nhan); box-shadow: 0 0 0 2px var(--edd-nhan); }
.edd-chip[aria-pressed="true"] b { color: inherit; }
.edd-tim { display: flex; align-items: center; gap: 6px; flex: 0 1 220px; min-height: 44px; padding: 0 12px; border-radius: 999px; background: var(--e9-mat);
  box-shadow: var(--e9-bong1); color: var(--e9-chu2); }
.edd-tim input { flex: 1; min-width: 0; height: 42px; border: 0; background: none; color: var(--e9-chu); font: 500 16px/1 inherit; outline: none; }

.edd-clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; max-height: 236px; overflow-y: auto; padding: 2px 4px 4px 2px;
  scrollbar-width: thin; overscroll-behavior: contain; }
.edd-c { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 10px 6px 8px; border: 0; border-radius: 12px; background: var(--e9-mat);
  text-align: left; box-shadow: var(--e9-bong1); transition: background-color .15s, box-shadow .15s; }
.edd-c .edd-ic, .edd-c .edd-sp { width: 28px; height: 28px; }
.edd-c span { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edd-c:hover { background: var(--e9-nhan-nh); }
.edd-c[aria-selected="true"] { background: var(--e9-nhan-nh); color: var(--edd-nhan); box-shadow: 0 0 0 2px var(--edd-nhan); }
.edd-c.is-chay .edd-ic, .edd-c.is-chay .edd-sp { animation: edd-nhun .7s ease-in-out infinite alternate; }
@keyframes edd-nhun { to { transform: translateY(-3px) scale(1.08); } }
.edd-c.is-chay .edd-sp { animation-name: edd-nhun-sp; }
@keyframes edd-nhun-sp { from { transform: rotate(0); } to { transform: rotate(18deg) scale(1.08); } }
.edd-rong { grid-column: 1 / -1; margin: 18px 0; text-align: center; color: var(--e9-chu2); }

.edd-play { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.edd-go { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 148px; min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px;
  background: var(--edd-nhan); color: #fff !important; font-size: 16px !important; font-weight: 800 !important; letter-spacing: .02em;
  box-shadow: 0 3px 0 color-mix(in srgb, var(--edd-nhan) 60%, #000), 0 6px 14px color-mix(in srgb, var(--edd-nhan) 35%, transparent);
  transition: transform .12s, box-shadow .12s, filter .2s; }
:root[data-theme=dark] .edd-go { color: #0b1220 !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme=light]) .edd-go { color: #0b1220 !important; } }
.edd-go:hover { filter: brightness(1.06); }
.edd-go:active { transform: translateY(2px); box-shadow: 0 1px 0 color-mix(in srgb, var(--edd-nhan) 60%, #000); }
.edd-go:disabled { opacity: .5; cursor: not-allowed; }
.edd-go.is-cho svg { display: none; }
.edd-go.is-cho::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent;
  animation: edd-quay .7s linear infinite; }
@keyframes edd-quay { to { transform: rotate(360deg); } }
.edd-btn { display: flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 16px 0 12px; border: 0; border-radius: 999px; background: var(--e9-mat);
  box-shadow: var(--e9-bong1); font-weight: 700 !important; transition: background-color .15s, opacity .15s; }
.edd-btn .edd-ic { width: 24px; height: 24px; }
.edd-btn:disabled { opacity: .45; cursor: default; }
.edd-btn[aria-pressed="true"] { background: var(--e9-nhan-nh); color: var(--edd-nhan); box-shadow: 0 0 0 2px var(--edd-nhan); }
.edd-now { flex: 1 1 160px; margin: 0; color: var(--e9-chu2); font-size: 13.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edd-now strong { color: var(--e9-chu); }
.edd-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #16a34a; vertical-align: 1px;
  animation: edd-dot 1s ease-in-out infinite alternate; }
@keyframes edd-dot { to { opacity: .35; } }

/* ── Pose ── */
.edd-poses { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.edd-pz { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 88px; padding: 10px 4px; border: 0;
  border-radius: var(--edd-r); background: var(--e9-mat); box-shadow: var(--e9-bong1); font-weight: 700 !important; font-size: 13px !important;
  transition: transform .15s, background-color .2s, box-shadow .2s; }
.edd-pz .edd-ic { width: 36px; height: 36px; }
.edd-pz:hover { transform: translateY(-2px); }
.edd-pz[aria-pressed="true"] { background: var(--e9-nhan-nh); color: var(--edd-nhan); box-shadow: 0 0 0 2px var(--edd-nhan), var(--e9-bong1); }
.edd-pz[data-rot][aria-pressed="true"] .edd-ic { animation: edd-xoay 3s linear infinite; }
@keyframes edd-xoay { to { transform: rotate(360deg); } }
.edd-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.edd-lb { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--e9-chu2); }
.edd-seg { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--e9-mat); box-shadow: var(--e9-bong1); }
.edd-seg button { min-width: 56px; min-height: 40px; border: 0; border-radius: 999px; background: none; font-weight: 700 !important; }
.edd-seg button[aria-checked="true"] { background: var(--e9-nhan-nh); color: var(--edd-nhan); }

/* ── Scene ── */
.edd-bgc { margin-bottom: 8px; flex: none; }
.edd-bgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; max-height: 330px; overflow-y: auto; padding: 2px 4px 4px 2px;
  scrollbar-width: thin; overscroll-behavior: contain; }
.edd-bg { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 4px 4px 6px; border: 0; border-radius: 12px; background: var(--e9-mat);
  box-shadow: var(--e9-bong1); text-align: left; cursor: pointer; transition: transform .15s, box-shadow .2s; }
.edd-bg img, .edd-none, .edd-up { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border-radius: 9px; object-fit: cover; background: var(--e9-mat2); }
.edd-none { background: repeating-conic-gradient(var(--e9-mat2) 0 25%, var(--e9-mat) 0 50%) 0 0 / 16px 16px; }
.edd-up { display: grid; place-items: center; color: var(--edd-nhan); background: var(--e9-nhan-nh); }
.edd-up svg { width: 28px; height: 28px; }
.edd-bgn { font-size: 12px; font-weight: 600; line-height: 1.25; padding: 0 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.edd-bg:hover { transform: translateY(-2px); box-shadow: var(--e9-bong2); }
.edd-bg[aria-selected="true"] { box-shadow: 0 0 0 3px var(--edd-nhan), var(--e9-bong1); }
.edd-bg[aria-selected="true"]::after { content: ""; position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--edd-nhan) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='m9.5 16.2-4-4 1.4-1.4 2.6 2.6 6.6-6.6 1.4 1.4z'/%3E%3C/svg%3E") center / 18px no-repeat; }

/* ── tablet hẹp ── */
@media (max-width: 900px) {
  .edd-poses { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ── ĐT: studio nằm trong cửa sổ "Scene" của thanh đáy N9BAR ── */
@media (min-width: 641px) {
  .edd-chips { flex-wrap: wrap; overflow: visible; }
  .edd-cbar { align-items: flex-start; }
}

@media (max-width: 640px) {
  .edd { margin-top: 0; padding: 6px 2px; background: none; min-height: 0; contain: none; }
  .edd-top { position: sticky; top: 0; z-index: 2; margin: 0 -2px 8px; padding: 4px 2px 6px; background: var(--e9-mat, #fff); }
  .edd-tabs { width: 100%; }
  .edd-tab { flex: 1; justify-content: center; padding: 0 8px; }
  .edd-zoom input[type=range] { width: 84px; }
  .edd-zoom .edd-snap span { display: none; }
  .edd-zoom .edd-snap { padding: 0; width: 44px; }
  .edd-wpn { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 80px; overflow-x: auto; scroll-snap-type: x proximity;
    scrollbar-width: none; overscroll-behavior-x: contain; }
  .edd-clips { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: none; overflow: visible; }
  .edd-bgs { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: none; overflow: visible; }
  .edd-tim { flex: 1 1 100%; }
  .edd-play { position: sticky; bottom: 0; z-index: 2; margin: 10px -2px 0; padding: 8px 2px; background: var(--e9-mat, #fff); }
  .edd-go { flex: 1; }
  .edd-now { flex-basis: 100%; order: 3; }
}

@media (prefers-reduced-motion: reduce) {
  .edd *, .edd *::after { animation: none !important; transition: none !important; }
}
