.cdg-root {
  --cdg-bg: #fff;
  --cdg-text: #222;
  --cdg-accent: #0a6d96;
  --cdg-border: #d9e3e8;
  --cdg-link: #0a6d96;
  --cdg-button-bg: #fff;
  --cdg-button-text: #0a6d96;
  --cdg-primary-bg: #0a6d96;
  --cdg-primary-text: #fff;
  --cdg-radius: 3px;
  --cdg-button-radius: 3px;
  --cdg-font: inherit;
  color: var(--cdg-text);
  font-family: var(--cdg-font);
  font-size: 14px;
  line-height: 1.45;
}
.cdg-root *, .cdg-root *::before, .cdg-root *::after { box-sizing: border-box; }
.cdg-root [hidden] { display: none !important; }
.cdg-root h2, .cdg-root p { margin: 0; }
.cdg-root h2 { color: var(--cdg-text); font-family: inherit; font-size: 18px; font-weight: 500; line-height: 1.3; letter-spacing: normal; text-transform: none; }
.cdg-root a { color: var(--cdg-link); text-decoration: underline; text-underline-offset: 2px; }
.cdg-root .cdg-links { margin-top: 6px; font-size: 12px; }
.cdg-root .cdg-links:empty { display: none; }
.cdg-banner {
  position: fixed;
  z-index: 2147483640;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--cdg-bg);
  border-top: 1px solid var(--cdg-border);
  box-shadow: 0 -4px 20px rgb(0 0 0 / 9%);
}
.cdg-banner-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 1240px; margin: 0 auto; padding: 15px 24px; }
.cdg-banner-text { max-width: 660px; min-width: 0; }
.cdg-banner-text p:not(.cdg-links) { margin-top: 4px; }
.cdg-actions { display: flex; align-items: center; gap: 8px; }
.cdg-banner .cdg-actions { flex-shrink: 0; }
#cdg-root .cdg-button, #cdg-root .cdg-manage {
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--cdg-accent) !important;
  border-radius: var(--cdg-button-radius);
  background: var(--cdg-button-bg) !important;
  box-shadow: none;
  color: var(--cdg-button-text) !important;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: normal;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  white-space: normal;
}
#cdg-root .cdg-button-choice:hover, #cdg-root .cdg-manage:hover { filter: brightness(.94); }
#cdg-root .cdg-button-plain { padding: 0 8px; border-color: transparent !important; background: transparent !important; text-decoration: underline; text-underline-offset: 3px; }
#cdg-root .cdg-button-plain:hover { opacity: .78; }
.cdg-root .cdg-button:focus-visible, .cdg-root .cdg-manage:focus-visible, .cdg-root a:focus-visible, .cdg-root input:focus-visible { outline: 2px solid var(--cdg-accent); outline-offset: 3px; }
#cdg-root .cdg-manage { position: fixed; z-index: 2147483639; bottom: 12px; left: 12px; padding: 0 12px; border-color: var(--cdg-border); box-shadow: 0 2px 8px rgb(0 0 0 / 10%); font-size: 12px; }
.cdg-dialog { z-index: 2147483642; width: min(480px, calc(100vw - 28px)); max-height: min(88vh, 700px); padding: 24px; overflow-y: auto; border: 1px solid var(--cdg-border); border-radius: var(--cdg-radius); background: var(--cdg-bg); color: var(--cdg-text); font-family: var(--cdg-font); font-size: 14px; line-height: 1.45; box-shadow: 0 18px 48px rgb(0 0 0 / 18%); }
.cdg-dialog::backdrop { background: rgb(0 0 0 / 45%); }
.cdg-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cdg-dialog-head h2 { font-size: 20px; }
.cdg-dialog > p:not(.cdg-links) { margin-top: 10px; }
#cdg-root .cdg-button-close { flex: 0 0 44px; width: 44px; padding: 0; border: 0 !important; background: transparent !important; color: var(--cdg-text) !important; font-size: 26px; font-weight: 400; }
#cdg-root .cdg-button-close:hover { filter: brightness(.85); }
.cdg-category { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 72px; padding: 13px 0; border-bottom: 1px solid var(--cdg-border); color: var(--cdg-text); font-size: 14px; line-height: 1.4; letter-spacing: normal; }
.cdg-category strong, .cdg-category small { display: block; font-family: inherit; letter-spacing: normal; }
.cdg-category strong { font-size: 14px; font-weight: 600; }
.cdg-category small { margin-top: 3px; opacity: .8; font-size: 12px; }
.cdg-category-status { flex: 0 0 82px; font-size: 12px; text-align: right; }
.cdg-category input[type="checkbox"] { flex: 0 0 22px; width: 22px; height: 22px; margin: 0; position: static; border: revert; border-radius: revert; background: revert; box-shadow: none; -webkit-appearance: auto; appearance: auto; accent-color: var(--cdg-accent); vertical-align: middle; cursor: pointer; }
#cdg-root .cdg-category input[type="checkbox"]::before, #cdg-root .cdg-category input[type="checkbox"]::after { display: none !important; content: none !important; }
.cdg-dialog .cdg-links { margin-top: 13px; }
.cdg-dialog .cdg-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 18px; }
#cdg-root .cdg-button-save { grid-column: 1 / -1; background: var(--cdg-primary-bg) !important; color: var(--cdg-primary-text) !important; }
#cdg-root .cdg-button-save:hover { filter: brightness(.88); }
.cdg-visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.cdg-template-card .cdg-banner { right: 18px; bottom: 18px; left: auto; width: min(500px, calc(100vw - 36px)); max-height: 80vh; border: 1px solid var(--cdg-border); border-radius: var(--cdg-radius); box-shadow: 0 12px 36px rgb(0 0 0 / 18%); }
.cdg-template-card .cdg-banner-inner, .cdg-template-dialog .cdg-banner-inner { display: block; padding: 20px; }
.cdg-template-card .cdg-banner .cdg-actions, .cdg-template-dialog .cdg-banner .cdg-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 14px; }
.cdg-template-card .cdg-banner .cdg-button-plain, .cdg-template-dialog .cdg-banner .cdg-button-plain { grid-column: 1 / -1; }
.cdg-template-dialog .cdg-banner { right: auto; bottom: auto; left: 50%; top: 50%; width: min(480px, calc(100vw - 28px)); max-height: 80vh; transform: translate(-50%, -50%); border: 1px solid var(--cdg-border); border-radius: var(--cdg-radius); box-shadow: 0 18px 48px rgb(0 0 0 / 25%); }
.cdg-density-comfortable .cdg-banner-inner { padding: 24px 30px; }
.cdg-density-comfortable .cdg-actions { gap: 12px; }
.cdg-density-comfortable .cdg-button { padding-left: 20px; padding-right: 20px; }
@media (max-width: 850px) {
  .cdg-template-bar .cdg-banner-inner { display: block; padding: 15px 16px max(15px, env(safe-area-inset-bottom)); }
  .cdg-template-bar .cdg-banner-text { max-width: none; }
  .cdg-template-bar .cdg-banner .cdg-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 10px; }
  .cdg-template-bar .cdg-banner .cdg-button-plain { grid-column: 1 / -1; }
}
@media (max-width: 480px) { .cdg-root h2 { font-size: 17px; } .cdg-dialog { padding: 18px; } .cdg-dialog-head h2 { font-size: 19px; } .cdg-category { gap: 10px; } }
