@font-face {
  font-family: "PodsC Symbols";
  src: url("podsc-symbols.woff") format("woff");
  font-display: block;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "Lvd LVGL Symbols";
  src: url("lvgl-symbols.woff") format("woff");
  font-display: block;
  font-style: normal;
  font-weight: 900;
}

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-raised: #ffffff;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-soft: #f0f8f8;
  --line: rgba(6, 122, 122, 0.16);
  --line-strong: rgba(6, 122, 122, 0.28);
  --text: #153333;
  --text-soft: #5b716c;
  --accent: #067a7a;
  --accent-strong: #055e5e;
  --danger: #c7442f;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  --content-max: 84rem;
  --content-half: 42rem;
  --content-gutter: clamp(1rem, 4vw, 3rem);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { min-height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
}

button, input, textarea { font: inherit; }
button { color: inherit; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(4.5rem, auto) minmax(0, 1fr) auto; }

.topbar {
  position: relative;
  z-index: 5;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 122, 122, 0.96);
  backdrop-filter: blur(18px);
}

.topbar-inner {
  width: min(var(--content-max), 100%);
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 auto;
  padding: 0 var(--content-gutter);
}

.brand { display: inline-flex; align-items: center; gap: .65rem; color: #fff; text-decoration: none; font-weight: 760; letter-spacing: .08em; }
html:not(.gallery-mode) .topbar-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr); align-items: center; }
.preview-device-summary { min-width: 0; padding: .75rem 0; color: rgba(255,255,255,.9); font-size: .8125rem; font-weight: 400; line-height: 1.6; text-align: center; overflow-wrap: anywhere; }
.brand-product { color: rgba(255,255,255,.72); font-size: .82rem; font-weight: 520; letter-spacing: .03em; }
.brand-logo { display: block; width: 1.9rem; height: 1.9rem; color: #fff; fill: currentColor; flex: 0 0 auto; }

.topbar-actions { display: flex; min-width: 0; flex: 1; justify-content: flex-end; align-items: center; gap: 1rem; }
.gallery-only { display: none !important; }
.gallery-mode .gallery-only { display: inline-flex !important; }
.gallery-mode .preview-only { display: none !important; }
.preview-info { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: .5rem; color: rgba(255,255,255,.75); }
#preview-info-toggle { display: flex; flex-shrink: 0; width: 2.5rem; height: 2.5rem; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
#preview-info-toggle span { display: flex; width: 1rem; height: 1rem; align-items: center; justify-content: center; border: 1px solid currentColor; border-radius: 50%; font: 400 .75rem Georgia, serif; }
#preview-info-toggle:hover, #preview-info-toggle[aria-expanded="true"] { color: #fff; }
#preview-info-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.preview-info__content { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; max-width: 24rem; padding: .5rem 0; line-height: 1.5; text-align: left; overflow-wrap: anywhere; }
.preview-info__content strong { display: block; color: rgba(255,255,255,.95); font-size: .8125rem; font-weight: 500; }
.preview-info__content p { margin: .125rem 0 0; color: rgba(255,255,255,.65); font-size: .6875rem; white-space: pre-wrap; }
.topbar-screen-filter { position: relative; width: max-content; min-width: 0; max-width: min(100%, calc(100vw - 2 * var(--content-gutter))); grid-template-columns: minmax(0, 1fr); }
.gallery-mode .topbar-screen-filter { display: inline-grid !important; }
.topbar-screen-sizer { grid-area: 1 / 1; display: grid; height: 0; padding: 0 26px; overflow: hidden; visibility: hidden; white-space: pre; font-size: .85rem; font-weight: 400; }
.topbar-screen-trigger { grid-area: 1 / 1; }
#gallery-screen-value { min-width: 0; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.topbar-screen-trigger { display: flex; width: 100%; min-height: 2.5rem; align-items: center; justify-content: space-between; gap: .75rem; padding: .5rem .75rem; border: 0; border-bottom: 1px solid rgba(255,255,255,.45); border-radius: 0; background: transparent; color: #fff; font: inherit; font-size: .85rem; font-weight: 400; line-height: 1.5; cursor: pointer; }
.topbar-screen-trigger:hover, .topbar-screen-trigger[aria-expanded="true"] { border-color: #fff; }
.topbar-screen-trigger:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.topbar-screen-arrow { flex-shrink: 0; width: .4rem; height: .4rem; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: translateY(-.12rem) rotate(45deg); }
.topbar-screen-trigger[aria-expanded="true"] .topbar-screen-arrow { transform: translateY(.12rem) rotate(225deg); }
.topbar-screen-menu { position: absolute; z-index: 20; top: calc(100% + .25rem); right: 0; width: 100%; max-height: 60vh; overflow-y: auto; padding: .25rem 0; border: 1px solid #e5e7eb; border-radius: 0; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.topbar-screen-menu button { display: block; width: 100%; padding: .6rem .75rem; border: 0; border-radius: 0; background: transparent; color: #374151; font: inherit; font-size: .85rem; font-weight: 400; line-height: 1.5; text-align: left; overflow-wrap: anywhere; cursor: pointer; }
.topbar-screen-menu button:hover, .topbar-screen-menu button:focus-visible { outline: 0; background: #f3f4f6; }
.topbar-screen-menu button[aria-selected="true"] { background: #f3f4f6; color: #111827; }
.button, .icon-button, .import-tab { border: 0; cursor: pointer; }
.button { min-height: 2.5rem; padding: .65rem 1rem; border-radius: .6rem; font-weight: 680; font-size: .875rem; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible, .icon-button:focus-visible, .import-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.button-secondary { border: 1px solid rgba(255,255,255,.46); background: rgba(255,255,255,.1); color: #fff; }
.button-secondary:hover { border-color: #fff; background: rgba(255,255,255,.18); }
.button-primary { background: var(--accent); color: #fff; }
.button-primary:hover { background: var(--accent-strong); }

.gallery-mode body { overflow: auto; }
.gallery-mode .app-shell { min-height: 100vh; grid-template-rows: 4.5rem minmax(min-content, 1fr) auto; }
.gallery-page { width: min(var(--content-max), 100%); margin: 0 auto; padding: clamp(2.5rem, 6vw, 5rem) var(--content-gutter) 4rem; background: #fff; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 1rem; }
.gallery-card { position: relative; display: grid; align-self: start; overflow: hidden; border: 1px solid var(--line); border-radius: .35rem; background: rgba(255,255,255,.94); color: inherit; text-decoration: none; box-shadow: 0 .8rem 2.5rem rgba(5,94,94,.07); }
.gallery-card { container-type: inline-size; }
.gallery-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 4px 5%; background: #fff; }
.gallery-card__specs { min-width: 0; margin: 0; color: #374151; font-size: .875rem; font-weight: 400; line-height: 1.5; text-align: left; white-space: pre-wrap; }
.gallery-card__visual:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.gallery-card__visual { display: grid; aspect-ratio: 1; place-items: center; overflow: hidden; border-bottom: 1px solid var(--line); background: #fff; color: inherit; text-decoration: none; }
.gallery-card__image { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery-card__device { position: relative; filter: drop-shadow(0 .6rem .7rem rgba(15, 42, 39, .16)); }
.gallery-card__frame { display: block; width: 100%; height: 100%; }
.gallery-card__screen { position: absolute; overflow: hidden; background: #0a0a0a; }
.gallery-card__screen .gallery-card__image { object-fit: contain; }
.gallery-card__placeholder { color: var(--text-soft); font-size: .82rem; }
.gallery-card__colors { display: flex; width: 10.25rem; flex-shrink: 0; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .75rem; margin-left: auto; }
@container (max-width: 460px) {
  .gallery-card__footer { gap: .75rem; }
  .gallery-card__colors { width: 7.5rem; gap: .5rem; }
  .gallery-card__colors .frame-color-swatch { width: 1.5rem; height: 1.5rem; }
}
.gallery-empty { grid-column: 1 / -1; padding: 3rem 1.5rem; border: 1px dashed var(--line-strong); background: rgba(255,255,255,.64); color: var(--text-soft); text-align: center; line-height: 1.6; }

.site-footer { background: transparent; color: var(--text-soft); }
.site-footer::before {
  content: '';
  display: block;
  width: min(calc(var(--content-max) - 2 * var(--content-gutter)), calc(100% - 2 * var(--content-gutter)));
  height: 1px;
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, rgba(6, 122, 122, .28) 15%, rgba(6, 122, 122, .6) 50%, rgba(6, 122, 122, .28) 85%, transparent);
}
.site-footer a { color: var(--accent); text-decoration: underline; text-decoration-color: rgba(6, 122, 122, .3); text-underline-offset: .2em; }
.site-footer a:hover { color: var(--accent-strong); text-decoration-color: currentColor; }
.site-footer-inner { display: flex; width: min(var(--content-max), 100%); min-height: 4rem; align-items: center; justify-content: center; margin: 0 auto; padding: .9rem var(--content-gutter); font-size: 1rem; line-height: 1.5; text-align: center; }

.workspace { width: min(var(--content-max), 100%); margin: 0 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); }
.inspector { display: none; }
.tools-mode .workspace { grid-template-columns: minmax(0, 1fr) 20rem; }
.tools-mode .inspector { display: block; }
.catalog { display: none; min-height: 0; overflow-y: auto; border-right: 1px solid var(--line); background: #fff; }
.catalog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; padding: 1.45rem 1.15rem 1rem; }
.catalog-header h2 { margin: .45rem 0 0; color: var(--text); font-size: 1.08rem; line-height: 1.25; }
.catalog-count { display: grid; place-items: center; min-width: 1.75rem; height: 1.75rem; border: 1px solid var(--line); background: var(--panel-soft); color: var(--accent); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .75rem; }
.catalog-list, .screen-list { display: grid; gap: .3rem; padding: 0 .7rem; }
.catalog-item, .screen-item { width: 100%; border: 0; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.catalog-item { display: grid; grid-template-columns: 2rem minmax(0, 1fr); align-items: center; gap: .55rem; padding: .72rem .6rem; border-left: 3px solid transparent; }
.catalog-item:hover, .screen-item:hover { background: rgba(6,122,122,.055); }
.catalog-item.is-active { border-left-color: var(--accent); background: rgba(6,122,122,.09); }
.catalog-item-number { color: #71908a; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .7rem; }
.catalog-item-copy { display: grid; min-width: 0; gap: .25rem; }
.catalog-item-copy strong { overflow: hidden; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.catalog-item-copy small { overflow: hidden; color: var(--text-soft); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.catalog-divider { height: 1px; margin: 1rem 1.15rem; background: var(--line); }
.catalog-subheader { display: flex; align-items: center; justify-content: space-between; padding: 0 1.15rem .65rem; color: #718b85; font-size: .7rem; }
.screen-item { display: grid; grid-template-columns: 2rem minmax(0, 1fr); align-items: center; gap: .45rem; min-height: 2.45rem; padding: .5rem .6rem; border-left: 3px solid transparent; }
.screen-item.is-active { border-left-color: var(--accent); background: rgba(6,122,122,.09); color: var(--accent-strong); }
.screen-item span { color: #78928c; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .68rem; }
.screen-item strong { overflow: hidden; font-size: .8rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.stage-panel { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #fff; }
.tools-mode .stage-panel { border-right: 1px solid var(--line); }
.frame-color-controls { position: absolute; z-index: 3; top: 50%; right: 20px; display: flex; width: 3.5rem; flex-direction: column; align-items: center; padding: .85rem .5rem; border: 0; background: transparent; color: var(--text-soft); font-size: .72rem; transform: translateY(-50%); }
.frame-color-swatches { display: flex; flex-direction: column; align-items: center; gap: .7rem; }
.frame-color-swatch { position: relative; width: 2rem; height: 2rem; padding: 0; border: 1px solid rgba(10,52,49,.28); border-radius: .4rem; background: #fff; cursor: pointer; }
.frame-color-swatch.is-active { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent); }
.frame-color-swatch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.eyebrow { color: var(--accent); font-size: .7rem; line-height: 1.2; font-weight: 760; letter-spacing: .16em; }
.render-stage { position: absolute; inset: 1rem 1.5rem; display: flex; align-items: flex-start; justify-content: flex-start; min-width: 0; min-height: 0; padding: 1rem; overflow: auto; }
.web-ui-screen__viewport { margin: auto; }

.inspector { min-height: 0; overflow: auto; background: var(--panel); }
.inspector-section { padding: 1.5rem; border-bottom: 1px solid var(--line); }
.inspector h1 { margin: .65rem 0 .55rem; font-size: 1.35rem; line-height: 1.25; letter-spacing: -.02em; }
.inspector p { margin: 0; color: var(--text-soft); font-size: .875rem; line-height: 1.55; }
.metadata { display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: .75rem; border-bottom: 1px solid var(--line); }
.metadata div { min-width: 0; padding: .8rem; }
.metadata dt { margin-bottom: .38rem; color: #718b85; font-size: .68rem; font-weight: 760; letter-spacing: .12em; text-transform: uppercase; }
.metadata dd { margin: 0; overflow: hidden; color: #23453f; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: .9rem; color: #718b85; font-size: .72rem; }
.subject-list { display: grid; gap: .5rem; }
.subject-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-width: 0; padding: .68rem .75rem; border: 1px solid var(--line); border-radius: .2rem; background: var(--panel-soft); }
.subject-row span { overflow: hidden; color: var(--text-soft); font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.subject-row output { max-width: 55%; overflow: hidden; color: var(--accent); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.subject-empty { font-size: .8rem !important; }
.diagnostics-section { border-bottom: 0; }
.diagnostic-list { display: grid; gap: .75rem; margin: 0; padding: 0; list-style: none; }
.diagnostic-list li { display: grid; gap: .25rem; padding-left: .7rem; border-left: 2px solid var(--danger); }
.diagnostic-list code { overflow-wrap: anywhere; color: #ffb3a4; font-size: .72rem; }
.diagnostic-list span { color: var(--text-soft); font-size: .78rem; line-height: 1.4; }

.web-ui-screen__viewport { position: relative; flex: none; filter: drop-shadow(0 1.25rem 2.25rem rgba(0,0,0,.4)); }
.web-ui-screen__surface { position: absolute; z-index: 1; inset: 0 auto auto 0; overflow: hidden; transform-origin: top left; isolation: isolate; background: #fafafa; color: #424242; font-family: "PodsC Symbols", "Lvd LVGL Symbols", Montserrat, Arial, 'Microsoft YaHei', sans-serif; font-size: 14px; line-height: normal; }
.web-ui-screen__surface--round { border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.09); }
.web-ui-device-frame__art { position: absolute; z-index: 0; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; user-select: none; }
.web-ui-device-frame__bezel { position: absolute; z-index: 2; display: block; pointer-events: none; box-shadow: inset 0 0 10px rgba(0,0,0,.48), 0 0 0 1px rgba(0,0,0,.38); }
.web-ui-widget { position: absolute; box-sizing: border-box; min-width: 0; min-height: 0; max-width: 100%; border: 0; color: inherit; font: inherit; }
.web-ui-screen__surface > .web-ui-widget--obj { position: relative; inset: 0; width: 100%; height: 100%; }
.web-ui-widget--flex > .web-ui-widget { position: relative; flex-shrink: 0; }
.web-ui-widget--flex > .web-ui-widget.is-layout-ignored { position: absolute; }
.web-ui-widget.is-hidden { display: none !important; }
.web-ui-widget.is-disabled { cursor: not-allowed; opacity: .55; pointer-events: none; }
.web-ui-widget--obj { background: transparent; }
.web-ui-widget--label { display: flex; align-items: center; background: transparent; }
.web-ui-widget--label > span { width: 100%; }
.web-ui-widget--button { display: flex; align-items: center; justify-content: center; appearance: none; border-radius: 8px; cursor: pointer; background: #2196f3; color: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.24); }
.web-ui-widget--button:active, .web-ui-widget--button.is-pressed { filter: brightness(.8); }
.web-ui-widget--button:disabled { cursor: default; }
.web-ui-widget--button:focus-visible, .web-ui-widget--switch:focus-visible, .web-ui-widget--slider:focus-visible, .web-ui-widget--arc:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.web-ui-widget--switch { display: inline-flex; width: 50px; height: 25px; align-items: center; padding: 3px; border: 0; border-radius: 999px; cursor: pointer; background: #eee; }
.web-ui-switch__thumb { display: block; height: 100%; aspect-ratio: 1; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: margin .16s ease; }
.web-ui-widget--switch.is-checked { background: #2196f3; }
.web-ui-widget--switch.is-checked .web-ui-switch__thumb { margin-left: auto; }
.web-ui-widget--switch.web-ui-widget--vertical { flex-direction: column; }
.web-ui-widget--switch.web-ui-widget--vertical.is-checked .web-ui-switch__thumb { margin-top: auto; margin-left: 0; }
.web-ui-widget--arc { cursor: pointer; background: transparent; }
.web-ui-widget--arc svg { display: block; width: 100%; height: 100%; overflow: visible; }
.web-ui-arc__track, .web-ui-arc__indicator { fill: none; stroke: currentColor; }
.web-ui-arc__track { color: #eee; }
.web-ui-arc__indicator { color: #2196f3; }
.web-ui-arc__knob { fill: currentColor; color: #2196f3; }
.web-ui-widget--bar { overflow: hidden; border-radius: 999px; background: var(--web-ui-widget-track, rgba(33,150,243,.2)); }
.web-ui-bar__indicator { position: absolute; inset: 0 auto 0 0; display: block; height: 100%; background: var(--web-ui-widget-indicator, #2196f3); }
.web-ui-widget--bar.web-ui-widget--vertical .web-ui-bar__indicator { inset: auto 0 0; width: 100%; }
.web-ui-widget--slider { appearance: none; height: 8px; border-radius: 999px; background: linear-gradient(to right, var(--web-ui-widget-indicator, #2196f3) var(--web-ui-slider-progress), var(--web-ui-widget-track, rgba(33,150,243,.2)) var(--web-ui-slider-progress)); cursor: pointer; }
.web-ui-widget--slider.web-ui-widget--vertical { writing-mode: vertical-lr; direction: rtl; }
.web-ui-widget--slider::-webkit-slider-thumb { width: 20px; height: 20px; appearance: none; border: 0; border-radius: 50%; background: var(--web-ui-widget-knob, #2196f3); }
.web-ui-widget--slider::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: var(--web-ui-widget-knob, #2196f3); }
.web-ui-widget--buttonmatrix { display: flex; gap: 2px; flex-direction: column; padding: 2px; border-radius: 6px; background: #eee; }
.web-ui-buttonmatrix__row { display: flex; min-height: 0; flex: 1; gap: 2px; }
.web-ui-buttonmatrix__button { min-width: 0; flex: 1; border: 0; border-radius: 4px; background: #fff; color: #424242; font: inherit; cursor: pointer; }
.web-ui-buttonmatrix__button:active, .web-ui-buttonmatrix__button.is-selected { background: #2196f3; color: #fff; }
.web-ui-widget--spinbox { display: flex; overflow: hidden; border: 1px solid #eee; border-radius: 6px; background: #fff; color: #424242; }
.web-ui-spinbox__step { width: 28%; min-width: 24px; border: 0; background: #eee; color: #424242; font: inherit; cursor: pointer; }
.web-ui-spinbox__input { width: 44%; min-width: 0; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; text-align: center; appearance: textfield; }
.web-ui-spinbox__input::-webkit-inner-spin-button { appearance: none; }
.web-ui-widget--spinner, .web-ui-widget--led { display: grid; place-items: center; }
.web-ui-spinner__track { display: block; width: 100%; height: 100%; border-radius: 50%; background: conic-gradient(currentcolor 0deg var(--web-ui-spinner-angle), #eee var(--web-ui-spinner-angle)); color: #2196f3; mask: radial-gradient(circle, transparent 54%, #fff 56%); animation: web-ui-spinner-rotate linear infinite; }
@keyframes web-ui-spinner-rotate { to { transform: rotate(360deg); } }
.web-ui-led__light { display: block; width: 100%; height: 100%; border-radius: 50%; background: currentcolor; box-shadow: inset 0 -5px 9px rgba(0,0,0,.24), 0 0 12px currentcolor; }

.web-ui-widget--checkbox { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; background: transparent; }
.web-ui-widget--checkbox input { width: 1.15em; height: 1.15em; margin: 0; accent-color: #2196f3; }
.web-ui-widget--dropdown, .web-ui-widget--roller, .web-ui-widget--textarea { padding: 5px 8px; border: 1px solid #d6d9dc; border-radius: 5px; outline: 0; background: #fff; color: #424242; font: inherit; }
.web-ui-widget--dropdown:focus, .web-ui-widget--roller:focus, .web-ui-widget--textarea:focus { border-color: #2196f3; box-shadow: 0 0 0 2px rgba(33,150,243,.16); }
.web-ui-widget--textarea { resize: none; }
.web-ui-media { position: relative; display: grid; width: 100%; height: 100%; overflow: hidden; place-items: center; background-position: center; background-repeat: no-repeat; background-size: contain; opacity: var(--web-ui-image-opacity, 1); }
.web-ui-media.is-animated { animation: web-ui-media-pulse 1.2s ease-in-out infinite alternate; }
.web-ui-media__placeholder { display: grid; width: 100%; height: 100%; place-items: center; border: 1px dashed #b8c0c7; background: repeating-conic-gradient(#f8fafc 0 25%, #edf1f4 0 50%) 0 / 12px 12px; color: #69737d; font-size: .78em; }
@keyframes web-ui-media-pulse { to { filter: brightness(.88); } }
.web-ui-widget--imagebutton { display: grid; padding: 0; overflow: hidden; place-items: center; border-radius: 5px; background: transparent; cursor: pointer; }
.web-ui-widget--imagebutton:active { transform: translateY(1px); filter: brightness(.86); }

.web-ui-widget--line svg, .web-ui-widget--chart svg, .web-ui-widget--arclabel svg { display: block; width: 100%; height: 100%; overflow: visible; }
.web-ui-line__path { fill: none; stroke: currentColor; stroke-width: var(--web-ui-line-width, 2px); opacity: var(--web-ui-line-opacity, 1); vector-effect: non-scaling-stroke; }
.web-ui-widget--qrcode { display: grid; padding: 5%; place-items: stretch; background: #fff; }
.web-ui-qrcode__matrix { display: grid; width: 100%; height: 100%; padding: 2%; background: var(--qr-light); grid-template-columns: repeat(21, 1fr); grid-template-rows: repeat(21, 1fr); }
.web-ui-qrcode__matrix i { display: block; background: var(--qr-light); }
.web-ui-qrcode__matrix i.is-dark { background: var(--qr-dark); }

.web-ui-widget--calendar { display: flex; overflow: hidden; flex-direction: column; border: 1px solid #d6d9dc; border-radius: 6px; background: #fff; }
.web-ui-calendar__header { display: grid; min-height: 15%; align-items: center; background: #2196f3; color: #fff; grid-template-columns: 2rem 1fr 2rem; text-align: center; }
.web-ui-calendar__header button { height: 100%; border: 0; background: transparent; color: inherit; cursor: pointer; }
.web-ui-calendar__grid { display: grid; min-height: 0; flex: 1; padding: 3px; grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(7, 1fr); }
.web-ui-calendar__grid span, .web-ui-calendar__grid button { display: grid; min-width: 0; place-items: center; border: 0; border-radius: 3px; background: transparent; color: inherit; font: inherit; }
.web-ui-calendar__grid button:not(:disabled):hover { background: rgba(33,150,243,.12); }
.web-ui-calendar__grid .is-weekday { color: #77818a; font-size: .74em; }
.web-ui-calendar__grid .is-today { background: #2196f3; color: #fff; font-weight: 700; }

.web-ui-widget--table { display: grid; overflow: auto; border: 1px solid #cfd5da; background: #fff; }
.web-ui-table__cell { min-width: 0; padding: 5px 7px; overflow: visible; border-right: 1px solid #dfe3e6; border-bottom: 1px solid #dfe3e6; }
.web-ui-table__cell.is-cropped { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.web-ui-chart__grid { fill: none; stroke: #dde2e6; stroke-width: 1; vector-effect: non-scaling-stroke; }
.web-ui-chart__line { fill: none; stroke: #2196f3; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.web-ui-chart__cursor { fill: none; stroke: #ef4444; stroke-width: 1; stroke-dasharray: 3 2; vector-effect: non-scaling-stroke; }
.web-ui-chart__bar { opacity: .9; }

.web-ui-widget--keyboard { display: grid; gap: 2px; padding: 3px; background: #dfe3e6; grid-template-columns: repeat(10, minmax(0, 1fr)); }
.web-ui-widget--keyboard button { min-width: 0; padding: 0; border: 0; border-radius: 3px; background: #fff; color: #424242; font: inherit; cursor: pointer; }
.web-ui-widget--keyboard button:active { background: #2196f3; color: #fff; }
.web-ui-widget--scale { position: absolute; overflow: visible; border-bottom: 2px solid currentColor; }
.web-ui-scale__tick { position: absolute; bottom: -1px; width: 1px; height: 28%; background: currentColor; transform: translateX(-50%); }
.web-ui-scale__tick.is-major { height: 48%; }
.web-ui-scale__tick i { position: absolute; top: calc(100% + 2px); left: 50%; color: currentColor; font-size: .68em; font-style: normal; transform: translateX(-50%); }
.web-ui-widget--canvas { display: grid; place-items: center; overflow: hidden; background-color: var(--web-ui-canvas-fill); background-image: linear-gradient(45deg, rgba(0,0,0,.035) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.035) 75%), linear-gradient(45deg, rgba(0,0,0,.035) 25%, transparent 25%, transparent 75%, rgba(0,0,0,.035) 75%); background-position: 0 0, 8px 8px; background-size: 16px 16px; }
.web-ui-widget--canvas span { padding: 2px 5px; border-radius: 3px; background: rgba(255,255,255,.72); color: #64707a; font-size: .72em; }
.web-ui-arclabel__text { fill: currentColor; font: inherit; }

.web-ui-widget--spangroup { display: -webkit-box; overflow: hidden; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: var(--web-ui-span-lines, initial); }
.web-ui-widget--msgbox, .web-ui-widget--win { display: flex; overflow: hidden; flex-direction: column; border: 1px solid #d5dadd; border-radius: 7px; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.16); }
.web-ui-dialog__header, .web-ui-window__header { display: flex; min-height: 32px; align-items: center; gap: 5px; padding: 6px 8px; border-bottom: 1px solid #e2e5e8; background: #f7f8f9; }
.web-ui-dialog__header strong, .web-ui-window__header strong { min-width: 0; margin-right: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.web-ui-dialog__header > button, .web-ui-window__header > .web-ui-widget { position: relative; inset: auto; width: auto; height: 24px; min-width: 24px; padding: 0 6px; border: 0; border-radius: 4px; background: #e7eaed; color: #424242; }
.web-ui-dialog__body, .web-ui-window__content { position: relative; min-height: 0; flex: 1; padding: 8px; overflow: auto; }
.web-ui-dialog__body p { margin: 0; }
.web-ui-dialog__footer { display: flex; min-height: 34px; justify-content: flex-end; gap: 6px; padding: 5px 8px; }
.web-ui-dialog__footer > .web-ui-widget { position: relative; inset: auto; width: auto; height: 26px; padding: 0 10px; border: 0; border-radius: 4px; background: #2196f3; color: #fff; }

.web-ui-widget--menu { display: grid; overflow: hidden; border: 1px solid #d5dadd; background: #fff; grid-template-columns: minmax(55px, 32%) 1fr; }
.web-ui-menu__nav { display: flex; min-width: 0; flex-direction: column; border-right: 1px solid #e2e5e8; background: #f3f5f6; }
.web-ui-menu__nav button { min-height: 30px; padding: 4px 7px; overflow: hidden; border: 0; border-bottom: 1px solid #e2e5e8; background: transparent; color: inherit; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.web-ui-menu__nav button.is-active { background: #2196f3; color: #fff; }
.web-ui-menu__content { position: relative; min-width: 0; min-height: 0; overflow: auto; }

.web-ui-widget--tabview { display: flex; overflow: hidden; flex-direction: column; border: 1px solid #d5dadd; background: #fff; }
.web-ui-tabs__bar { position: relative; display: flex; flex: 0 0 auto; background: #eef1f3; }
.web-ui-tabs__bar button { min-width: 0; min-height: 30px; flex: 1; padding: 4px 8px; overflow: hidden; border: 0; border-bottom: 2px solid transparent; background: transparent; color: inherit; text-overflow: ellipsis; white-space: nowrap; }
.web-ui-tabs__bar button.is-active { border-bottom-color: #2196f3; color: #1976d2; }
.web-ui-tabs__panel { position: relative; min-height: 0; flex: 1; overflow: auto; }
.web-ui-widget--tabview[data-bar-position='bottom'] { flex-direction: column-reverse; }
.web-ui-widget--tabview[data-bar-position='left'] { flex-direction: row; }
.web-ui-widget--tabview[data-bar-position='right'] { flex-direction: row-reverse; }
.web-ui-widget--tabview[data-bar-position='left'] .web-ui-tabs__bar, .web-ui-widget--tabview[data-bar-position='right'] .web-ui-tabs__bar { width: 32%; flex-direction: column; }

.web-ui-widget--tileview { overflow: hidden; background: #fff; }
.web-ui-tileview__viewport { position: absolute; inset: 0; overflow: hidden; }
.web-ui-tileview__nav { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 4px; }
.web-ui-tileview__nav button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: rgba(0,0,0,.25); }
.web-ui-tileview__nav button.is-active { background: #2196f3; }
.web-ui-structural__title { display: block; padding: 4px 6px; }
.web-ui-structural__marker { display: inline-block; padding: 2px 4px; border: 1px dashed #b8c0c7; color: #69737d; font-size: .65em; }

.stage-error { position: relative; z-index: 1; width: min(28rem, 90%); padding: 2rem; border: 1px solid rgba(199, 68, 47, .25); border-top: 3px solid var(--danger); border-radius: .3rem; background: rgba(255,255,255,.96); text-align: center; box-shadow: 0 1.5rem 4rem rgba(5, 94, 94, .12); }
.stage-error-icon { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; margin: 0 auto 1rem; border-radius: 50%; background: rgba(255, 134, 111, .12); color: var(--danger); font-weight: 800; }
.stage-error h2 { margin: 0 0 .5rem; font-size: 1.15rem; }
.stage-error p { margin: 0 0 1.25rem; color: var(--text-soft); line-height: 1.5; }

.json-dialog { width: min(38rem, calc(100% - 2rem)); padding: 0; border: 1px solid var(--line-strong); border-top: 3px solid var(--accent); border-radius: .3rem; background: #fff; color: var(--text); box-shadow: 0 2rem 6rem rgba(4, 69, 69, .22); }
.json-dialog::backdrop { background: rgba(5, 49, 49, .42); backdrop-filter: blur(5px); }
.dialog-card { margin: 0; padding: 1.4rem; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.dialog-header h2 { margin: .45rem 0 0; font-size: 1.25rem; }
.icon-button { width: 2.25rem; height: 2.25rem; border-radius: .5rem; background: transparent; color: var(--text-soft); font-size: 1.5rem; line-height: 1; }
.icon-button:hover { background: rgba(6,122,122,.06); color: var(--text); }
.import-tabs { display: flex; gap: .25rem; margin: 1.25rem 0 1rem; padding: .25rem; border-radius: .25rem; background: var(--panel-soft); }
.import-tab { flex: 1; padding: .6rem .75rem; border-radius: .45rem; background: transparent; color: var(--text-soft); font-size: .85rem; }
.import-tab.is-active { background: #fff; color: var(--accent); box-shadow: inset 0 0 0 1px var(--line); }
.drop-zone { display: grid; place-items: center; min-height: 13rem; padding: 1.5rem; border: 1px dashed rgba(6,122,122,.34); border-radius: .3rem; background: rgba(6,122,122,.035); text-align: center; cursor: pointer; transition: .18s ease; }
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--accent); background: rgba(6,122,122,.075); }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-zone strong { margin: .8rem 0 .35rem; font-size: .95rem; }
.drop-zone span:last-child { color: var(--text-soft); font-size: .78rem; }
.drop-icon { display: grid; place-items: center; width: 3rem; height: 3rem; border: 1px solid var(--line-strong); border-radius: .3rem; color: var(--accent); font-family: ui-monospace, monospace; font-weight: 800; }
.import-pane label { display: block; margin-bottom: .5rem; color: var(--text-soft); font-size: .8rem; }
.import-pane textarea { width: 100%; min-height: 13rem; resize: vertical; padding: .9rem; border: 1px solid var(--line); border-radius: .2rem; outline: none; background: #f8fbfb; color: #173b36; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .78rem; line-height: 1.5; }
.import-pane textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(6,122,122,.08); }
.import-pane .button { width: 100%; margin-top: .75rem; }
.import-error { margin: .85rem 0 0; color: #ffad9d; font-size: .8rem; }

.embed-mode .app-shell { display: block; min-height: 100vh; }
.embed-mode [data-app-chrome] { display: none !important; }
.embed-mode .workspace { display: block; min-height: 100vh; }
.embed-mode .stage-panel { min-height: 100vh; border: 0; }
.embed-mode .render-stage { inset: 1rem; }
.embed-mode .frame-color-controls { display: none !important; }

@media (max-width: 840px) {
  body { overflow: auto; }
  .app-shell { grid-template-rows: auto 1fr auto; }
  .topbar-inner { min-height: 4.5rem; align-items: flex-start; padding: 1rem; }
  .topbar-actions { flex-wrap: wrap; justify-content: flex-end; gap: .65rem; }
  .workspace { display: flex; flex-direction: column; }
  .catalog { order: 1; overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); }
  .catalog-header { padding-bottom: .7rem; }
  .catalog-list, .screen-list { display: flex; overflow-x: auto; padding-bottom: .75rem; }
  .catalog-item { flex: 0 0 13rem; }
  .catalog-divider { margin-top: .25rem; }
  .screen-item { flex: 0 0 9rem; }
  .stage-panel { min-height: 66vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .stage-panel { order: 2; }
  .tools-mode .inspector { order: 3; overflow: visible; }
}

@media (max-width: 540px) {
  .brand-product { display: none; }
  .topbar-inner { align-items: center; }
  .button { min-height: 2.75rem; }
  .render-stage { inset: 1rem .5rem; }
  .gallery-page { padding-top: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media (max-width: 900px) {
  html:not(.gallery-mode) .topbar-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  html:not(.gallery-mode) .topbar-inner > .brand { grid-column: 1; grid-row: 1; }
  html:not(.gallery-mode) .topbar-actions { grid-column: 2; grid-row: 1; }
  .preview-device-summary { grid-column: 1 / -1; grid-row: 2; padding: 0 0 .5rem; }
  .gallery-mode .app-shell { grid-template-rows: auto minmax(min-content, 1fr) auto; }
  .gallery-mode .topbar-inner { flex-wrap: wrap; gap: .75rem; padding-top: 1rem; padding-bottom: 1rem; }
  .gallery-mode .topbar-actions { flex-basis: 100%; }
}

html:not(.gallery-mode) #gallery-page { display: none; }
