.aern-workspace-overlay[hidden] { display: none !important; }
.aern-workspace-overlay { position: fixed; inset: 0; z-index: 12000; background: rgba(0,0,0,.76); display: flex; align-items: center; justify-content: center; padding: 24px; }
.aern-workspace { width: min(1180px, 100%); max-height: calc(100svh - 48px); display: flex; flex-direction: column; color: #f5f1e9; background: #15171b; border: 1px solid #43464c; border-radius: 18px; box-shadow: 0 24px 100px #0009; font: 15px/1.5 Inter, sans-serif; }
.aern-workspace-open { overflow: hidden; }
.aern-workspace-header { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid #34363c; }
.aern-workspace-header h2 { font: 600 23px/1.3 Inter,sans-serif; margin: 4px 0 0; }
.aern-workspace-eyebrow { color: #bfb6a4; font-size: 12px; }
.aern-workspace-tabs { display: flex; flex-shrink: 0; gap: 8px; padding: 12px 24px; overflow-x: auto; border-bottom: 1px solid #34363c; }
.aern-workspace-tabs button { white-space: nowrap; }
.aern-workspace-tabs [aria-current="page"] { background: #ead9b5; border-color: #ead9b5; color: #171717; }
.aern-workspace-body { flex: 1 1 auto; min-height: 0; padding: 24px; overflow: auto; overscroll-behavior: contain; touch-action: pan-y; }
.aern-workspace-button,.aern-workspace-primary { min-height: 44px; border-radius: 9px; border: 1px solid #565961; padding: 9px 14px; font: inherit; color: #f5f1e9; background: #24272d; cursor: pointer; }
.aern-workspace-button:hover { background: #343840; }
.aern-workspace-primary { color: #151515; background: #ead9b5; border-color: #ead9b5; font-weight: 600; }
.aern-workspace button:focus-visible,.aern-workspace input:focus-visible,.aern-workspace textarea:focus-visible,.aern-workspace select:focus-visible { outline: 3px solid #d3b66d; outline-offset: 3px; }
.aern-workspace-intro { max-width: 850px; color: #d2d0cb; margin: 0 0 20px; }
.aern-workspace-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.aern-version-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(255px,1fr)); gap: 18px; margin-top: 20px; }
.aern-version-card { background: #202329; border: 1px solid #41454c; border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.aern-version-card.is-active { border: 2px solid #dfc68f; }
.aern-version-card>strong { font-size: 20px; }
.aern-version-thumbnail { height: 138px; border-radius: 9px; background: #33302a; color: #ead9b5; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 16px; overflow: hidden; }
.aern-version-thumbnail>span { font-size: 27px; font-weight: 600; }
.aern-version-mini-lines { height: 23px; width: 72%; border-top: 3px solid currentColor; border-bottom: 3px solid currentColor; opacity: .4; }
.aern-version-state { color: #e2c994; }
.aern-version-card small,.aern-workspace-block-row small { color: #c4c1ba; }
.aern-workspace-notice { padding: 14px 16px; background: #302b20; border-left: 3px solid #d6bf88; border-radius: 8px; color: #e6dcc5; }
.aern-workspace-form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.aern-workspace-theme-group { padding: 20px; margin: 16px 0; background: #202329; border: 1px solid #41454c; border-radius: 12px; }
.aern-workspace-theme-group h3 { margin: 0 0 12px; font-size: 21px; }
.aern-workspace-theme-group>summary,.aern-workspace-background-options>summary { min-height: 44px; cursor: pointer; font-weight: 600; line-height: 1.6; padding: 10px 0; box-sizing: border-box; }
.aern-workspace-theme-group[open]>summary { margin-bottom: 12px; }
.aern-workspace summary:focus-visible { outline: 3px solid #d3b66d; outline-offset: 3px; }
.aern-workspace-theme-group [aria-pressed="true"] { color: #151515; background: #ead9b5; border-color: #ead9b5; }
.aern-workspace-background-options { margin-top: 16px; border-top: 1px solid #41454c; }
.aern-workspace-range-value { font-weight: 600; color: #e6dcc5; }
.aern-workspace input[type="range"] { width: 100%; min-height: 44px; accent-color: #ead9b5; }
.aern-workspace-upload-status { min-height: 0; margin: 0 0 10px; color: #d8cfbc; overflow-wrap: anywhere; }
.aern-workspace-upload-status:empty { display: none; }
.aern-workspace-upload-status.is-error { color: #ffaaa4; }
.aern-workspace-background-preview { margin: 16px 0; max-width: 620px; }
.aern-workspace-background-frame { position: relative; height: 220px; overflow: hidden; background: #101216; border: 1px solid #54575e; border-radius: 10px; }
.aern-workspace-background-frame img,.aern-workspace-background-frame video { width: 100%; height: 100%; display: block; object-fit: cover; }
.aern-workspace-background-shade { position: absolute; inset: 0; pointer-events: none; }
.aern-workspace-background-preview figcaption { margin-top: 8px; color: #c2beb5; font-size: 13px; }
.aern-workspace-field { display: flex; flex-direction: column; gap: 7px; margin: 10px 0; }
.aern-workspace-field>span { font-weight: 600; }
.aern-workspace-field small { color: #c2beb5; }
.aern-workspace input:not([type="range"]),.aern-workspace select,.aern-workspace textarea { width: 100%; min-height: 44px; background: #101216; color: #f5f1e9; border: 1px solid #5d626d; border-radius: 8px; padding: 10px; font: inherit; box-sizing: border-box; }
.aern-workspace input[type="color"] { height: 48px; padding: 4px; }
.aern-workspace textarea { resize: vertical; }
.aern-workspace-footer { display: flex; flex-shrink: 0; flex-wrap: wrap; gap: 8px; align-items: center; padding: 14px 24px; border-top: 1px solid #34363c; }
.aern-workspace-status { flex: 1 1 260px; margin: 0; color: #d8cfbc; font-size: 13px; }
.aern-workspace-status.is-error { color: #ffaaa4; }
.aern-workspace-block-row,.aern-workspace-custom-block { padding: 18px; margin: 14px 0; background: #202329; border: 1px solid #41454c; border-radius: 12px; }
.aern-workspace-block-row>strong { font-size: 18px; }
.aern-workspace-template-picker { display: grid; grid-template-columns: repeat(auto-fit,minmax(170px,1fr)); gap: 10px; }
.aern-workspace-template-picker button { min-height: 95px; display: flex; flex-direction: column; justify-content: center; gap: 8px; text-align: left; }
.aern-workspace-template-picker small { color: #c3c0b8; font-size: 12px; }
.aern-workspace-preview-viewport { position: relative; width: 100%; overflow: hidden; background: #08090b; border: 1px solid #54575e; border-radius: 12px; }
.aern-workspace-preview { display: block; transform-origin: top left; border: 0; background: #0a0a0a; }
.aern-workspace-overlay .aern-workspace-button:disabled { opacity: .5; cursor: default; }
@media (max-width: 680px) {
  .aern-workspace-overlay { padding: 0; align-items: stretch; }
  .aern-workspace { width: 100%; max-height: 100svh; border-radius: 0; }
  .aern-workspace-header,.aern-workspace-footer { padding: 12px 16px; }
  .aern-workspace-tabs { padding: 10px 16px; }
  .aern-workspace-body { padding: 16px; }
  .aern-workspace-form-grid { grid-template-columns: 1fr; }
  .aern-workspace-theme-group { padding: 16px; }
  .aern-workspace-background-frame { height: 190px; }
  .aern-workspace-header h2 { font-size: 19px; }
  .aern-workspace-footer .aern-workspace-status { flex-basis: 100%; }
}
