/* Shared native fonts and world chrome remain in experience.css. */
.ec-cgui-chooser { position: absolute; z-index: 4; top: 18px; left: 20px; right: 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ec-cgui-chooser > div { display: flex; padding: 4px; border: 1px solid #ffffff24; border-radius: 10px; background: #18181bcc; }
.ec-cgui-chooser button { color: #b7b7bc; cursor: pointer; }
.ec-cgui-chooser [data-cgui-style] { min-height: 32px; padding: 5px 16px; border: 0; border-radius: 6px; background: transparent; font-size: 12px; }
.ec-cgui-chooser [aria-pressed="true"] { color: #202024; background: #ededf0; }
.ec-cgui-chooser .ec-ui-exit { position: static; }
.ec-cgui-chooser button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.ec-cgui { --cgui-bg: #1f1f21; --cgui-rail: #171719; --cgui-field: #242426; --cgui-hover: #303033; --cgui-ink: #eeeef0; --cgui-muted: #a4a4aa; --cgui-line: #ffffff17; --cgui-accent: #e6e6e9; --cgui-on: #242426; position: absolute; inset: 78px 12px 52px; font: 12px/1.5 "EC Game UI", "Microsoft YaHei", sans-serif; color: var(--cgui-ink); color-scheme: dark; }
.ec-cgui button, .ec-cgui input { font: inherit; }
.ec-cgui button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0; color: inherit; border: 0; background: transparent; cursor: pointer; }
.ec-cgui button:hover { background-color: var(--cgui-hover); }
.ec-cgui button:disabled { opacity: .42; cursor: default; }
.ec-cgui button:focus-visible, .ec-cgui input:focus-visible { outline: 2px solid var(--cgui-accent); outline-offset: -2px; }
.ec-cgui img { width: 14px; height: 14px; object-fit: contain; flex: 0 0 14px; }
.ec-cgui small { color: var(--cgui-muted); font-size: 10px; }
.ec-cgui h2, .ec-cgui p { margin: 0; }
.ec-cgui h2 { font-size: 18px; font-weight: 400; }
.ec-cgui-frame { position: absolute; inset: 50% auto auto 50%; translate: -50% -50%; width: min(736px, 100%); height: min(490px, 100%); display: grid; grid-template-rows: 48px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--cgui-line); border-radius: 12.5px; background: var(--cgui-rail); box-shadow: 0 15px 45px #0003; }
.ec-cgui-toolbar { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 0 14px; }
.ec-cgui-toolbar strong { font-size: 14px; font-weight: 400; }
.ec-cgui-view { padding: 3px 10px; color: var(--cgui-on); border-radius: 5px; background: var(--cgui-accent); font-size: 10px; }
.ec-cgui-toolbar > button { flex-shrink: 0; min-width: 28px; min-height: 28px; border-radius: 6px; }
.ec-cgui-toolbar [data-panel-close] { font-size: 19px; color: var(--cgui-muted); }
.ec-cgui-search { display: flex; align-items: center; flex: 1; min-width: 0; gap: 5px; height: 28px; padding: 0 8px; border: 1px solid var(--cgui-line); border-radius: 7.5px; background: var(--cgui-field); color: var(--cgui-muted); }
.ec-cgui-search > span { font-size: 19px; }
.ec-cgui-search input { width: 100%; min-width: 0; height: 100%; padding: 0; color: var(--cgui-ink); border: 0; background: transparent; outline: 0; font-size: 11px; }
.ec-cgui-search:focus-within { border-color: var(--cgui-accent); }
.ec-cgui-search input::placeholder { color: var(--cgui-muted); }
.ec-cgui-body { min-height: 0; display: grid; grid-template-columns: 112px minmax(0, 1fr); padding-bottom: 8px; }
.ec-cgui-sidebar { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; padding: 8px; }
.ec-cgui-sidebar > small { padding: 0 8px 6px; font-size: 9px; }
.ec-cgui-sidebar button { position: relative; flex-shrink: 0; justify-content: flex-start; width: 100%; min-height: 38px; gap: 9px; padding: 0 10px; border-radius: 6px; text-align: left; }
.ec-cgui-sidebar [aria-pressed="true"] { background: #ffffff1c; }
.ec-cgui-sidebar [aria-pressed="true"]::before { position: absolute; left: 0; top: 9px; bottom: 9px; width: 2px; border-radius: 1px; background: var(--cgui-accent); content: ''; }
.ec-cgui-list { min-height: 0; min-width: 0; display: grid; grid-template-rows: 42px minmax(0, 1fr); margin-right: 8px; padding: 8px 12px; border-radius: 8px; background: var(--cgui-bg); }
.ec-cgui-list > header { display: flex; align-items: center; gap: 12px; padding: 0 3px; }
.ec-cgui-rows { overflow-y: auto; }
.ec-cgui-row { display: flex; align-items: center; min-height: 60px; gap: 18px; border-bottom: 1px solid var(--cgui-line); }
.ec-cgui-row .ec-cgui-feature { align-self: stretch; flex: 1; min-width: 0; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; padding: 5px 3px; border-radius: 6px; text-align: left; }
.ec-cgui-feature > span { font-size: 14px; }
.ec-cgui-row .ec-cgui-config { flex-shrink: 0; min-height: 32px; padding: 0 3px; color: var(--cgui-muted); font-size: 10px; border-radius: 5px; }
.ec-cgui-config span { margin-left: 7px; font-size: 16px; }
.ec-cgui .ec-cgui-switch { position: relative; flex: 0 0 30px; width: 30px; min-width: 30px; height: 18px; border: 1px solid #77777d; border-radius: 10px; background: #49494f; transition: background .15s; }
.ec-cgui-switch span { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #e6e6e9; transition: translate .15s, background .15s; }
.ec-cgui .ec-cgui-switch[aria-checked="true"] { border-color: var(--cgui-accent); background: var(--cgui-accent); }
.ec-cgui-switch[aria-checked="true"] span { translate: 12px 0; background: var(--cgui-on); }
.ec-cgui-empty { padding: 16px; color: var(--cgui-muted); }
.ec-cgui .ec-parameter-notice { color: var(--cgui-muted); font-size: 12px; }
.ec-cgui-modal { position: fixed; inset: 0; width: min(420px, calc(100vw - 32px)); max-height: calc(100svh - 120px); margin: auto; padding: 0; overflow-y: auto; color: var(--cgui-ink); border: 1px solid var(--cgui-line); border-radius: 15px; background: var(--cgui-bg); box-shadow: 0 18px 70px #0005; }
.ec-cgui-modal::backdrop { background: #0006; }
.ec-cgui-modal > header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--cgui-line); }
.ec-cgui-modal > header button { width: 28px; height: 28px; font-size: 22px; border-radius: 6px; }
.ec-cgui-modal-enable { display: flex; align-items: center; justify-content: space-between; min-height: 54px; margin: 0 20px; border-bottom: 1px solid var(--cgui-line); }
.ec-cgui-modal-body { min-height: 110px; padding: 24px 20px; }
.ec-cgui[data-cgui="1"][data-theme="light"] { --cgui-bg: #fcfcfd; --cgui-rail: #f4f5f8; --cgui-field: #fff; --cgui-hover: #e8ebf1; --cgui-ink: #25272d; --cgui-muted: #6e7482; --cgui-line: #dfe3eb; --cgui-accent: #4d76d0; --cgui-on: #fff; color-scheme: light; }
.ec-cgui[data-cgui="1"][data-theme="light"] .ec-cgui-sidebar [aria-pressed="true"] { background: #e4ebfa; color: #355da9; }
.ec-cgui[data-cgui="1"][data-theme="light"] .ec-cgui-list { border-left: 1px solid var(--cgui-line); }
.ec-cgui[data-cgui="1"][data-theme="light"] .ec-cgui-sidebar img { filter: brightness(.5); }
/* Cgui2Layout: 200-wide windows, 20 gap, 36 header, 31-high cards, Mocha surfaces. */
.ec-cgui[data-cgui="2"] { --cgui-bg: #1e1e2e; --cgui-rail: #11111b; --cgui-field: #181825; --cgui-hover: #45475a; --cgui-ink: #cdd6f4; --cgui-muted: #bac2de; --cgui-accent: #fff; --cgui-on: #1e1e2e; }
[data-cgui="2"] .ec-cgui-frame { inset: 0; width: 100%; height: 100%; translate: none; display: grid; grid-template-rows: 42px minmax(0, 1fr); gap: 26px; overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
[data-cgui="2"] .ec-cgui-toolbar { width: min(540px, 100%); margin: 0 auto; border-radius: 10px; background: #1e1e2e; }
[data-cgui="2"] .ec-cgui-toolbar strong { font-size: 12px; }
[data-cgui="2"] .ec-cgui-view { color: #fff; border-radius: 0; border-bottom: 2px solid #fff; background: transparent; }
[data-cgui="2"] .ec-cgui-toolbar [data-reset-columns] { color: var(--cgui-muted); font-size: 10px; padding: 0 5px; }
[data-cgui="2"] .ec-cgui-body { display: block; padding: 0; }
.ec-cgui2-stage { width: 100%; height: 100%; overflow-x: auto; overflow-y: hidden; overscroll-behavior: contain; }
.ec-cgui2-columns { position: relative; height: 100%; }
.ec-cgui2-column { position: absolute; top: 0; width: 200px; padding-bottom: 6px; border-radius: 10px; background: #1e1e2e; }
.ec-cgui2-header { display: flex; align-items: center; gap: 9px; height: 36px; padding-left: 12px; border-radius: 10px 10px 0 0; background: #11111b; cursor: grab; touch-action: none; user-select: none; }
.ec-cgui2-header > span { flex: 1; }
.ec-cgui2-header button { width: 34px; height: 32px; border-radius: 7px; font-size: 16px; }
.ec-cgui2-column.is-dragging .ec-cgui2-header { cursor: grabbing; }
.ec-cgui2-header:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.ec-cgui2-items { display: flex; flex-direction: column; gap: 8px; max-height: var(--column-space, 350px); overflow-y: auto; padding: 6px 6px 0; }
.ec-cgui2-card { flex-shrink: 0; overflow: hidden; border: 1px solid #6c708640; border-radius: 7px; background: #313244; transition: background .2s, color .2s; }
.ec-cgui2-row { display: flex; align-items: center; height: 31px; }
.ec-cgui2-row .ec-cgui2-feature { flex: 1; align-self: stretch; justify-content: flex-start; padding-left: 12px; text-align: left; font-size: 13px; }
.ec-cgui2-row .ec-cgui2-config { flex: 0 0 30px; align-self: stretch; font-size: 15px; }
.ec-cgui2-card.is-enabled { color: #4c4f69; border-color: #e6e9ef; background: #e6e9ef; }
.ec-cgui2-card.is-enabled button:hover { background: #ccd0da; }
.ec-cgui2-details { padding: 10px 12px 14px; }
.ec-cgui2-card.is-enabled .ec-parameter-notice { color: #5c5f77; }
.ec-cgui :is(.ec-cgui-sidebar, .ec-cgui-rows, .ec-cgui2-stage, .ec-cgui2-items, .ec-cgui-modal) { scrollbar-width: thin; scrollbar-color: #80808d66 transparent; }
.ec-ui-dialog.is-closing .ec-cgui { opacity: 0; transform: translateY(5px); }
@media (prefers-reduced-motion: no-preference) {
  .ec-cgui { transition: opacity .18s, transform .18s; }
  .ec-ui-dialog[open]:not(.is-closing) .ec-cgui-frame, .ec-cgui-modal[open] { animation: cgui-reveal .16s ease-out; }
  @keyframes cgui-reveal { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 520px) {
  .ec-experience-page .ec-cgui-chooser { top: 12px; left: 12px; right: 12px; gap: 6px; }
  .ec-experience-page .ec-cgui-chooser [data-cgui-style] { padding-inline: 10px; }
  .ec-experience-page .ec-cgui-chooser .ec-ui-exit { padding-inline: 9px; font-size: 11px; }
  .ec-experience-page .ec-cgui { inset: 70px 10px 52px; }
  .ec-experience-page .ec-cgui-frame { height: min(490px, 100%); grid-template-rows: 74px minmax(0, 1fr); }
  .ec-experience-page .ec-cgui-toolbar { position: relative; gap: 8px; flex-wrap: wrap; align-content: flex-start; padding: 8px 10px; }
  .ec-experience-page .ec-cgui-toolbar strong { flex: 1; }
  .ec-experience-page .ec-cgui-search { position: absolute; top: 42px; left: 10px; right: 10px; height: 26px; }
  .ec-experience-page .ec-cgui-body { grid-template-columns: 84px minmax(0, 1fr); }
  .ec-experience-page .ec-cgui-sidebar { padding-inline: 4px; }
  .ec-experience-page .ec-cgui-sidebar button { padding-inline: 6px; gap: 5px; font-size: 10px; }
  .ec-experience-page .ec-cgui-sidebar img { width: 12px; height: 12px; flex-basis: 12px; }
  .ec-experience-page .ec-cgui-list { padding: 6px; margin-right: 5px; }
  .ec-experience-page .ec-cgui-list > header { gap: 6px; flex-wrap: wrap; }
  .ec-experience-page .ec-cgui-list h2 { font-size: 16px; }
  .ec-experience-page .ec-cgui-row { gap: 8px; }
  .ec-experience-page .ec-cgui-row .ec-cgui-config { font-size: 9px; gap: 2px; }
  .ec-experience-page .ec-cgui-config span { margin-left: 0; }
  .ec-experience-page [data-cgui="2"] .ec-cgui-frame { grid-template-rows: 78px minmax(0, 1fr); gap: 18px; }
  .ec-ui-help { font-size: 10px; }
}

/* Inert homepage preview uses the same renderer at a fixed logical viewport. */
.ec-cgui.ec-cgui-preview { inset: 0; width: 920px; height: 510px; scale: .634782609; transform-origin: top left; font-family: "EC Home UI", "Microsoft YaHei", sans-serif; }
.ec-cgui-preview .ec-cgui-frame { inset: 0; translate: none; width: 100%; height: 100%; }
.home-page .section .ec-cgui-preview h2 { font-size: 18px; line-height: .98; letter-spacing: -.065em; }
