/* Tiles, lists and step-by-step guide shared by Bắt đầu, Đóng gói and Chuẩn bị máy chủ. */
:root {
  --accent: #2f6be8;
  --accent-soft: #eef4ff;
  --ink: #1f3557;
  --ink-soft: #5d708c;
  --ok: #1f9d68;
  --ok-soft: #e8f7f0;
  --code-bg: #0f1726;
  --code-line: #1f2b40;
}
.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.button .icon {
  width: 16px;
  height: 16px;
}
.button.link {
  background: none;
  border: 0;
  box-shadow: none;
  color: #7a8ca6;
  font-size: 13px;
  padding: 6px 0;
  min-height: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.button.link:hover:not(:disabled) {
  background: none;
  color: #c0475d;
  transform: none;
}
.optional {
  font-size: 11px;
  font-weight: 500;
  color: #93a3ba;
  margin-left: 8px;
}
.category-tabs {
  overflow-x: auto;
  scrollbar-width: none;
}
.category-tabs button {
  white-space: nowrap;
  flex-shrink: 0;
}
.category-icon .icon {
  width: 19px;
  height: 19px;
}
#workspace-lead {
  margin: 0;
  font-size: 15px;
  color: #5f7290;
  max-width: 560px;
}
.studio-heading h1 {
  margin: 10px 0 6px;
}

/* ---------- choice tiles ---------- */
.choices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: 10px;
}
.choice {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  min-height: 124px;
  padding: 16px 16px 15px;
  text-align: left;
  border: 1px solid #dde6f2;
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    background 0.15s;
}
.choice:hover {
  border-color: #a8c1ea;
  box-shadow: 0 6px 18px #2b4c8014;
}
.choice.on {
  border-color: var(--accent);
  background: #f5f8ff;
  box-shadow: inset 0 0 0 1px var(--accent);
}
.choice-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: #eef3fb;
  color: #3d6199;
  font: 600 12.5px var(--mono);
  letter-spacing: -0.3px;
}
.choice.on .choice-icon {
  background: var(--accent);
  color: #fff;
}
.choice-text {
  display: block;
  min-width: 0;
  padding-right: 4px;
}
.choice-text strong {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
}
.choice-text small {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.choice-badge {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ok);
  background: var(--ok-soft);
  border-radius: 20px;
  padding: 1px 8px;
  white-space: nowrap;
}
.choice-note {
  display: inline-block;
  margin-top: 8px;
  font: 11px var(--mono);
  color: #8a6420;
  background: #fff6e2;
  border-radius: 6px;
  padding: 2px 7px;
  overflow-wrap: anywhere;
}
.choice-check {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid #c8d4e6;
  background: #fff;
  color: transparent;
}
.choices[data-multi] .choice-check {
  border-radius: 6px;
}
.choice-check .icon {
  width: 13px;
  height: 13px;
  stroke-width: 2.6;
}
.choice.on .choice-check {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.choices.list {
  grid-template-columns: 1fr;
  gap: 6px;
}
.choices.list .choice {
  flex-direction: row;
  align-items: center;
  min-height: 0;
  padding: 11px 14px;
  gap: 14px;
}
.choices.list .choice-icon {
  width: 32px;
  height: 32px;
  font-size: 11.5px;
}
.choices.list .choice-text {
  flex: 1;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 12px;
}
.choices.list .choice-text small {
  margin: 0;
}
.choices.list .choice-note {
  margin: 0;
}
.choices.list .choice-check {
  position: static;
}
.layout-toggle {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid #e1e8f2;
  border-radius: 9px;
  background: #f3f6fb;
  flex-shrink: 0;
}
.layout-toggle button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6c7f9b;
  font-size: 13px;
  padding: 6px 11px;
}
.layout-toggle button .icon {
  width: 15px;
  height: 15px;
}
.layout-toggle button.active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 2px 6px #30467214;
}

/* ---------- numbered questions ---------- */
.question {
  padding: 24px 0;
  border-top: 1px solid #e8eef6;
}
.question:first-child,
.pack-head + .question {
  border-top: 0;
  padding-top: 6px;
}
.q-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.q-num {
  flex-shrink: 0;
  font: 600 12px var(--mono);
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 5px 8px;
  margin-top: 1px;
}
.q-head h2 {
  font-size: 17px;
  line-height: 1.4;
}
.q-head p {
  margin: 4px 0 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: #6c7f9b;
}
.hint {
  margin-top: 12px;
  font-size: 13px;
}
.hint p {
  margin-top: 6px;
}
.info-strip {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 11px;
  background: #f3f7fd;
  border: 1px dashed #c9d8ee;
  color: #4b6286;
  font-size: 13.5px;
  line-height: 1.55;
}
.info-strip .icon {
  color: var(--accent);
}
.field-error {
  display: block;
  min-height: 0;
  margin-top: 5px;
  font-size: 12px;
  color: #c0475d;
}
.field-error:empty {
  display: none;
}
input[aria-invalid="true"] {
  border-color: #e3a3ae;
}

/* ---------- Chuẩn bị máy chủ ---------- */
.setup-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.mini-steps {
  display: flex;
  gap: 6px;
}
.mini-steps button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 9px;
  padding: 8px 13px 8px 9px;
  color: #6f829e;
  font-size: 14px;
  font-weight: 500;
}
.mini-steps button span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 600 12px var(--mono);
  background: #fff;
  border: 1px solid #d3deec;
}
.mini-steps button.active {
  background: #e9f0ff;
  color: #2457c2;
}
.mini-steps button.active span {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.setup-layout,
.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: start;
}
.setup-questions {
  padding: 22px 26px 8px;
}
.setup-summary,
.guide-progress {
  position: sticky;
  top: 18px;
}
.summary-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font: 11px var(--mono);
  letter-spacing: 1.4px;
  color: #7f92ad;
  margin-bottom: 12px;
}
.summary-title strong {
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
}
.summary-title.muted {
  margin-top: 20px;
}
.install-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.install-list li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
}
.install-list li > .icon {
  width: 22px;
  height: 22px;
  padding: 4px;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
  stroke-width: 2.4;
}
.install-list.skip li > .icon {
  background: #f1f4f8;
  color: #9aa9bd;
}
.install-list strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.install-list small {
  display: block;
  font-size: 12.5px;
  color: #7186a3;
  line-height: 1.45;
}
.install-list.skip strong {
  color: #6c7f9b;
  font-weight: 500;
}
.summary-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 20px 0 14px;
  padding-top: 16px;
  border-top: 1px solid #e8eef6;
  font-size: 13px;
  color: #6c7f9b;
}
.setup-summary .button + .button {
  margin-top: 8px;
}
.setup-summary .small {
  font-size: 12.5px;
  line-height: 1.6;
  margin: 12px 0 0;
}

/* guide */
.guide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 6px;
}
.guide-head .chips {
  gap: 6px;
}
.guide-head .chip {
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  border-radius: 20px;
  padding: 4px 10px;
}
.phase-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 26px 0 12px;
  font: 600 11.5px var(--mono);
  letter-spacing: 1.6px;
  color: #7d90ab;
}
.phase-head:after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e1e8f1;
}
.guide-step {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 16px;
  padding: 22px 22px 18px;
  margin-bottom: 12px;
  border: 1px solid #e0e7f0;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 6px 24px #253c630b;
  scroll-margin-top: 16px;
}
.guide-step.done {
  background: #fbfdfc;
  border-color: #cfe9dc;
}
.step-check {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid #c8d4e6;
  background: #fff;
  color: #4f6890;
  font: 600 13px var(--mono);
  display: grid;
  place-items: center;
}
.step-check:hover {
  border-color: var(--ok);
  color: var(--ok);
}
.guide-step.done .step-check {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}
.step-check .icon {
  stroke-width: 2.6;
}
.step-body {
  min-width: 0;
}
.step-body h3 {
  font-size: 17px;
  font-weight: 600;
  margin-top: 6px;
  color: var(--ink);
}
.guide-step.done h3 {
  color: #4b7a64;
}
.why {
  font-size: 14px;
  line-height: 1.65;
  color: #5d708c;
  margin: 6px 0 14px;
}
.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 18px;
  margin: 0 0 12px;
  padding: 14px 16px;
  border: 1px solid #e3eaf4;
  border-radius: 11px;
  background: #fafcff;
  font-size: 13.5px;
}
.facts dt {
  color: #7186a3;
}
.facts dd {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
  overflow-wrap: anywhere;
}
.code-block {
  margin: 10px 0;
  border: 1px solid var(--code-line);
  border-radius: 11px;
  background: var(--code-bg);
  overflow: hidden;
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 8px 7px 14px;
  background: #142033;
  border-bottom: 1px solid var(--code-line);
  color: #9db1cf;
  font-size: 12.5px;
}
.code-head > span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.code-head .icon {
  width: 15px;
  height: 15px;
  color: #6f8fbf;
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  border: 1px solid #2e3f5a;
  background: #1b2a42;
  color: #d6e3f7;
  border-radius: 7px;
  padding: 5px 10px;
  font-size: 12px;
}
.copy-btn .icon {
  width: 14px;
  height: 14px;
}
.copy-btn:hover {
  background: #24375a;
}
.copy-btn.copied {
  background: #1d5a43;
  border-color: #2b7d5e;
  color: #e3fff2;
}
.copy-btn.light {
  border-color: #d6e1f0;
  background: #fff;
  color: #4f6890;
  padding: 4px 7px;
}
.copy-btn.light.copied {
  background: var(--ok-soft);
  border-color: #a9dcc5;
  color: var(--ok);
}
.code-block pre {
  scrollbar-width: thin;
  scrollbar-color: #3a4d6b transparent;
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  font: 12.5px/1.75 var(--mono);
  color: #dbe6f7;
  white-space: pre;
  tab-size: 4;
}
.code-block code {
  color: inherit;
  font-size: inherit;
  overflow-wrap: normal;
}
mark {
  background: #ffd45a2e;
  color: #ffd45a;
  border-radius: 4px;
  padding: 0 3px;
  outline: 1px dashed #ffd45a80;
}
.verify mark,
.facts mark {
  background: #fff1c2;
  color: #8a6107;
  outline-color: #e8c76a;
}
.verify {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 12px 0 4px;
  padding: 11px 14px;
  border-radius: 11px;
  background: #f3f9f6;
  border: 1px solid #d5ecdf;
  font-size: 13px;
}
.verify-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--ok);
}
.verify-label .icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.4;
}
.verify code {
  font-size: 12.5px;
  color: #2f4f73;
  background: #fff;
  border: 1px solid #dbe6f1;
  border-radius: 6px;
  padding: 2px 8px;
}
.verify-expect {
  flex-basis: 100%;
  color: #5d708c;
}
.verify-expect b {
  font-weight: 600;
  color: #2c4a6e;
}
.tips {
  margin-top: 12px;
  font-size: 13px;
}
.tips ul {
  margin: 8px 0 0;
  padding-left: 20px;
  color: #5d708c;
  line-height: 1.7;
}
.tips li + li {
  margin-top: 4px;
}
.step-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}
.step-foot .button {
  font-size: 13px;
  padding: 7px 13px;
  min-height: 34px;
}
.script-callout {
  margin-bottom: 14px;
  padding: 18px 20px;
  border-radius: 15px;
  border: 1px solid #cfe0fb;
  background: linear-gradient(120deg, #f5f9ff, #edf4ff);
}
.callout-text strong {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: #234a8c;
}
.callout-text strong .icon {
  color: var(--accent);
}
.callout-text p {
  margin: 6px 0 14px;
  font-size: 13.5px;
  line-height: 1.6;
  color: #55698a;
}
.script-callout > .button {
  margin-bottom: 4px;
}
.progress-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.progress-head strong {
  font-size: 26px;
  letter-spacing: -0.5px;
  color: var(--ink);
}
.progress-head span {
  font-size: 13px;
  color: #6c7f9b;
}
.progress-bar {
  height: 8px;
  border-radius: 8px;
  background: #edf1f7;
  overflow: hidden;
  margin: 10px 0 16px;
}
.progress-bar span {
  display: block;
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, #2fb37b, #1f9d68);
  transition: width 0.3s;
}
.step-index {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  counter-reset: step;
  max-height: 46vh;
  overflow: auto;
}
.step-index li {
  counter-increment: step;
}
.step-index a {
  display: flex;
  gap: 10px;
  padding: 6px 4px;
  border-radius: 7px;
  color: #4a5f80;
  font-size: 13px;
  text-decoration: none;
  line-height: 1.45;
}
.step-index a:before {
  content: counter(step);
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 600 10.5px var(--mono);
  background: #eef2f8;
  color: #6c7f9b;
}
.step-index li.done a {
  color: #4b7a64;
}
.step-index li.done a:before {
  content: "✓";
  background: var(--ok);
  color: #fff;
}
.step-index a:hover {
  background: #f3f6fb;
}
.guide-progress .button + .button {
  margin-top: 6px;
}

/* ---------- Bắt đầu ---------- */
.path-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.path-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 22px;
  text-align: left;
  border: 1px solid #dfe7f1;
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  box-shadow: 0 8px 30px #253c630d;
  transition:
    transform 0.15s,
    box-shadow 0.15s,
    border-color 0.15s;
}
.path-card:hover {
  transform: translateY(-2px);
  border-color: #a9c3ec;
  box-shadow: 0 14px 34px #2b4c801a;
}
.path-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.path-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
}
.path-icon .icon {
  width: 23px;
  height: 23px;
}
.path-step {
  font: 600 11px var(--mono);
  letter-spacing: 1.4px;
  color: #8a9cb6;
}
.path-card strong {
  margin-top: 6px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.3px;
}
.path-desc {
  font-size: 14px;
  line-height: 1.6;
  color: #60738f;
  flex: 1;
}
.path-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}
.home-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}
.home-lower .panel-title {
  margin-bottom: 12px;
}
.home-lower .tag .icon {
  width: 15px;
  height: 15px;
}
.menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.menu-list li + li {
  border-top: 1px solid #edf1f7;
}
.menu-list button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  text-align: left;
  font: inherit;
  color: var(--ink);
}
.menu-list button:hover {
  background: #f4f7fc;
}
.menu-text {
  font-size: 14.5px;
}
.menu-target {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--accent);
}
.menu-target .icon {
  width: 15px;
  height: 15px;
}
.glossary details {
  border-top: 1px solid #edf1f7;
  padding: 11px 2px;
}
.glossary details:first-child {
  border-top: 0;
  padding-top: 2px;
}
.glossary summary {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
.glossary p {
  margin: 6px 0 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: #5d708c;
}

/* ---------- Đóng gói ---------- */
.pack-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.pack-head h2 {
  font-size: 18px;
}
.quick-package .question .fields {
  max-width: 620px;
}
.quick-package .question .package-options {
  margin: 0;
}
.quick-package .package-options .choices {
  margin-bottom: 18px;
}
.package-options .choices.list {
  margin-bottom: 16px;
}
.compact-errors {
  margin-bottom: 14px;
}
.next-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 18px 0 0;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid #bfe3d1;
  background: #f1faf5;
}
.next-card > .icon {
  width: 34px;
  height: 34px;
  padding: 7px;
  border-radius: 10px;
  background: #fff;
  color: var(--ok);
}
.next-card > div {
  flex: 1;
}
.next-card strong {
  color: #20573f;
}
.next-card p {
  margin: 2px 0 0;
  font-size: 13.5px;
  color: #4f7a66;
}
.quick-footer .button + .button {
  margin-left: auto;
}

/* ---------- responsive ---------- */
@media (max-width: 1050px) {
  .setup-layout,
  .guide-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
  }
}
@media (max-width: 900px) {
  .setup-layout,
  .guide-layout,
  .home-lower {
    grid-template-columns: 1fr;
  }
  .setup-summary,
  .guide-progress {
    position: static;
  }
  .guide-progress {
    order: -1;
  }
  .step-index {
    display: none;
  }
  .path-grid {
    grid-template-columns: 1fr;
  }
  .path-card {
    display: grid;
    grid-template-columns: 46px 1fr;
    column-gap: 16px;
    row-gap: 4px;
    padding: 18px;
  }
  .path-top {
    grid-row: span 3;
    width: auto;
  }
  .path-step {
    display: none;
  }
  .path-card strong {
    margin: 0;
    font-size: 17px;
  }
  .path-cta {
    margin: 0;
  }
}
@media (max-width: 760px) {
  /* The heading now carries a one-line lead; let it grow instead of clipping. */
  .studio-heading {
    height: auto;
    min-height: 148px;
    padding: 14px 0 16px;
  }
  #workspace-lead {
    font-size: 13px;
    max-width: 100%;
  }
  .choices {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .choices.list {
    grid-template-columns: 1fr;
  }
  .choice {
    min-height: 0;
    padding: 13px 12px;
    gap: 10px;
  }
  .choice-check {
    top: 11px;
    right: 11px;
  }
  .choice-text strong {
    font-size: 14px;
    padding-right: 18px;
  }
  .choices.list .choice-text strong {
    padding-right: 0;
  }
  .setup-questions {
    padding: 14px 16px 4px;
  }
  .q-head {
    gap: 10px;
  }
  .q-head h2 {
    font-size: 16px;
  }
  .mini-steps button {
    font-size: 13px;
    padding: 7px 10px 7px 7px;
  }
  .layout-toggle button span {
    display: none;
  }
  .guide-step {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 16px;
  }
  .step-check {
    width: 32px;
    height: 32px;
  }
  .step-body h3 {
    margin-top: 0;
  }
  .guide-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .code-block pre {
    font-size: 12px;
    padding: 12px;
  }
  .code-head > span {
    font-size: 12px;
  }
  .copy-btn span {
    display: none;
  }
  .facts {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .facts dd + dt {
    margin-top: 8px;
  }
  .menu-list button {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .next-card {
    flex-wrap: wrap;
  }
  .quick-footer {
    flex-wrap: wrap;
  }
  .quick-footer .button {
    flex: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .choice,
  .path-card,
  .progress-bar span {
    transition: none;
  }
  .path-card:hover {
    transform: none;
  }
}

/* ---------- language switch ---------- */
.header-actions {
  align-items: center;
}
.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid #e1e8f2;
  border-radius: 9px;
  background: #f3f6fb;
}
.lang-switch button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #6c7f9b;
  font: 600 12px var(--mono);
  letter-spacing: 0.5px;
  padding: 6px 9px;
  min-width: 34px;
}
.lang-switch button.active {
  background: #fff;
  color: var(--accent);
  box-shadow: 0 2px 6px #30467214;
}
.lang-switch button:hover:not(.active) {
  color: #2c4a6e;
}
@media (max-width: 760px) {
  .lang-switch button {
    padding: 5px 7px;
    min-width: 30px;
    font-size: 11px;
  }
}

/* ---------- Hỏi đáp & sửa lỗi / Troubleshooting ---------- */
.map-panel {
  padding: 22px 24px 18px;
}
.map-head h2 {
  font-size: 17px;
}
.map-head p {
  margin: 6px 0 0;
  max-width: 820px;
  font-size: 13.5px;
  line-height: 1.6;
  color: #60738f;
}
.deploy-map {
  position: relative;
  margin-top: 14px;
  aspect-ratio: 21 / 8;
  min-height: 240px;
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 60% 40%, #eaf2ff 0, transparent 60%),
    linear-gradient(180deg, #f8fbff, #f1f5fc);
  border: 1px solid #e3eaf4;
  overflow: hidden;
}
.map-panel.no-3d .deploy-map {
  display: none;
}
.map-stage,
.map-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.map-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.map-label {
  position: absolute;
  transform: translate(-50%, -100%);
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  padding: 4px 6px 4px 10px;
  border: 1px solid #d6e1f0;
  border-radius: 20px;
  background: #ffffffe8;
  color: #2c4a6e;
  font: 600 12px "Be Vietnam Pro", system-ui, sans-serif;
  box-shadow: 0 4px 12px #2b4c8016;
  backdrop-filter: blur(6px);
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s;
}
.map-label b {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 12px;
  background: #eef3fb;
  color: #5d708c;
  font: 600 11px var(--mono);
  text-align: center;
}
.map-label.hover,
.map-label:hover {
  border-color: #8fb4ee;
  color: var(--accent);
}
.map-label.on {
  background: #fff7e6;
  border-color: #f5a524;
  color: #8a5a00;
}
.map-label.on b {
  background: #f5a524;
  color: #fff;
}
.help-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: start;
  margin-top: 18px;
}
.help-aside {
  position: sticky;
  top: 18px;
}
.help-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid #d6e1f0;
  border-radius: 12px;
  background: #fff;
  color: #7186a3;
}
.help-search:focus-within {
  border-color: #70a5f7;
  outline: 3px solid #4788ef13;
}
.help-search input {
  border: 0;
  outline: 0;
  margin: 0;
  padding: 13px 0;
  background: transparent;
  font-size: 14.5px;
}
.help-search input:focus {
  outline: 0;
}
.area-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 16px;
}
.area-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #dfe7f2;
  border-radius: 20px;
  background: #fff;
  color: #4a5f80;
  font-size: 13px;
  padding: 5px 7px 5px 12px;
}
.area-chip span {
  min-width: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #eef3fb;
  font: 600 11px/18px var(--mono);
  text-align: center;
}
.area-chip:hover {
  border-color: #a8c1ea;
}
.area-chip.on {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: #2457c2;
}
.area-chip.on span {
  background: var(--accent);
  color: #fff;
}
.qa {
  border: 1px solid #e3eaf4;
  border-radius: 12px;
  background: #fff;
  margin-bottom: 8px;
  overflow: hidden;
  scroll-margin-top: 16px;
}
.qa > summary {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  list-style: none;
  color: var(--ink);
}
.qa > summary::-webkit-details-marker {
  display: none;
}
.qa > summary:before {
  content: "›";
  flex-shrink: 0;
  width: 14px;
  font-size: 20px;
  line-height: 20px;
  color: #8aa0bb;
  transition: transform 0.15s;
}
.qa[open] > summary:before {
  transform: rotate(90deg);
}
.qa[open] > summary {
  background: #fafcff;
  border-bottom: 1px solid #edf1f7;
}
.qa-area {
  flex-shrink: 0;
  margin-top: 1px;
  padding: 1px 8px;
  border-radius: 10px;
  background: #eef3fb;
  color: #5d708c;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.qa-q {
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.5;
}
.qa-body {
  padding: 4px 18px 14px 40px;
}
.qa-why {
  font-size: 14px;
  line-height: 1.65;
  color: #4f6385;
}
.qa-why b,
.qa-label {
  color: var(--ink);
  font-weight: 600;
}
.qa-label {
  margin: 10px 0 4px;
  font-size: 14px;
}
.qa-fix {
  margin: 0 0 8px;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.65;
  color: #4f6385;
}
.qa-fix li + li {
  margin-top: 4px;
}
.help-empty {
  display: flex;
  gap: 14px;
  padding: 18px;
  border: 1px dashed #c9d8ee;
  border-radius: 12px;
  background: #f7faff;
}
.help-empty > .icon {
  width: 24px;
  height: 24px;
  color: var(--accent);
}
.help-empty p {
  margin: 4px 0 0;
  font-size: 13.5px;
}
.help-aside h2 {
  font-size: 16px;
}
.help-aside .small {
  font-size: 12.5px;
  line-height: 1.6;
}
.checks {
  margin: 12px 0;
  padding-left: 20px;
}
.checks li {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 13.5px;
}
.checks strong {
  font-weight: 600;
}
.check-cmd {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 5px 0 3px;
}
.check-cmd code {
  flex: 1;
  min-width: 0;
  padding: 5px 9px;
  border-radius: 7px;
  background: var(--code-bg);
  color: #dbe6f7;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.checks small {
  color: #6c7f9b;
  font-size: 12px;
}
.step-foot {
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.step-foot .button.link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #6c7f9b;
}
.step-foot .button.link:hover:not(:disabled) {
  color: var(--accent);
}
@media (max-width: 1050px) {
  .help-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
  }
}
@media (max-width: 900px) {
  .help-layout {
    grid-template-columns: 1fr;
  }
  .help-aside {
    position: static;
  }
  .deploy-map {
    aspect-ratio: 4 / 3;
  }
}
@media (max-width: 760px) {
  .map-panel {
    padding: 16px;
  }
  .map-label {
    font-size: 10.5px;
    padding: 3px 7px;
    gap: 4px;
  }
  .map-label b {
    display: none;
  }
  .qa > summary {
    flex-wrap: wrap;
    padding: 12px;
  }
  .qa-body {
    padding: 4px 14px 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .qa > summary:before,
  .map-label {
    transition: none;
  }
}

/* ---------- toasts ---------- */
.toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 10px 12px 14px;
  border: 1px solid #d7e6dc;
  border-left: 4px solid var(--ok);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px #1b2d4c26;
  pointer-events: auto;
  animation: toast-in 0.22s ease-out;
}
.toast.info {
  border-color: #d6e3f7;
  border-left-color: var(--accent);
}
.toast.error {
  border-color: #f2d5d9;
  border-left-color: #d1435b;
}
.toast.leaving {
  animation: toast-out 0.2s ease-in forwards;
}
.toast p {
  flex: 1;
  margin: 1px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
}
.toast-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--ok-soft);
  color: var(--ok);
}
.toast.info .toast-icon {
  background: var(--accent-soft);
  color: var(--accent);
}
.toast.error .toast-icon {
  background: #fdecef;
  color: #d1435b;
}
.toast-icon .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.3;
}
.toast-close {
  border: 0;
  background: none;
  color: #8a9bb3;
  font-size: 20px;
  line-height: 1;
  padding: 0 4px;
}
.toast-close:hover {
  color: var(--ink);
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}
@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateX(24px);
  }
}

/* ---------- confirm dialog ---------- */
.confirm-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid #e0e7f0;
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 30px 80px #0f1b3333;
}
.confirm-dialog[open] {
  animation: dialog-in 0.18s ease-out;
}
.confirm-dialog::backdrop {
  background: #0f1b3359;
  backdrop-filter: blur(3px);
}
.confirm-dialog form {
  padding: 24px;
}
.confirm-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.confirm-dialog.danger .confirm-icon {
  background: #fdecef;
  color: #d1435b;
}
.confirm-dialog h2 {
  margin: 14px 0 6px;
  font-size: 18px;
}
.confirm-dialog p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: #5d708c;
  overflow-wrap: anywhere;
}
.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}
.button.danger {
  background: #d1435b;
  border-color: #d1435b;
}
.button.danger:hover:not(:disabled) {
  background: #b9364c;
  border-color: #b9364c;
}
@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

/* ---------- upload / packaging progress ---------- */
.progress-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px;
  border: 1px solid #cfe0fb;
  border-radius: 14px;
  background: linear-gradient(115deg, #fbfcff, #eef4ff);
}
.package-options .progress-card {
  flex-wrap: wrap;
  gap: 14px;
  padding: 16px;
  margin-top: 4px;
}
.progress-art {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}
.art-box {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 4px;
  height: 22px;
  border: 2px solid var(--accent);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: #fff;
}
.art-file {
  position: absolute;
  left: 22px;
  top: 0;
  width: 20px;
  height: 26px;
  border-radius: 3px;
  background: #fff;
  border: 2px solid #8fb4ee;
  box-shadow: inset 0 -6px 0 #eaf2ff;
  animation: file-drop 1.4s ease-in infinite;
}
.art-file + .art-file {
  animation-delay: 0.7s;
}
@keyframes file-drop {
  0% {
    opacity: 0;
    transform: translateY(-6px) rotate(-8deg);
  }
  20% {
    opacity: 1;
  }
  70% {
    opacity: 1;
    transform: translateY(22px) rotate(4deg);
  }
  100% {
    opacity: 0;
    transform: translateY(30px) rotate(0);
  }
}
.progress-body {
  flex: 1;
  min-width: 0;
}
.progress-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.progress-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}
.progress-title span {
  font: 600 14px var(--mono);
  color: var(--accent);
}
.progress-stages {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  list-style: none;
  margin: 8px 0 10px;
  padding: 0;
  font-size: 12.5px;
  color: #93a3ba;
}
.progress-stages li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.progress-stages b,
.progress-stages .icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #d3deec;
  font: 600 10px var(--mono);
}
.progress-stages .now {
  color: var(--accent);
  font-weight: 600;
}
.progress-stages .now b {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.progress-stages .done {
  color: var(--ok);
}
.progress-stages .done .icon {
  padding: 3px;
  border-color: var(--ok);
  background: var(--ok);
  color: #fff;
  stroke-width: 3;
}
.progress-track {
  position: relative;
  height: 8px;
  border-radius: 8px;
  background: #dfe8f6;
  overflow: hidden;
}
.progress-track span {
  display: block;
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, #2f6be8, #5b9bff, #2f6be8);
  background-size: 200% 100%;
  animation: bar-shine 1.6s linear infinite;
  transition: width 0.2s;
}
.progress-track.indeterminate span {
  width: 35% !important;
  animation: bar-slide 1.2s ease-in-out infinite;
}
@keyframes bar-shine {
  to {
    background-position: -200% 0;
  }
}
@keyframes bar-slide {
  from {
    transform: translateX(-110%);
  }
  to {
    transform: translateX(300%);
  }
}
.progress-meta {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: #6c7f9b;
}
.progress-card > .button {
  flex-shrink: 0;
}

/* ---------- drop zone while dragging ---------- */
.drop {
  position: relative;
  transition:
    transform 0.15s,
    border-color 0.15s,
    background 0.15s;
}
.drop.drag {
  transform: scale(1.01);
  border-style: solid;
  border-color: var(--accent);
  background: #e8f0ff;
}
.drop.drag > * {
  opacity: 0.15;
}
.drop.drag::after {
  content: attr(data-drop-text);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 600;
  color: var(--accent);
  pointer-events: none;
}
.source-foot details p {
  font-size: 12.5px;
  line-height: 1.65;
}
@media (max-width: 760px) {
  .toasts {
    right: 16px;
    left: 16px;
    bottom: 16px;
    width: auto;
  }
  .progress-card {
    flex-wrap: wrap;
    gap: 14px;
    padding: 16px;
  }
  .progress-art {
    transform: scale(0.75);
    margin: -8px -6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .toast,
  .toast.leaving,
  .confirm-dialog[open],
  .art-file,
  .progress-track span {
    animation: none;
  }
  .progress-track.indeterminate span {
    width: 100% !important;
    opacity: 0.5;
  }
  .drop {
    transition: none;
  }
}

/* ---------- upload finished ---------- */
.art-check {
  position: absolute;
  right: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  opacity: 0;
  transform: scale(0.4);
  transition:
    opacity 0.2s,
    transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.art-check .icon {
  width: 15px;
  height: 15px;
  stroke-width: 3;
}
.progress-card.finished {
  border-color: #bfe3d1;
  background: linear-gradient(115deg, #fbfefc, #ecf8f2);
}
.progress-card.finished .art-file {
  animation: none;
  opacity: 0;
}
.progress-card.finished .art-box {
  border-color: var(--ok);
}
.progress-card.finished .art-check {
  opacity: 1;
  transform: scale(1);
}
.progress-card.finished .progress-title span {
  color: var(--ok);
}
.progress-card.finished .progress-track span {
  background: var(--ok);
  animation: none;
}

/* ---------- over-limit trim panel ---------- */
.trim-card {
  border: 1px solid #f3d6a6;
  border-radius: 14px;
  background: #fffdf8;
  padding: 20px;
}
.trim-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.trim-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff1d6;
  color: #b7791f;
}
.trim-head h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
.trim-head p {
  margin: 4px 0 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: #5d708c;
}
.trim-head b {
  color: var(--ink);
}
.trim-meter {
  margin: 16px 0 10px;
}
.trim-bar {
  position: relative;
  height: 10px;
  border-radius: 10px;
  background: #eef2f8;
}
.trim-bar span {
  display: block;
  height: 100%;
  border-radius: 10px;
  background: #e5a33a;
  transition: width 0.25s;
}
.trim-meter.fits .trim-bar span {
  background: var(--ok);
}
.trim-bar i {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: #1f3557;
  border-radius: 2px;
}
#trim-status {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: #9a6514;
}
.trim-meter.fits #trim-status {
  color: var(--ok);
}
.trim-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 340px;
  overflow: auto;
  border: 1px solid #ece4d4;
  border-radius: 10px;
  background: #fff;
}
.trim-list li + li {
  border-top: 1px solid #f2ede3;
}
.trim-list label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  padding: 9px 12px 9px calc(12px + var(--depth, 0) * 22px);
  font-size: 13.5px;
  color: var(--ink);
  cursor: pointer;
}
.trim-list label:hover {
  background: #fdfaf3;
}
.trim-list input {
  margin: 0;
}
.trim-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}
.trim-name .icon {
  width: 15px;
  height: 15px;
  color: #8a9bb3;
}
.trim-hint {
  font-style: normal;
  font-size: 11.5px;
  padding: 1px 8px;
  border-radius: 10px;
  background: #eef3fb;
  color: #4f6890;
}
.trim-hint.build,
.trim-hint.junk {
  background: var(--ok-soft);
  color: #1f7a55;
}
.trim-hint.media,
.trim-hint.archive {
  background: #fff1d6;
  color: #8a5a00;
}
.trim-size {
  margin-left: auto;
  font: 12px var(--mono);
  color: #6c7f9b;
  white-space: nowrap;
}
.trim-card .hint {
  margin-top: 12px;
}
.trim-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
@media (max-width: 760px) {
  .trim-card {
    padding: 16px;
  }
  .trim-list label {
    padding-left: calc(10px + var(--depth, 0) * 14px);
  }
  .trim-size {
    margin-left: 25px;
  }
  .trim-actions .button {
    flex: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .art-check,
  .trim-bar span {
    transition: none;
  }
}

/* Trim list: ticked = kept; unticked / covered rows read as left out. */
.trim-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  font-size: 12.5px;
  color: #6c7f9b;
}
.trim-legend .icon {
  width: 14px;
  height: 14px;
  color: var(--ok);
  stroke-width: 2.6;
}
.trim-list li.left-out .trim-name {
  color: #9aa8bb;
  text-decoration: line-through;
  text-decoration-color: #c4cdd9;
}
.trim-list li.left-out .trim-size {
  color: #b3becd;
}
.trim-list input:disabled + .trim-name {
  cursor: default;
}
.drop-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 520px;
  margin: 16px auto 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: #6c7f9b;
  text-align: left;
}
.drop-hint .icon {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  color: var(--accent);
}
