@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Noto Sans Thai";
  src: url("fonts/noto-sans-thai.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
:root {
  color-scheme: light;
  --bg: #f3f0ed;
  --surface: #fff;
  --surface-high: #f3eeec;
  --soft: #fcfaf9;
  --ink: #282327;
  --muted: #655c60;
  --line: #e7ddda;
  --accent: #ac304c;
  --accent-ink: #fff;
  --accent-hover: #88243b;
  --danger: #a42a41;
  --radius: 18px;
  --shadow: 0 2px 3px #3c252407, 0 8px 24px #49303108;
  --sidebar: 228px;
  --motion-ease: cubic-bezier(.2,.7,.25,1);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Inter", "Noto Sans Thai", "Segoe UI", Tahoma, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); min-height: 100svh; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled, input:disabled { opacity: .48; cursor: default; }
button, a, input, select, summary { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--accent); }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(2rem, 3.8vw, 2.9rem); letter-spacing: -.055em; line-height: 1.16; font-weight: 760; }
h2 { font-size: 1.22rem; line-height: 1.38; letter-spacing: -.026em; }
h3 { margin: 0; font-size: 1.06rem; line-height: 1.4; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
.pane { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.studio-shell { padding-inline-start: var(--sidebar); }
.studio-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 5; background: #fffdfc; border-right: 1px solid var(--line); padding: 22px 15px 15px; display: flex; flex-direction: column; gap: 25px; overflow: auto; }
.studio-sidebar > .brand { padding: 0 8px; }
.studio-topbar { position: sticky; inset: 0 0 auto; z-index: 3; display: flex; align-items: center; min-height: 58px; border-bottom: 1px solid var(--line); padding: 8px max(28px, calc((100% - var(--sidebar) - 1270px) / 2)); background: #fffcfaf0; backdrop-filter: blur(12px); }
.studio-path { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .88rem; }
.studio-path a:hover, .studio-path strong { color: var(--ink); }
.studio-path-divider { width: 6px; height: 6px; border-top: 1px solid #987f7d; border-right: 1px solid #987f7d; transform: rotate(45deg); }
.studio-mobile { display: none; }
.sidebar-footer { margin-top: auto; }
.sidebar-footer .button { width: 100%; justify-content: flex-start; color: var(--muted); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 760; letter-spacing: -.025em; white-space: nowrap; }
.brand small { display: block; color: var(--muted); font-weight: 550; font-size: .75rem; letter-spacing: 0; }
.brand img { border-radius: 8px; image-rendering: auto; object-fit: contain; }
nav { display: flex; gap: 6px; }
nav a { color: var(--muted); padding: 9px 14px; border-radius: 10px; }
nav a[aria-current="page"], nav a:hover { background: var(--surface-high); color: var(--ink); }
.studio-nav { display: grid; gap: 21px; }
.nav-group { display: grid; gap: 3px; }
.nav-group-name { padding-inline: 11px; margin-bottom: 3px; color: var(--muted); font-size: .75rem; font-weight: 650; }
.studio-nav a { display: flex; align-items: center; gap: 11px; min-height: 43px; padding-inline: 11px; font-size: .91rem; font-weight: 580; }
.studio-nav a[aria-current="page"] { color: var(--accent); background: #fae8ee; font-weight: 700; }
.nav-icon { position: relative; flex: 0 0 17px; height: 17px; border: 1.6px solid currentColor; border-radius: 4px; }
.nav-icon.dashboard::after { content: ""; position: absolute; inset: 3px; background: linear-gradient(currentColor, currentColor) center / 1px 100% no-repeat, linear-gradient(currentColor, currentColor) center / 100% 1px no-repeat; }
.nav-icon.cube { transform: rotate(-12deg); border-radius: 3px; }
.nav-icon.cube::after { content: ""; position: absolute; inset: 5px 0 auto; border-top: 1.5px solid currentColor; }
.nav-icon.chat { height: 14px; }
.nav-icon.chat::after { content: ""; position: absolute; bottom: -3px; left: 3px; height: 5px; width: 5px; background: var(--surface); border-bottom: 1.5px solid currentColor; border-left: 1.5px solid currentColor; transform: rotate(-45deg); }
.nav-icon.server::after { content: ""; position: absolute; inset: 4px 2px; border-block: 1px solid currentColor; }
.nav-icon.folder { height: 13px; }
.nav-icon.folder::after { content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 3px; border: 1.4px solid currentColor; border-radius: 2px 2px 0 0; }
.nav-icon.merge::before, .nav-icon.merge::after { content: ""; position: absolute; width: 7px; top: 6px; left: 3px; border-top: 1.5px solid currentColor; }
.nav-icon.merge::after { transform: rotate(90deg); }
.nav-icon.install::before, .nav-icon.install::after { content: ""; position: absolute; }
.nav-icon.install::before { inset: 2px auto 5px 6px; border-left: 1.5px solid currentColor; }
.nav-icon.install::after { width: 6px; height: 6px; left: 3.5px; bottom: 4px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.nav-icon.remove { border-radius: 4px 4px 6px 6px; }
.nav-icon.remove::before { content: ""; position: absolute; left: 3px; right: 3px; top: -4px; border-top: 1.5px solid currentColor; }
.nav-icon.remove::after { content: ""; position: absolute; left: 5px; right: 5px; top: 3px; bottom: 3px; border-inline: 1px solid currentColor; }
.page { width: min(100% - 56px, 1270px); margin: 29px auto 60px; }
.page-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; margin-bottom: 24px; }
.page-head p { margin-top: 8px; }
.workspace-heading { padding: 7px 1px 3px; margin-bottom: 21px; }
.workspace-heading h1 { color: var(--ink); }
.workspace-heading p { margin-top: 7px; color: var(--muted); }
.pack-usage-link { margin: 15px 2px; font-size: .93rem; }
.pack-usage-link a { color: var(--accent); text-decoration: underline; text-underline-offset: .16em; }
.dashboard-tools { margin-bottom: 23px; }
.dashboard-tools > h2, .dashboard-servers > h2 { margin-bottom: 11px; }
.tool-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tool-tile { position: relative; display: grid; align-content: start; gap: 4px; min-width: 0; min-height: 144px; padding: 13px 15px; overflow-wrap: anywhere; --tile-fg: #a12d49; --tile-bg: #fbe1e9; }
.tool-tile.chat { --tile-fg: #225c89; --tile-bg: #dfeefa; }
.tool-tile.merge { --tile-fg: #79570b; --tile-bg: #fff0cd; }
.tool-tile.install { --tile-fg: #1e6751; --tile-bg: #ddf4e8; }
.tool-icon { display: grid; place-items: center; width: 39px; height: 39px; margin-bottom: 4px; border-radius: 11px; background: var(--tile-bg); color: var(--tile-fg); }
.tool-icon .nav-icon { width: 17px; }
.tool-icon .chat::after { background: var(--tile-bg); }
.tool-tile strong { font-size: .99rem; letter-spacing: -.024em; }
.tool-tile .muted { font-size: .84rem; }
.tool-arrow { position: absolute; inset: 13px 14px auto auto; color: var(--tile-fg); font-size: 1.12rem; }
.server-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.server-card { min-width: 0; padding: 18px 20px; }
.card-top, .server-address, .console-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.engine-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: #cfefe4; color: #165b47; font-size: 1.4rem; font-weight: 800; }
.purpur .engine-mark { background: #eee4fa; color: #61488b; }
.server-card h2 { font-size: 1.6rem; margin-top: 14px; }
.status { flex: none; color: #435471; border-radius: 99px; background: #e8edf5; padding: 4px 11px; font-size: .88rem; font-weight: 650; }
.status[data-color="running"] { background: #e2f6ea; color: #176440; }
.status[data-color="starting"], .status[data-color="stopping"] { background: #fff1d4; color: #805407; }
.status[data-color="error"], .status[data-color="unknown"] { background: #ffedf0; color: var(--danger); }
.server-address { border-top: 1px solid var(--line); padding-top: 13px; margin: 17px 0 13px; }
code, pre { font-family: "Cascadia Code", Consolas, monospace; }
.server-address code { color: #56494e; overflow-wrap: anywhere; }
.actions { display: flex; gap: 9px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 43px; border-radius: 11px; border: 1px solid transparent; padding: 7px 14px; color: var(--ink); background: var(--surface-high); font-weight: 650; white-space: nowrap; }
.primary { color: var(--accent-ink); background: linear-gradient(115deg, #b93645, #a02f6b); box-shadow: 0 3px 7px #ad39572b; }
.primary:not(:disabled):hover { background: linear-gradient(115deg, #a32c3d, var(--accent-hover)); }
.quiet { border-color: var(--line); background: var(--surface); }
.quiet:not(:disabled):hover { background: var(--surface-high); }
.danger { color: var(--danger); background: #fff0f1; border-color: #f1cbd2; }
.danger:not(:disabled):hover { background: #ffe3e8; }
.wide { width: 100%; }
.console-pane { margin-top: 18px; padding: 18px; }
.console-head { margin-bottom: 12px; }
.switcher { display: flex; gap: 3px; border: 1px solid var(--line); background: var(--soft); padding: 3px; border-radius: 11px; }
.switcher button { border: 0; background: transparent; border-radius: 8px; color: var(--muted); padding: 5px 12px; min-height: 36px; }
.switcher button[aria-pressed="true"] { color: var(--ink); background: var(--surface-high); }
.terminal { height: 255px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; padding: 14px; background: #211f24; border: 1px solid #423841; border-radius: 11px; color: #e4d9df; font-size: .87rem; }
.command-row { display: flex; gap: 9px; margin-top: 10px; }
.command-row input { flex: 1; min-width: 0; }
input:not([type="checkbox"]), select { min-height: 44px; width: 100%; border: 1px solid #dacfcf; border-radius: 10px; color: var(--ink); background: var(--surface); padding: 9px 12px; }
input::placeholder { color: #766a6e; }
label { font-weight: 620; }
label input:not([type="checkbox"]), label select { display: block; margin-top: 6px; font-weight: 400; }
.stack { display: grid; gap: 15px; }
.login-shell { min-height: 100svh; display: grid; place-items: center; padding: 25px; background: radial-gradient(ellipse at 50% 0%, #f8e4eb, transparent 67%); }
.login-card { width: min(100%, 450px); padding: 34px; box-shadow: 0 24px 80px #5231321a; }
.login-brand { margin-bottom: 24px; }
.login-card .muted { margin: 8px 0 19px; }
.login-card .password-row { margin-top: -9px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.login-card .wide { margin-top: 6px; }
.notice { margin: 12px 0; padding: 9px 13px; border: 1px solid #bce0d0; border-radius: 10px; background: #edf9f2; color: #1c6244; overflow-wrap: anywhere; }
.notice.error { color: #91243b; background: #fff1f3; border-color: #f3c7d0; }
.confirm { width: min(100% - 32px, 370px); padding: 23px; color: var(--ink); }
.confirm::backdrop { background: #040916c9; }
.confirm p { margin: 9px 0 18px; }
.confirm .actions { justify-content: flex-end; }
.export-page { max-width: 850px; }
.uninstall-page { max-width: 940px; }
.uninstall-toolbar { display: grid; grid-template-columns: minmax(220px, .65fr) minmax(250px, 1fr); gap: 18px; align-items: end; padding: 17px 19px; }
.uninstall-toolbar .muted { padding-bottom: 11px; }
.uninstall-safety { margin: 14px 0; }
.uninstall-list { display: grid; gap: 12px; }
.uninstall-card { padding: 17px 19px; }
.uninstall-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.uninstall-card-heading > div { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.uninstall-badge { padding: 3px 9px; border-radius: 99px; background: #e2f6ea; color: #176440; font-size: .82rem; font-weight: 650; }
.uninstall-details { margin-top: 8px; }
.uninstall-paths { display: grid; gap: 4px; margin: 12px 0 0; padding: 11px 12px; list-style: none; border-radius: 10px; background: var(--soft); overflow-wrap: anywhere; }
.uninstall-paths code { color: #56494e; font-size: .85rem; }
.uninstall-empty { display: grid; justify-items: center; gap: 7px; padding: 34px 18px; text-align: center; }
.uninstall-empty-icon { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 50%; color: #176440; background: #e2f6ea; font-size: 1.3rem; font-weight: 800; }
.uninstall-page [data-pack-feedback] { margin: 14px 0; white-space: pre-line; }
.preview-page { max-width: 1180px; }
.export-form { padding: 22px; gap: 21px; }
.pack-import { margin-top: 17px; }
.pack-import .muted { margin-top: 5px; }
.export-form .notice { margin: 0; }
.drop-zone { position: relative; min-height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; text-align: center; border: 1.5px dashed #b991a3; background: #fcf5f8; border-radius: 15px; cursor: pointer; padding: 16px; overflow-wrap: anywhere; }
.drop-zone:hover, .drop-zone.dragging, .drop-zone:focus-within { border-color: var(--accent); background: #f9e9f0; }
.drop-zone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; font-size: 1.34rem; color: var(--accent); background: #f7e3ed; }
.drop-zone .muted { font-size: .9rem; font-weight: 400; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 15px; }
.pack-defaults { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.item-overrides { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 15px; }
.item-overrides-head { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.item-overrides-head .muted { margin-top: 4px; font-size: .92rem; }
.item-override-name { display: grid; gap: 3px; padding-top: 4px; overflow-wrap: anywhere; }
.item-override-name code { color: var(--muted); font-size: .86rem; }
.preview-workspace { display: grid; grid-template-columns: minmax(128px, .8fr) minmax(0, 2fr) minmax(180px,.9fr); gap: 11px; }
.preview-items, .preview-stage, .preview-settings { min-width: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.preview-stage { overflow: hidden; }
.preview-items { display: grid; align-content: start; gap: 4px; padding: 7px; max-height: 434px; overflow: auto; }
.preview-items button, .preview-pose button { background: transparent; color: var(--muted); border: 0; border-radius: 8px; padding: 8px 9px; font-weight: 650; }
.preview-items button { text-align: left; overflow-wrap: anywhere; }
.preview-items button:hover, .preview-pose button:hover { background: var(--surface-high); }
.preview-items button[aria-pressed="true"], .preview-pose button[aria-pressed="true"] { color: var(--accent); background: #f8e8ef; }
.preview-pose { display: flex; flex-wrap: wrap; gap: 2px; padding: 7px; }
.preview-pose select { width: auto; max-width: 100%; font-size: .86rem; }
.preview-viewport { position: relative; background: #111b2d; min-height: 315px; }
.preview-viewport canvas { display: block; width: 100%; height: clamp(365px, 35vw, 440px); touch-action: none; }
.preview-viewport[data-fps] { min-height: 0; height: auto; aspect-ratio: 16 / 9; }
.preview-viewport[data-fps="classic"] { aspect-ratio: 4 / 3; }
.preview-viewport[data-fps="ultrawide"] { aspect-ratio: 21 / 9; }
.preview-viewport[data-fps] canvas { position: absolute; inset: 0; height: 100%; min-height: 0; }
.preview-fps-frame { position: absolute; inset: 13.75%; border: 1px solid #f1f6ffbf; box-shadow: 0 0 0 100vmax #111b2d4d; pointer-events: none; }
.preview-viewport[data-fps] { overflow: hidden; }
.preview-crosshair { position: absolute; top: 50%; left: 50%; translate: -50% -50%; width: 15px; height: 15px; pointer-events: none; filter: drop-shadow(0 1px 1px #111b2d); }
.preview-crosshair::before, .preview-crosshair::after { content: ""; position: absolute; background: #fff; opacity: .9; }
.preview-crosshair::before { inset: 6px 0 7px; }
.preview-crosshair::after { inset: 0 7px 0 6px; }
.preview-gizmo { position: absolute; top: 9px; left: 9px; right: 9px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; pointer-events: none; }
.preview-gizmo button { pointer-events: auto; min-height: 36px; padding: 4px 10px; border: 1px solid #4f607d; border-radius: 8px; background: #1b2940; color: #e0e9f9; font-size: .86rem; font-weight: 650; }
.preview-gizmo button:hover, .preview-gizmo button[aria-pressed="true"] { background: #e5edff; border-color: #e5edff; color: #17243c; }
.preview-gizmo button:focus-visible { outline-color: #c7dcff; }
.preview-shelf-options { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 13px; padding: 6px 9px; }
.preview-shelf-options label:first-child { display: flex; align-items: center; gap: 7px; }
.preview-shelf-options select { width: auto; margin: 0; }
.preview-player-options { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 9px; }
.preview-player-options label { display: flex; align-items: center; gap: 7px; }
.preview-player-options select { width: auto; margin: 0; }
.preview-player-options .preview-idle { flex-basis: 100%; flex-wrap: wrap; }
.preview-idle input[type="range"] { width: min(100%, 175px); padding: 0; margin: 0; border: 0; accent-color: var(--accent); }
.preview-fps-options { display: flex; flex-wrap: wrap; gap: 8px 13px; align-items: center; padding: 8px 9px; border-bottom: 1px solid var(--line); }
.preview-fps-options label:not(.check) { display: flex; align-items: center; gap: 6px; }
.preview-fps-options select { width: auto; margin: 0; }
.preview-overlay { position: absolute; bottom: 60px; left: 12px; right: 12px; }
.preview-tools { position: absolute; right: 10px; bottom: 9px; display: flex; gap: 4px; }
.preview-tools .button { min-height: 34px; padding: 4px 8px; }
.preview-turns { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.preview-turns label { display: inline-flex; align-items: center; gap: 6px; }
.preview-turns select { width: auto; margin: 0; }
.preview-detail { font-size: .86rem; padding: 3px 8px 8px; }
.preview-settings { display: grid; align-content: start; gap: 13px; padding: 12px; }
.preview-settings .preview-detail { padding: 0; }
.display-editor { grid-column: 2 / -1; min-width: 0; padding: 15px; background: var(--soft); }
.display-editor-head, .display-editor-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.display-editor-head .muted, .display-editor-footer { font-size: .85rem; }
.display-vectors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 10px 0; }
.display-vectors fieldset { min-width: 0; margin: 0; padding: 7px 9px 9px; border: 1px solid var(--line); border-radius: 10px; }
.display-vectors legend { padding: 0 5px; font-weight: 700; }
.display-vectors legend small { color: var(--muted); font-weight: 500; }
.display-axes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.display-axes label { min-width: 0; }
.display-axes input[type="number"] { padding: 5px 2px; text-align: center; font-variant-numeric: tabular-nums; appearance: textfield; }
.display-axes input::-webkit-inner-spin-button { appearance: none; }
.display-axes [data-scrub] { display: block; padding: 5px 0 1px; text-align: center; cursor: ew-resize; touch-action: none; user-select: none; }
.display-axes [data-scrub]:hover { color: var(--accent); }
.preview-warnings { margin: 0; padding-inline-start: 21px; color: #81550a; font-size: .89rem; overflow-wrap: anywhere; }
.pack-review { padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: var(--soft); }
.pack-review .muted, [data-import-review] .muted { margin: 4px 0 8px; }
.pack-review .export-actions { margin-top: 10px; }
[data-audit-summary] ul { margin: 4px 0; padding-inline-start: 23px; }
[data-audit-summary] .notice + .notice { margin-top: 8px; }
.audit-targets { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 8px; margin: 8px 0; }
.audit-target { border: 1px solid var(--line); border-radius: 9px; background: var(--surface); padding: 8px 11px; }
.audit-target strong, .audit-target span { display: block; }
.export-form [data-export-feedback] { white-space: pre-line; }
.notice.audit-warnings { color: #78510b; background: #fff8e9; border-color: #ead39e; }
summary { cursor: pointer; color: #314872; padding: 4px 0; }
.extras { margin-top: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.check { display: flex; align-items: center; gap: 9px; font-weight: 400; }
.check input { accent-color: var(--accent); width: 18px; height: 18px; }
.merge-items { display: grid; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); max-height: 390px; overflow: auto; }
.merge-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(145px,.48fr); padding: 10px 13px; gap: 10px; align-items: center; }
.merge-item + .merge-item { border-top: 1px solid var(--line); }
.merge-item .check { min-height: 44px; }
.merge-item .check input { flex: none; }
.merge-item strong, .merge-item small { display: block; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .merge-item { grid-template-columns: 1fr; }
}
.export-actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 10px; }
.emoji-workspace { display: grid; grid-template-columns: minmax(250px,.72fr) minmax(0,1.28fr); gap: 17px; align-items: start; }
.emoji-panel { padding: clamp(16px, 2.15vw, 25px); min-width: 0; gap: 16px; align-content: start; }
.emoji-upload { min-height: 132px; }
.emoji-settings { border-top: 1px solid var(--line); padding-top: 15px; }
.emoji-metrics { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 9px; }
.emoji-panel .notice { margin: 0; white-space: pre-line; }
.emoji-preview-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 7px; }
.preview-scale { padding: 4px 8px; border-radius: 7px; color: #664381; background: #f0e8f7; font-size: .8rem; font-weight: 650; }
.chat-preview { position: relative; display: flex; flex-direction: column; justify-content: end; isolation: isolate; min-height: 278px; padding: 13px; overflow: hidden; border-radius: 13px; background: linear-gradient(180deg, #77a5dc 0%, #afcae8 61%, #68945b 62%, #496f48 100%); color: #fff; font: 650 clamp(.91rem, 2.07vw, 1.31rem)/27px "Cascadia Mono", Consolas, "Noto Sans Thai", monospace; text-shadow: 2px 2px #20232e; }
.chat-preview::before, .chat-preview::after { content: ""; position: absolute; z-index: -1; inset: 0; }
.chat-preview::before { background: #708e90; clip-path: polygon(0 60%, 0 47%, 11% 47%, 11% 40%, 22% 40%, 22% 45%, 32% 45%, 32% 53%, 42% 53%, 42% 57%, 57% 57%, 57% 49%, 65% 49%, 65% 41%, 79% 41%, 79% 49%, 92% 49%, 92% 53%, 100% 53%, 100% 66%, 0 66%); }
.chat-preview::after { background: linear-gradient(180deg, transparent 56%, #15292480); }
.chat-previous, .chat-line { align-self: start; max-width: 100%; padding: 0 7px; background: #070b10b8; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-previous { color: #e1e9df; }
.chat-line { min-height: 27px; }
.chat-prefix { color: #fbfbff; }
.chat-glyph-slot { position: relative; display: inline-block; height: 0; vertical-align: top; }
.chat-glyph { position: absolute; display: block; left: 0; image-rendering: pixelated; pointer-events: none; }
.chat-entry { position: relative; z-index: 1; display: flex; align-items: center; min-height: 36px; gap: 3px; margin-top: 13px; padding: 4px 7px; background: #090d14d9; font-size: .84em; overflow-wrap: anywhere; }
.chat-entry span:first-child { min-width: 0; }
.chat-caret { width: 8px; flex: 0 0 8px; height: 2px; align-self: end; margin-bottom: 6px; background: #fff; }
.emoji-token { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 7px; padding: 9px; border-radius: 10px; background: var(--surface-high); }
.emoji-token code { overflow-wrap: anywhere; min-width: 0; color: #713c58; }
.emoji-install { font-size: .88rem; color: var(--muted); overflow-wrap: anywhere; }
.emoji-install p { margin-top: 7px; }
.files-panel { padding: 20px; }
.files-topbar, .files-tools, .path-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 9px;
}
.files-topbar { justify-content: space-between; }
.path-bar { margin: 15px 0 13px; }
.file-path { flex: 1; flex-wrap: wrap; align-items: center; min-width: min(100%, 220px); gap: 4px; }
.file-path button { border: 0; color: #324f80; background: transparent; padding: 6px 8px; text-align: left; overflow-wrap: anywhere; border-radius: 7px; }
.file-path button:hover { background: var(--surface-high); }
.file-path [aria-current="location"] { font-weight: 750; }
.file-path span { color: var(--muted); }
.file-upload { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; padding: 12px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; }
.file-picker { position: relative; flex: 1; min-width: min(100%, 230px); border: 1px dashed #92a8c8; border-radius: 9px; padding: 9px 12px; overflow-wrap: anywhere; cursor: pointer; }
.file-picker:hover, .file-picker.dragging, .file-picker:focus-within { border-color: var(--accent); }
.file-picker input[type="file"] { position: absolute; inset: 0; margin: 0; width: 100%; opacity: 0; cursor: pointer; }
.file-upload .check { font-size: .9rem; }
.file-list { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.file-list table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.file-list thead { text-align: left; color: #435675; background: var(--soft); }
.file-list th, .file-list td { padding: 10px 12px; }
.file-list th:nth-child(2) { width: 100px; }
.file-list th:nth-child(3) { width: 175px; }
.file-list th:last-child { width: 185px; }
.file-list td { border-top: 1px solid var(--line); height: 54px; }
.file-list tbody tr:hover { background: var(--soft); }
.file-list td:nth-child(2), .file-modified { color: var(--muted); font-size: .9rem; }
.file-name { display: flex; align-items: center; gap: 9px; overflow-wrap: anywhere; }
.file-name button { color: #304875; background: transparent; text-align: left; padding: 3px 0; border: 0; overflow-wrap: anywhere; }
.file-name button:hover { text-decoration: underline; }
.file-glyph { width: 19px; height: 16px; flex: none; border: 1px solid #8fa8d6; border-radius: 3px; background: #e5eeff; }
.file-glyph.folder { width: 20px; height: 14px; background: #f9e9be; border-color: #e8bf73; position: relative; }
.file-glyph.folder::before { content: ""; position: absolute; width: 9px; height: 4px; top: -4px; left: 1px; background: #e8bf73; border-radius: 2px 2px 0 0; }
.file-row-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.file-row-actions .button { min-height: 35px; padding: 4px 8px; font-size: .88rem; }
.file-empty, .file-count { padding: 9px 13px; }
.file-empty { text-align: center; padding: 30px 15px; }
.file-count:empty { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
@media (max-width: 990px) {
  .studio-shell { padding-inline-start: 0; }
  .studio-sidebar, .studio-topbar { display: none; }
  .studio-mobile { position: sticky; top: 0; z-index: 5; display: flex; gap: 11px; min-height: 60px; align-items: center; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
  .studio-mobile summary { list-style: none; display: flex; align-items: center; gap: 7px; min-height: 44px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); }
  .studio-mobile summary::-webkit-details-marker { display: none; }
  .studio-mobile details:not([open]) .mobile-drawer { display: none; }
  .menu-bars { width: 13px; height: 9px; border-block: 1.5px solid currentColor; }
  .mobile-drawer { position: absolute; top: 100%; inset-inline-start: 10px; width: min(260px, calc(100vw - 20px)); max-height: calc(100dvh - 68px); overflow: auto; border: 1px solid var(--line); border-radius: 0 0 14px 14px; padding: 11px; background: var(--surface); box-shadow: var(--shadow); }
  .mobile-drawer .sidebar-footer { margin-top: 13px; }
}
@media (max-width: 780px) {
  .display-vectors { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .page { width: calc(100% - 30px); margin-top: 25px; }
  .workspace-heading { padding: 2px 1px; }
  .emoji-workspace { grid-template-columns: 1fr; }
  .chat-preview { min-height: 215px; }
  .server-grid { grid-template-columns: 1fr; }
  .uninstall-toolbar { grid-template-columns: 1fr; gap: 7px; }
  .uninstall-toolbar .muted { padding-bottom: 0; }
  .uninstall-card { padding: 14px; }
  .page-head > .button { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .preview-workspace { grid-template-columns: 1fr; }
  .display-editor { grid-column: 1; }
  .preview-items { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 135px; }
  .preview-viewport, .preview-viewport canvas { height: 320px; min-height: 320px; }
  .preview-gizmo button { min-height: 44px; }
  .login-card, .server-card { padding: 20px; }
  .console-pane { padding: 13px; }
  .files-panel { padding: 11px; }
  .path-bar { gap: 5px; }
  .file-list th, .file-list td { padding: 8px; }
  .file-list th:nth-child(2) { width: 65px; }
  .file-list th:last-child { width: 91px; }
  .file-list .file-modified { display: none; }
  .file-upload { gap: 8px; }
  .file-upload .file-picker { flex-basis: 100%; }
}
@media (prefers-reduced-motion: no-preference) {
  @keyframes studio-enter { from { opacity: 0; translate: 0 7px; } }
  .studio-shell .page { animation: studio-enter 205ms var(--motion-ease); }
  :where(.button, .studio-nav a, .tool-tile, .switcher button, .preview-items button, .preview-pose button, .studio-mobile summary) {
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 170ms ease,
                translate 180ms var(--motion-ease), scale 120ms var(--motion-ease);
  }
  :where(.button:not(:disabled), .studio-nav a, .tool-tile, .switcher button, .preview-items button, .preview-pose button, .studio-mobile summary):active { scale: .975; }
  .studio-mobile details[open] .mobile-drawer { animation: studio-enter 185ms var(--motion-ease) both; }
  .confirm[open] { animation: studio-enter 170ms var(--motion-ease) both; }
}
@media (hover: hover) {
  .tool-tile:hover { border-color: color-mix(in srgb, var(--tile-fg) 38%, var(--line)); box-shadow: 0 8px 19px #49303114; }
  @media (prefers-reduced-motion: no-preference) {
    .tool-tile:hover { translate: 0 -2px; }
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
