.cx-wbe-panel {
  --cx-wbe-page: var(--page, #eef8f5);
  --cx-wbe-card: var(--card, #fff);
  --cx-wbe-text: var(--text, #173f36);
  --cx-wbe-muted: var(--muted, #7a908b);
  --cx-wbe-line: var(--line, #e2eeea);
  --cx-wbe-green: var(--green, #0fb486);
  --cx-wbe-green-deep: var(--green-deep, #087e62);
  --cx-wbe-danger: var(--danger, #d85454);
  position: fixed;
  z-index: 106;
  top: 0;
  bottom: 0;
  left: 50%;
  display: grid;
  width: 100vw;
  max-width: 430px;
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  color: var(--cx-wbe-text);
  background: var(--cx-wbe-page);
  box-shadow: 0 0 70px rgba(20, 60, 47, .16);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  transform: translateX(-50%);
  isolation: isolate;
}
.cx-wbe-panel[hidden] { display: none !important; }
.cx-wbe-panel * { box-sizing: border-box; }
.cx-wbe-panel button,.cx-wbe-panel input { min-width: 0; max-width: 100%; margin: 0; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; }
.cx-wbe-panel button:not(:disabled) { cursor: pointer; }
.cx-wbe-panel button:disabled { cursor: not-allowed; opacity: .45; }
.cx-wbe-panel img { display: block; max-width: 100%; }

.cx-wbe-nav { position: relative; z-index: 7; display: grid; width: 100%; min-width: 0; min-height: calc(48px + env(safe-area-inset-top)); grid-template-columns: 52px minmax(0, 1fr) 52px; align-items: end; padding: env(safe-area-inset-top) max(8px, env(safe-area-inset-right)) 6px max(8px, env(safe-area-inset-left)); background: rgba(238, 248, 245, .96); backdrop-filter: blur(18px) saturate(145%); }
.cx-wbe-nav > button { display: grid; width: 36px; height: 36px; place-items: center; align-self: center; border-radius: 50%; color: #111; font-size: 30px; font-weight: 300; line-height: 1; }
.cx-wbe-nav > button:last-child { justify-self: end; color: #55766d; font-size: 24px; }
.cx-wbe-nav > h2 { align-self: center; margin: 0; overflow: hidden; color: #111; font-size: 17px; font-weight: 500; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.cx-wbe-scroll { width: 100%; min-width: 0; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.cx-wbe-content { display: grid; width: 100%; min-width: 0; min-height: 100%; align-content: start; gap: 10px; padding: 0 max(14px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); overflow-x: hidden; }
.cx-wbe-content.is-preview { padding: 0 max(9px, env(safe-area-inset-right)) calc(110px + env(safe-area-inset-bottom)) max(9px, env(safe-area-inset-left)); }
.cx-wbe-content > * { min-width: 0; max-width: 100%; }
.cx-wbe-card { width: 100%; min-width: 0; overflow: hidden; border: 1px solid var(--cx-wbe-line); border-radius: 21px; background: var(--cx-wbe-card); }

/* Selection page mirrors pages/wrongbook-select. */
.cx-wbe-classification-note { display: flex; align-items: center; gap: 9px; padding: 11px; }
.cx-wbe-classification-note > span { display: flex; width: 32px; height: 32px; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 9px; background: linear-gradient(145deg, #43c99c, #0d9a73); color: #fff; font-size: 10px; font-weight: 800; }
.cx-wbe-classification-note > div { min-width: 0; }
.cx-wbe-classification-note h1 { margin: 0 0 3px; font-size: 14px; font-weight: 800; }
.cx-wbe-classification-note p { margin: 0; color: var(--cx-wbe-muted); font-size: 10px; line-height: 1.5; }
.cx-wbe-select-card { padding: 0 11px; }
.cx-wbe-select-card > header { display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--cx-wbe-line); font-size: 11px; }
.cx-wbe-select-card > header strong { color: var(--cx-wbe-green); font-size: 17px; }
.cx-wbe-select-card > header span:last-child { color: var(--cx-wbe-green); }
.cx-wbe-select-list { display: grid; }
.cx-wbe-select-row { display: grid; min-width: 0; grid-template-columns: 20px 46px minmax(0, 1fr) 22px 22px 30px; align-items: center; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--cx-wbe-line); transition: opacity .15s ease, transform .15s ease; }
.cx-wbe-select-row:last-child { border-bottom: 0; }
.cx-wbe-select-row.is-dragging { z-index: 2; opacity: .65; transform: scale(.985); }
.cx-wbe-checkbox { display: flex !important; width: 20px; height: 20px; flex: 0 0 auto; align-items: center; justify-content: center; border: 1px solid #bdcac6 !important; border-radius: 4px; color: #fff !important; font-size: 12px !important; }
.cx-wbe-checkbox.is-checked { border-color: var(--cx-wbe-green) !important; background: var(--cx-wbe-green) !important; }
.cx-wbe-thumb { display: flex; width: 46px; height: 41px; align-items: center; justify-content: center; border-radius: 6px; background: #f0f2f0; color: #65736f; font-size: 11px; }
.cx-wbe-academic { display: inline-flex; min-width: 0; min-height: 21px; align-items: center; justify-self: start; overflow: hidden; padding: 0 8px; border-radius: 11px; background: #def7ee; color: #087c60; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.cx-wbe-order-tools { display: grid; gap: 2px; }
.cx-wbe-order-tools button { display: grid; width: 20px; height: 19px; place-items: center; border-radius: 5px; background: #edf5f2; color: #527069; font-size: 11px; line-height: 1; }
.cx-wbe-drag-handle { width: 22px; height: 40px; border-radius: 7px !important; color: #81928d !important; font-size: 17px !important; touch-action: none; }
.cx-wbe-delete-item { display: flex !important; min-height: 24px; align-items: center; justify-content: center; border: 1px solid #f1c3bd !important; border-radius: 6px; background: #fff7f6 !important; color: #d45047 !important; font-size: 9px !important; line-height: 1; }
.cx-wbe-selection-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; font-size: 11px; }
.cx-wbe-selection-bar > button { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.cx-wbe-selection-bar > button:last-child,.cx-wbe-selection-bar strong { color: var(--cx-wbe-green); }
.cx-wbe-primary-wide { display: flex !important; width: 100%; min-height: 46px; align-items: center; justify-content: center; border-radius: 11px !important; background: var(--cx-wbe-green) !important; color: #fff !important; font-size: 14px !important; font-weight: 500 !important; }

/* Template and manual-layout workbench. */
.cx-wbe-template-heading { display: flex; width: 100%; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 11px 12px; border-radius: 14px; background: linear-gradient(135deg, #e5f8f1, #d9f3e9); }
.cx-wbe-template-heading > div { min-width: 0; }
.cx-wbe-template-heading h1 { margin: 0; color: var(--cx-wbe-green-deep); font-size: 17px; font-weight: 500; }
.cx-wbe-template-heading p { margin: 3px 0 0; color: #55766d; font-size: 10px; line-height: 1.4; }
.cx-wbe-template-heading > span,.cx-wbe-template-card > span { padding: 2px 5px; border-radius: 5px; background: #fff1b8; color: #8c6500; font-size: 8px; font-weight: 700; }
.cx-wbe-template-grid { display: grid; width: 100%; min-width: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.cx-wbe-template-card { position: relative; display: flex !important; width: 100%; min-height: 95px; flex-direction: column; align-items: stretch; gap: 5px; padding: 7px !important; overflow: hidden; border: 1px solid var(--cx-wbe-line) !important; border-radius: 11px; background: #fff !important; text-align: left; }
.cx-wbe-template-card.is-selected { border-color: #0eae7b !important; background: #effaf6 !important; box-shadow: 0 0 0 2px rgba(14, 174, 123, .1); }
.cx-wbe-template-card > span { position: absolute; z-index: 2; top: 4px; right: 4px; font-size: 7px; }
.cx-wbe-template-card > i { display: flex; height: 56px; flex-direction: column; justify-content: center; gap: 5px; padding: 7px; border: 1px solid #dfe8e5; border-radius: 6px; background: #fffdf8; }
.cx-wbe-template-card > i b { display: block; width: 100%; height: 3px; border-radius: 999px; background: #dce6e2; }
.cx-wbe-template-card > i b:nth-child(2) { width: 65%; }
.cx-wbe-template-card > strong { min-width: 0; overflow: hidden; font-size: 10px; line-height: 1.3; font-weight: 500; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.cx-wbe-template-card.theme-coral > i { border-top: 4px solid #ff7f62; }
.cx-wbe-template-card.theme-growth > i { border-top: 4px solid #0eae7b; }
.cx-wbe-template-card.theme-academic > i { border-top: 4px solid #2674d9; }
.cx-wbe-layout-workbench { display: grid; width: 100%; min-width: 0; gap: 9px; padding: 11px; border: 1px solid #d8e8e2; border-radius: 14px; background: #fff; }
.cx-wbe-layout-workbench > header { display: grid; min-width: 0; gap: 8px; }
.cx-wbe-layout-workbench > header h2 { margin: 0; color: #173f35; font-size: 15px; font-weight: 500; }
.cx-wbe-layout-workbench > header p { margin: 3px 0 0; color: var(--cx-wbe-muted); font-size: 11px; line-height: 1.45; }
.cx-wbe-layout-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; padding: 3px; border-radius: 10px; background: #edf4f1; }
.cx-wbe-layout-tabs button { display: flex; min-height: 38px; align-items: center; justify-content: center; padding: 0 8px; border-radius: 8px; color: #687a75; font-size: 12px; white-space: nowrap; }
.cx-wbe-layout-tabs button.is-on { background: #fff; color: var(--cx-wbe-green-deep); box-shadow: 0 2px 5px rgba(28, 75, 62, .1); }
.cx-wbe-question-nav,.cx-wbe-item-nav { display: flex; width: 100%; gap: 6px; padding: 2px; overflow-x: auto; scrollbar-width: none; }
.cx-wbe-question-nav::-webkit-scrollbar,.cx-wbe-item-nav::-webkit-scrollbar { display: none; }
.cx-wbe-question-nav { min-width: 0; max-height: 156px; flex-wrap: wrap; overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #79ceb2 #edf4f1; overscroll-behavior-y: contain; }
.cx-wbe-question-nav::-webkit-scrollbar { display: block; width: 6px; }
.cx-wbe-question-nav::-webkit-scrollbar-thumb { border-radius: 999px; background: #79ceb2; }
.cx-wbe-question-nav button,.cx-wbe-item-nav button { display: inline-flex; min-width: 52px; min-height: 34px; flex: 0 0 auto; align-items: center; justify-content: center; padding: 0 9px; border: 1px solid #d8e6e1; border-radius: 999px; background: #f7faf9; color: #62746f; font-size: 11px; white-space: nowrap; }
.cx-wbe-item-nav button { min-width: 50px; min-height: 30px; padding: 0 8px; font-size: 10.5px; }
.cx-wbe-question-nav button.is-on,.cx-wbe-item-nav button.is-on { border-color: #79ceb2; background: #e7f8f1; color: #087c5c; }
.cx-wbe-item-nav button.is-related { border-color: #d6caec; color: #7354a9; }
.cx-wbe-item-nav button.is-related.is-on { border-color: #8d6cca; background: #f1ebfb; }
.cx-wbe-layout-shell { padding: 7px; border-radius: 10px; background: #e8efec; }
.cx-wbe-layout-shell.theme-coral { background: #f4ebe7; }
.cx-wbe-layout-shell.theme-academic { background: #e8eef6; }
.cx-wbe-layout-canvas { position: relative; width: 100%; height: 265px; overflow: hidden; border: 1px solid #b7c9c3; border-radius: 5px; background-color: #fff; background-image: linear-gradient(rgba(15, 143, 114, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(15, 143, 114, .055) 1px, transparent 1px); background-size: 10% 10%; box-shadow: 0 7px 17px rgba(28, 57, 49, .16); touch-action: none; }
.cx-wbe-layout-media { position: absolute; z-index: 1; overflow: visible; border: 2px solid #0eae7b; border-radius: 6px; background: #fff; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.cx-wbe-layout-media:active { cursor: grabbing; }
.cx-wbe-layout-media .cx-wbe-crop-frame { pointer-events: none; }
.cx-wbe-layout-media.is-related { border-color: #7b5bc3; }
.cx-wbe-layout-media.is-selected { z-index: 4; box-shadow: 0 0 0 3px rgba(14, 174, 123, .18), 0 4px 11px rgba(30, 61, 52, .18); }
.cx-wbe-layout-media.is-related.is-selected { box-shadow: 0 0 0 3px rgba(123, 91, 195, .17), 0 4px 11px rgba(30, 61, 52, .18); }
.cx-wbe-crop-frame { position: absolute; overflow: hidden; background: #fff; }
.cx-wbe-crop-frame img { position: absolute; max-width: none; max-height: none; opacity: 1; }
.cx-wbe-layout-media > span { position: absolute; z-index: 3; top: 4px; left: 4px; padding: 3px 5px; border-radius: 999px; background: #0b926d; color: #fff; font-size: 8.5px; line-height: 1.2; white-space: nowrap; }
.cx-wbe-layout-media.is-related > span { background: #7050b4; }
.cx-wbe-media-empty { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; color: #91a19b; font-size: 10px; }
.cx-wbe-layout-media > i { position: absolute; z-index: 8; width: 13px; height: 13px; border: 2px solid #fff; border-radius: 50%; background: #0b926d; box-shadow: 0 1px 4px rgba(0, 0, 0, .22); }
.cx-wbe-layout-media > i::before { content: ''; position: absolute; inset: -8px; border-radius: 50%; }
.cx-wbe-layout-media > i.handle-nw,.cx-wbe-layout-media > i.handle-se { cursor: nwse-resize; }
.cx-wbe-layout-media > i.handle-ne,.cx-wbe-layout-media > i.handle-sw { cursor: nesw-resize; }
.cx-wbe-layout-media > i.handle-n,.cx-wbe-layout-media > i.handle-s { cursor: ns-resize; }
.cx-wbe-layout-media > i.handle-e,.cx-wbe-layout-media > i.handle-w { cursor: ew-resize; }
.cx-wbe-layout-media.is-related > i { background: #7050b4; }
.cx-wbe-layout-media > i.handle-nw { top: 0; left: 0; transform: translate(-50%, -50%); }.cx-wbe-layout-media > i.handle-n { top: 0; left: 50%; transform: translate(-50%, -50%); }.cx-wbe-layout-media > i.handle-ne { top: 0; right: 0; transform: translate(50%, -50%); }.cx-wbe-layout-media > i.handle-e { top: 50%; right: 0; transform: translate(50%, -50%); }.cx-wbe-layout-media > i.handle-se { right: 0; bottom: 0; transform: translate(50%, 50%); }.cx-wbe-layout-media > i.handle-s { bottom: 0; left: 50%; transform: translate(-50%, 50%); }.cx-wbe-layout-media > i.handle-sw { bottom: 0; left: 0; transform: translate(-50%, 50%); }.cx-wbe-layout-media > i.handle-w { top: 50%; left: 0; transform: translate(-50%, -50%); }
.cx-wbe-layout-help { margin: 0; color: #64756f; font-size: 11px; line-height: 1.55; text-align: center; }
.cx-wbe-layout-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.cx-wbe-layout-tools button { display: flex; min-height: 36px; align-items: center; justify-content: center; padding: 0 5px; border: 1px solid #cce3db; border-radius: 8px; background: #f2faf7; color: #286554; font-size: 11px; }

/* Final worksheet and official image preview. */
.cx-wbe-preview-page { display: grid; width: 100%; min-width: 0; align-content: start; gap: 9px; }
.cx-wbe-preview-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 3px; border-radius: 10px; background: #dfeae6; }
.cx-wbe-preview-tabs button { display: flex; min-height: 41px; align-items: center; justify-content: center; padding: 0 7px; border-radius: 8px; color: #64756f; font-size: 12.5px; white-space: nowrap; }
.cx-wbe-preview-tabs button.is-on { background: #fff; color: var(--cx-wbe-green-deep); box-shadow: 0 2px 5px rgba(28, 75, 62, .12); }
.cx-wbe-preview-question-nav { display: flex; width: 100%; align-items: center; justify-content: center; gap: 9px; padding: 2px 5px; overflow-x: auto; scrollbar-width: none; }
.cx-wbe-preview-question-nav::-webkit-scrollbar { display: none; }
.cx-wbe-preview-question-nav button { display: flex; width: 35px; min-width: 35px; height: 35px; flex: 0 0 35px; align-items: center; justify-content: center; border: 1px solid #cddfd8; border-radius: 50%; background: #fff; color: #60716c; font-size: 12px; }
.cx-wbe-preview-question-nav button.is-on { border-color: var(--cx-wbe-green); background: var(--cx-wbe-green); color: #fff; }
.cx-wbe-worksheet-shell { padding: 6px; overflow: hidden; border-radius: 10px; background: #dfe9e5; box-shadow: 0 7px 17px rgba(20, 75, 60, .14); }
.cx-wbe-worksheet-paper { --sheet-accent: #0f8f72; --sheet-soft: #e8f5f1; --sheet-border: #9dcfc0; min-height: 460px; padding: 11px; border: 2px dashed var(--sheet-border); border-radius: 4px; background: #fff; }
.cx-wbe-worksheet-paper.theme-academic { --sheet-accent: #2e5c9a; --sheet-soft: #edf3fb; --sheet-border: #afc4df; }
.cx-wbe-worksheet-paper.theme-coral { --sheet-accent: #d66a4a; --sheet-soft: #fbefeb; --sheet-border: #e5b7a8; }
.cx-wbe-worksheet-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; padding: 1px 3px 7px; border-bottom: 2px solid var(--sheet-accent); }
.cx-wbe-worksheet-head h2 { margin: 0; color: var(--sheet-accent); font-size: 14px; letter-spacing: 1px; }
.cx-wbe-worksheet-head p { margin: 2px 0 0; color: #65756f; font-size: 7px; }
.cx-wbe-worksheet-head > div:last-child { text-align: right; }
.cx-wbe-worksheet-head span,.cx-wbe-worksheet-head small { display: block; color: #596a64; font-size: 7px; line-height: 1.6; }
.cx-wbe-worksheet-body { display: grid; min-height: 405px; grid-template-columns: 30% minmax(0, 1fr); gap: 5px; padding-top: 6px; }
.cx-wbe-worksheet-body > aside { display: flex; min-width: 0; flex-direction: column; gap: 5px; padding: 6px; border: 1px solid var(--sheet-border); border-radius: 5px; color: #4e615b; }
.cx-wbe-worksheet-body > aside h3 { margin: -6px -6px 2px; padding: 6px; border-radius: 4px 4px 0 0; background: var(--sheet-soft); color: var(--sheet-accent); font-size: 10px; }
.cx-wbe-worksheet-body > aside span,.cx-wbe-worksheet-body > aside small,.cx-wbe-worksheet-body > aside b { display: block; font-size: 7px; line-height: 1.5; }
.cx-wbe-worksheet-body > aside b { color: var(--sheet-accent); }
.cx-wbe-worksheet-body > aside > div { display: grid; gap: 4px; padding: 5px; border-radius: 5px; background: var(--sheet-soft); }
.cx-wbe-worksheet-body > aside > div.cx-wbe-review { margin-top: auto; border: 1px solid var(--sheet-border); background: #fbfcfc; }
.cx-wbe-worksheet-body > main { display: grid; min-width: 0; grid-template-rows: 215px 85px minmax(90px, 1fr); gap: 5px; }
.cx-wbe-worksheet-body > main > section { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--sheet-border); border-radius: 5px; background: #fff; }
.cx-wbe-worksheet-body > main > section > b { display: block; height: 18px; background: var(--sheet-soft); color: var(--sheet-accent); font-size: 7px; line-height: 18px; text-align: center; }
.cx-wbe-worksheet-body > main > section > i { display: block; height: 1px; margin: 14px 8px 0; background: #dce6e2; }
.cx-wbe-worksheet-body > main > section > footer { position: absolute; right: 0; bottom: 0; left: 0; padding: 4px 5px; background: var(--sheet-soft); color: var(--sheet-accent); font-size: 6px; text-align: right; }
.cx-wbe-worksheet-canvas { position: relative; height: calc(100% - 18px); overflow: hidden; }
.cx-wbe-worksheet-media { position: absolute; overflow: hidden; border: 1px solid #d6e1dd; border-radius: 4px; background: #fff; }
.cx-wbe-worksheet-media.is-related { border-color: var(--sheet-border); background: #fbfdfc; }
.cx-wbe-worksheet-media > span { position: absolute; z-index: 2; top: 2px; left: 2px; padding: 2px 3px; border-radius: 3px; background: var(--sheet-soft); color: var(--sheet-accent); font-size: 5px; }
.cx-wbe-official-shell { position: relative; display: block !important; width: 100%; min-width: 0; overflow: hidden; padding: 5px !important; border-radius: 10px !important; background: #dfe9e5 !important; box-shadow: 0 7px 17px rgba(20, 75, 60, .14); }
.cx-wbe-official-shell img { width: 100%; height: auto; background: #fff; }
.cx-wbe-official-shell > span { display: none; min-height: 220px; align-items: center; justify-content: center; color: var(--cx-wbe-muted); font-size: 11px; }
.cx-wbe-official-shell.is-loading > img { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cx-wbe-official-shell.is-loading > span { display: flex; }
.cx-wbe-preview-loading { display: flex; min-height: 220px; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 17px; border: 1px dashed #bfd4cd; border-radius: 10px; background: #fff; color: #57716a; text-align: center; }
.cx-wbe-preview-loading strong { font-size: 13px; }.cx-wbe-preview-loading span { color: var(--cx-wbe-muted); font-size: 10px; line-height: 1.5; }
.cx-wbe-preview-loading button { min-height: 34px; padding: 0 13px !important; border: 1px solid #aad8c8 !important; border-radius: 999px !important; background: #effaf6 !important; color: var(--cx-wbe-green-deep) !important; font-size: 11px !important; }
.cx-wbe-export-bar { position: absolute; z-index: 6; right: 9px; bottom: calc(9px + env(safe-area-inset-bottom)); left: 9px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 6px; overflow: hidden; border: 1px solid var(--cx-wbe-line); border-radius: 21px; background: #fff; box-shadow: 0 8px 28px rgba(18, 56, 45, .14); }
.cx-wbe-export-bar button { display: flex; min-height: 44px; align-items: center; justify-content: center; padding: 0 4px; overflow: hidden; border-radius: 10px; background: var(--cx-wbe-green); color: #fff; font-size: 12px; white-space: nowrap; }
.cx-wbe-export-bar button:last-child { background: #e7f8f1; color: var(--cx-wbe-green-deep); }

.cx-wbe-dialog-backdrop { position: absolute; z-index: 30; inset: 0; display: grid; place-items: center; padding: 22px; background: rgba(14, 33, 28, .42); backdrop-filter: blur(3px); }
.cx-wbe-dialog-backdrop[hidden] { display: none !important; }
.cx-wbe-dialog { width: min(100%, 310px); overflow: hidden; border-radius: 18px; background: #fff; box-shadow: 0 22px 60px rgba(8, 35, 27, .24); text-align: center; }
.cx-wbe-dialog h3 { margin: 0; padding: 23px 22px 0; color: #182f29; font-size: 17px; font-weight: 650; }
.cx-wbe-dialog p { margin: 10px 0 0; padding: 0 22px 22px; color: #637873; font-size: 13px; line-height: 1.6; }
.cx-wbe-dialog footer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid #e5ece9; }
.cx-wbe-dialog footer button { min-height: 49px; border-right: 1px solid #e5ece9; color: #536b64; font-size: 14px; }.cx-wbe-dialog footer button:last-child { border: 0; }.cx-wbe-dialog footer .is-primary { color: var(--cx-wbe-green-deep); font-weight: 650; }.cx-wbe-dialog footer .is-danger { color: var(--cx-wbe-danger); font-weight: 650; }
.cx-wbe-dialog footer button[hidden] + button { grid-column: 1 / -1; }

.cx-wbe-file-preview { position: absolute; z-index: 25; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); background: #08100e; color: #fff; }
.cx-wbe-file-preview[hidden] { display: none !important; }
.cx-wbe-file-preview > header { display: grid; min-height: calc(48px + env(safe-area-inset-top)); grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: end; padding: env(safe-area-inset-top) 6px 6px; background: rgba(4, 12, 10, .9); }
.cx-wbe-file-preview > header button { display: grid; width: 36px; height: 36px; place-items: center; color: #fff; font-size: 27px; }.cx-wbe-file-preview > header strong { align-self: center; font-size: 16px; font-weight: 500; text-align: center; }
.cx-wbe-file-preview > header span { align-self: center; color: rgba(255, 255, 255, .62); font-size: 9px; line-height: 1.2; text-align: center; }
.cx-wbe-file-preview > [data-cx-wbe-file-preview-viewport] { min-width: 0; min-height: 0; overflow: hidden; padding: 10px max(10px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); overscroll-behavior: contain; touch-action: none; cursor: grab; user-select: none; }
.cx-wbe-file-preview > [data-cx-wbe-file-preview-viewport].is-panning { cursor: grabbing; }
.cx-wbe-file-preview img { width: 100%; height: auto; background: #fff; transform-origin: top center; will-change: transform; user-select: none; -webkit-user-drag: none; }

@media (max-width: 393px) {
  .cx-wbe-content.is-preview { padding-right: max(8px, env(safe-area-inset-right)); padding-left: max(8px, env(safe-area-inset-left)); }
  .cx-wbe-template-grid { gap: 4px; }
  .cx-wbe-template-card { padding-right: 5px !important; padding-left: 5px !important; }
}

@media (max-width: 350px) {
  .cx-wbe-content { padding-right: 12px; padding-left: 12px; }
  .cx-wbe-select-row { grid-template-columns: 20px 40px minmax(0, 1fr) 20px 25px; gap: 5px; }
  .cx-wbe-order-tools { display: none; }
  .cx-wbe-thumb { width: 40px; }
  .cx-wbe-template-card { padding: 5px !important; }
}

@media (prefers-reduced-motion: reduce) {
  .cx-wbe-panel *,.cx-wbe-panel *::before,.cx-wbe-panel *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
.cx-wbe-panel.cx-wbe-report-layout { z-index: 2100; width: min(100vw - 48px, 1080px); max-width: 1080px; top: 24px; bottom: 24px; height: calc(100dvh - 48px); border-radius: 22px; border: 1px solid #c9e4dc; }
@media (max-width: 700px) { .cx-wbe-panel.cx-wbe-report-layout { width: 100vw; top: 0; bottom: 0; height: 100dvh; border-radius: 0; } }
