:root {
  --primary-1: #405F90;
  --primary-2: #405F90;
  --primary-3: #AAC7FF;
  --primary-4: #D6E3FF;
  --primary-white: #FFFFFF;
  --primary-surface: #F9F9FF;
  --primary-surface-inverse: #F0F0F7;
  --primary-surface-inverse-transparent: #aac7ff63;
  --primary-black: black;
  --primary-red: #8D4A5B;
  --Extended-Colors-Crimson-Flame: #8D4A5B;
  --primary-green: #008000;
  --primary-blue: #405F90;
  --player-red: #7AACFF;
  --player-blue: #FF897D;
  --primary-text: var(--primary-black);
  --primary-light-text: var(--primary-white);
  --primary-text-disabled: lightgray;
  --red-90: #FFDAD6;
  --red-80: #FFB4AB;
  --red-70: #FF897D;
  --red-60: #FF5449;
}

.sme-util-scope {
  font-size: 16px;
  line-height: 1.5;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--primary-text, #000);
  box-sizing: border-box;
  isolation: isolate;
}
.sme-util-scope *,
.sme-util-scope *::before,
.sme-util-scope *::after {
  box-sizing: inherit;
}
.sme-util-scope button,
.sme-util-scope input,
.sme-util-scope select,
.sme-util-scope textarea {
  font: inherit;
}

.sme-image-upload-crop-tool {
  background: var(--primary-surface, #f9f9ff);
  color: var(--primary-text, #000);
  border: 1px solid var(--primary-surface-inverse, #f0f0f7);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(64, 95, 144, 0.12);
}
.sme-image-upload-crop-tool .tool-header h2 {
  margin: 0;
  font-size: 19.2px;
}
.sme-image-upload-crop-tool .tool-header p {
  margin: 6.4px 0 16px;
  color: var(--primary-blue, #405f90);
  font-size: 14.4px;
}
.sme-image-upload-crop-tool .tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.sme-image-upload-crop-tool .control-panel,
.sme-image-upload-crop-tool .preview-panel {
  background: var(--primary-white, #fff);
  border: 1px solid var(--primary-surface-inverse, #f0f0f7);
  border-radius: 12px;
  padding: 13.6px;
}
.sme-image-upload-crop-tool .file-label,
.sme-image-upload-crop-tool .zoom-label {
  font-size: 12.8px;
  font-weight: 600;
  display: block;
  margin-bottom: 6.4px;
}
.sme-image-upload-crop-tool input[type=file],
.sme-image-upload-crop-tool input[type=range] {
  width: 100%;
  margin-bottom: 14.4px;
}
.sme-image-upload-crop-tool .button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9.6px;
  margin-bottom: 12.8px;
}
.sme-image-upload-crop-tool button {
  border: none;
  border-radius: 10px;
  min-height: 44px;
  padding: 8.8px 14.4px;
  font-size: 14.4px;
  font-weight: 600;
  cursor: pointer;
  background: var(--primary-1, #405f90);
  color: var(--primary-white, #fff);
  transition: opacity 0.2s ease;
}
.sme-image-upload-crop-tool button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}
.sme-image-upload-crop-tool .status-chip {
  font-size: 12.8px;
  border-radius: 8px;
  padding: 7.2px 8.8px;
  margin-bottom: 9.6px;
}
.sme-image-upload-crop-tool .status-chip.success {
  background: var(--primary-surface-inverse-transparent, rgba(170, 199, 255, 0.39));
}
.sme-image-upload-crop-tool .status-chip.error {
  background: var(--red-90, #ffd6d6);
  color: var(--primary-red, #8d4a5b);
}
.sme-image-upload-crop-tool .status-chip.muted {
  background: var(--primary-surface-inverse, #f0f0f7);
}
.sme-image-upload-crop-tool .cropper-shell {
  position: relative;
  width: 100%;
  min-height: 280px;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
  touch-action: none;
}
.sme-image-upload-crop-tool .empty-preview {
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed var(--primary-surface-inverse, #f0f0f7);
  border-radius: 10px;
  color: #6d7380;
  padding: 16px;
}
.sme-image-upload-crop-tool .url-list {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.sme-image-upload-crop-tool .url-list a {
  color: var(--primary-1, #405f90);
  font-size: 13.6px;
  font-weight: 600;
}
.sme-image-upload-crop-tool .debug-block,
.sme-image-upload-crop-tool .debug-result pre {
  border-radius: 8px;
  background: #151a24;
  color: #dbecff;
  padding: 11.2px;
  font-size: 12.16px;
  overflow: auto;
  max-height: 170px;
}
.sme-image-upload-crop-tool .debug-result {
  margin-top: 12.8px;
}
.sme-image-upload-crop-tool .debug-result summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--primary-1, #405f90);
}
@media (min-width: 900px) {
  .sme-image-upload-crop-tool {
    padding: 20px;
  }
  .sme-image-upload-crop-tool .tool-grid {
    grid-template-columns: minmax(260px, 360px) minmax(420px, 1fr);
    align-items: start;
  }
  .sme-image-upload-crop-tool .cropper-shell {
    min-height: 360px;
  }
}

.sme-image-management-tool {
  width: min(100%, 1080px);
  margin: 0 auto;
  padding: 16px;
  border: 1px solid rgba(99, 129, 180, 0.25);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(46, 74, 119, 0.12);
}
.sme-image-management-tool .tool-header {
  margin-bottom: 16px;
}
.sme-image-management-tool .tool-header h2 {
  margin: 0 0 4px;
}
.sme-image-management-tool .tool-header p {
  margin: 0;
  color: #4b6286;
}
.sme-image-management-tool .tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  min-width: 0;
}
.sme-image-management-tool .control-panel,
.sme-image-management-tool .preview-panel {
  border: 1px solid rgba(99, 129, 180, 0.2);
  border-radius: 12px;
  padding: 12px;
  background: #f9fbff;
  min-width: 0;
}
.sme-image-management-tool label {
  display: block;
  margin-bottom: 6.4px;
  color: #355181;
  font-size: 12.48px;
  font-weight: 700;
}
.sme-image-management-tool select,
.sme-image-management-tool input,
.sme-image-management-tool button {
  width: 100%;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid #bfd1f1;
  padding: 7.2px 9.6px;
  font-size: 14.4px;
}
.sme-image-management-tool button {
  background: #405f90;
  color: #ffffff;
  font-weight: 700;
  border: none;
  cursor: pointer;
}
.sme-image-management-tool button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.sme-image-management-tool .pager-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 7.2px;
  margin: 11.2px 0;
}
.sme-image-management-tool .pager-row span {
  text-align: center;
  font-size: 13.12px;
  color: #3f5880;
  font-weight: 700;
}
.sme-image-management-tool .status-chip {
  border-radius: 10px;
  padding: 8px 10.4px;
  font-size: 12.8px;
  margin-bottom: 9.6px;
}
.sme-image-management-tool .status-chip.muted {
  background: #eaf1ff;
  color: #3d5785;
}
.sme-image-management-tool .status-chip.warning {
  background: #fff8e8;
  color: #7b5819;
  border: 1px solid #f5e2b4;
}
.sme-image-management-tool .status-chip.error {
  background: #ffeef2;
  color: #7f2f47;
  border: 1px solid #f0bfd0;
}
.sme-image-management-tool .image-list {
  display: grid;
  gap: 8.8px;
  max-height: 520px;
  overflow: auto;
  padding-right: 1.6px;
}
.sme-image-management-tool .list-placeholder {
  border: 1px dashed #bfd1f1;
  border-radius: 10px;
  padding: 12.8px;
  text-align: center;
  color: #4e668b;
  font-size: 13.12px;
}
.sme-image-management-tool .image-item {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 9.6px;
  align-items: center;
  padding: 7.2px;
  background: #ffffff;
  border: 1px solid #d5e1f9;
  border-radius: 10px;
}
.sme-image-management-tool .image-item.selected {
  border-color: #84a7e8;
  background: #edf4ff;
}
.sme-image-management-tool .image-item img {
  width: 70px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  background: #eff3ff;
}
.sme-image-management-tool .image-thumb-placeholder {
  width: 70px;
  height: 48px;
  border-radius: 8px;
  border: 1px dashed #bfd1f1;
  background: #f2f6ff;
  color: #5b7093;
  font-size: 10.24px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3.2px;
}
.sme-image-management-tool .image-meta {
  display: grid;
  gap: 1.92px;
  text-align: left;
  min-width: 0;
}
.sme-image-management-tool .image-meta strong {
  color: #2f4672;
  font-size: 13.44px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.sme-image-management-tool .image-meta span {
  color: #4f6589;
  font-size: 12px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.sme-image-management-tool .legacy-badge {
  justify-self: start;
  display: inline-block;
  padding: 1.6px 7.2px;
  border-radius: 999px;
  font-size: 10.88px;
  font-weight: 700;
  color: #6a4312;
  background: #ffe9c7;
  border: 1px solid #f2cc91;
}
.sme-image-management-tool .preview-header {
  display: flex;
  flex-direction: column;
  gap: 6.4px;
  margin-bottom: 8.8px;
  min-width: 0;
}
.sme-image-management-tool .preview-header h3 {
  margin: 0;
  color: #2d4672;
  font-size: 16px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.sme-image-management-tool .url-list {
  display: flex;
  gap: 10.4px;
  flex-wrap: wrap;
}
.sme-image-management-tool .url-list a {
  color: #335a96;
  font-size: 13.12px;
  font-weight: 700;
  text-decoration: none;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.sme-image-management-tool .url-list a:hover {
  text-decoration: underline;
}
.sme-image-management-tool .cropper-shell {
  position: relative;
  min-height: 280px;
  border-radius: 12px;
  overflow: hidden;
  background: #0c1018;
  margin-bottom: 9.6px;
}
.sme-image-management-tool .action-row {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.sme-image-management-tool .action-row .danger {
  background: #902846;
}
.sme-image-management-tool pre {
  margin: 10.4px 0 0;
  max-height: 180px;
  overflow: auto;
  border-radius: 10px;
  background: #101827;
  color: #dce8ff;
  padding: 9.6px;
  font-size: 12px;
}
.sme-image-management-tool .empty-preview {
  border: 1px dashed #bfd1f1;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  color: #52698f;
}
@media (min-width: 960px) {
  .sme-image-management-tool .tool-grid {
    grid-template-columns: minmax(310px, 360px) 1fr;
  }
  .sme-image-management-tool .action-row {
    grid-template-columns: 1fr 1fr;
  }
}

.sme-image-picker-tool {
  position: relative;
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(99, 129, 180, 0.22);
  border-radius: 14px;
  background: #ffffff;
}
.sme-image-picker-tool .tool-header {
  margin-bottom: 11.2px;
}
.sme-image-picker-tool .tool-header h3 {
  margin: 0 0 3.2px;
  color: #2f4874;
}
.sme-image-picker-tool .tool-header p {
  margin: 0;
  color: #546b90;
  font-size: 13.6px;
}
.sme-image-picker-tool .picker-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  min-width: 0;
}
.sme-image-picker-tool .control-panel,
.sme-image-picker-tool .list-panel {
  border: 1px solid rgba(99, 129, 180, 0.2);
  border-radius: 12px;
  background: #f9fbff;
  padding: 11.2px;
  min-width: 0;
}
.sme-image-picker-tool label {
  display: block;
  margin-bottom: 5.6px;
  color: #355181;
  font-size: 12.16px;
  font-weight: 700;
}
.sme-image-picker-tool select,
.sme-image-picker-tool input,
.sme-image-picker-tool button {
  width: 100%;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid #bfd1f1;
  padding: 7.2px 9.6px;
  font-size: 14.4px;
}
.sme-image-picker-tool button {
  border: none;
  cursor: pointer;
  background: #405f90;
  color: #fff;
  font-weight: 700;
}
.sme-image-picker-tool button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.sme-image-picker-tool .pager-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 7.2px;
  margin: 9.6px 0;
}
.sme-image-picker-tool .pager-row span {
  font-size: 12.8px;
  font-weight: 700;
  color: #3f5880;
  text-align: center;
}
.sme-image-picker-tool .status-chip {
  border-radius: 10px;
  padding: 8px 10.4px;
  font-size: 12.8px;
  margin: 7.2px 0;
}
.sme-image-picker-tool .status-chip.muted {
  background: #eaf1ff;
  color: #3d5785;
}
.sme-image-picker-tool .status-chip.warning {
  background: #fff8e8;
  color: #7b5819;
  border: 1px solid #f5e2b4;
}
.sme-image-picker-tool .status-chip.error {
  background: #ffeef2;
  color: #7f2f47;
  border: 1px solid #f0bfd0;
}
.sme-image-picker-tool .status-chip.success {
  background: #e7f7ef;
  color: #1d6e46;
  border: 1px solid #b8e7cd;
}
.sme-image-picker-tool .image-list {
  display: grid;
  gap: 8.8px;
  max-height: 320px;
  overflow: auto;
}
.sme-image-picker-tool {
  /* Fixed overlay so the dialog width follows the viewport, not a narrow parent column. */
}
.sme-image-picker-tool .upload-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(13, 22, 38, 0.5);
  padding: 12px;
  display: grid;
  align-items: center;
  justify-items: center;
  box-sizing: border-box;
  overflow: auto;
}
.sme-image-picker-tool .upload-modal-panel {
  width: min(92vw, 1120px);
  max-width: 1120px;
  max-height: 90vh;
  overflow: auto;
  border: 1px solid rgba(99, 129, 180, 0.2);
  border-radius: 12px;
  padding: 12px;
  background: #f9fbff;
  box-shadow: 0 16px 34px rgba(21, 35, 58, 0.24);
  min-width: 0;
}
@media (min-width: 960px) {
  .sme-image-picker-tool .upload-modal-panel {
    padding: 16px;
  }
  .sme-image-picker-tool .upload-tool-shell {
    padding: 10.4px;
  }
}
.sme-image-picker-tool .upload-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 9.6px;
  margin-bottom: 8px;
}
.sme-image-picker-tool .upload-modal-header h3 {
  margin: 0;
  color: #2f4874;
  font-size: 16px;
}
.sme-image-picker-tool .upload-modal-header button {
  width: auto;
  min-width: 90px;
  padding: 0 12.8px;
  background: #637ba8;
}
.sme-image-picker-tool .upload-tool-shell {
  margin: 0;
  border: 1px solid #d5e1f9;
  border-radius: 10px;
  background: #ffffff;
  padding: 7.2px;
}
.sme-image-picker-tool .list-placeholder {
  border: 1px dashed #bfd1f1;
  border-radius: 10px;
  padding: 12.8px;
  text-align: center;
  color: #4e668b;
  font-size: 13.12px;
}
.sme-image-picker-tool .infinite-scroll-sentinel {
  width: 100%;
  height: 1px;
}
.sme-image-picker-tool .image-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9.6px;
  padding: 7.2px;
  background: #fff;
  border: 1px solid #d5e1f9;
  border-radius: 10px;
  width: 100%;
  box-sizing: border-box;
}
.sme-image-picker-tool .image-item--preview-only {
  padding: 8px;
}
.sme-image-picker-tool .image-item--preview-only img,
.sme-image-picker-tool .image-item--preview-only .image-thumb-placeholder {
  width: 120px;
  height: 68px;
}
.sme-image-picker-tool .image-item.selected {
  border-color: #84a7e8;
  background: #edf4ff;
}
.sme-image-picker-tool .image-item img {
  display: block;
  flex: 0 0 auto;
  width: 96px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  background: #eff3ff;
}
.sme-image-picker-tool .image-thumb-placeholder {
  flex: 0 0 auto;
  width: 96px;
  height: 54px;
  border-radius: 8px;
  border: 1px dashed #bfd1f1;
  background: #f2f6ff;
  color: #5b7093;
  font-size: 10.24px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3.2px;
}
.sme-image-picker-tool .image-meta {
  display: grid;
  gap: 1.92px;
  text-align: center;
  min-width: 0;
  flex: 0 1 auto;
}
.sme-image-picker-tool .image-meta span {
  color: #4f6589;
  font-size: 12px;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.sme-image-picker-tool .image-item--all-filter .image-meta {
  gap: 0;
}
.sme-image-picker-tool .image-meta-type-only {
  color: #2f4672;
  font-size: 13.76px;
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.sme-image-picker-tool .selection-summary {
  margin-top: 10.4px;
}
.sme-image-picker-tool .url-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9.6px;
  margin-top: 5.6px;
}
.sme-image-picker-tool .url-list a {
  color: #335a96;
  font-size: 12.8px;
  font-weight: 700;
  text-decoration: none;
}
.sme-image-picker-tool .url-list a:hover {
  text-decoration: underline;
}
.sme-image-picker-tool .confirm-button {
  margin-top: 8px;
}
@media (min-width: 960px) {
  .sme-image-picker-tool .image-list {
    max-height: 640px;
  }
  .sme-image-picker-tool .image-item img {
    width: 192px;
    height: 108px;
  }
  .sme-image-picker-tool .image-thumb-placeholder {
    width: 192px;
    height: 108px;
  }
  .sme-image-picker-tool .image-item--preview-only img,
  .sme-image-picker-tool .image-item--preview-only .image-thumb-placeholder {
    width: 240px;
    height: 136px;
  }
}

.sme-image-preview-tool .url-list.image-preview-trigger-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9.6px;
}
.sme-image-preview-tool .url-list.image-preview-trigger-list button {
  appearance: none;
  border: none;
  background: transparent;
  color: #335a96;
  font-size: 13.12px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  min-height: auto;
  width: auto;
}
.sme-image-preview-tool .url-list.image-preview-trigger-list button:hover {
  text-decoration: underline;
}
.sme-image-preview-tool .image-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  background: rgba(13, 22, 38, 0.5);
  padding: 12px;
  display: grid;
  align-items: center;
  justify-items: center;
  box-sizing: border-box;
  overflow: auto;
}
.sme-image-preview-tool .image-preview-modal {
  width: min(94vw, 1120px);
  max-height: 90vh;
  overflow: auto;
  border: 1px solid rgba(99, 129, 180, 0.2);
  border-radius: 12px;
  padding: 12px;
  background: #f9fbff;
  box-shadow: 0 16px 34px rgba(21, 35, 58, 0.24);
}
.sme-image-preview-tool .image-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9.6px;
  margin-bottom: 9.6px;
  flex-wrap: wrap;
}
.sme-image-preview-tool .image-preview-variant-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sme-image-preview-tool .image-preview-header button,
.sme-image-preview-tool .image-preview-controls button {
  border: none;
  border-radius: 10px;
  min-height: 40px;
  padding: 0 11.2px;
  background: #405f90;
  color: #ffffff;
  font-size: 13.12px;
  font-weight: 700;
  cursor: pointer;
  width: auto;
}
.sme-image-preview-tool .image-preview-variant-group button.active {
  background: #2b466f;
}
.sme-image-preview-tool .image-preview-viewer-shell {
  border: 1px solid #d5e1f9;
  border-radius: 10px;
  background: #ffffff;
  padding: 9.6px;
}
.sme-image-preview-tool .image-preview-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 9.6px;
}
.sme-image-preview-tool .image-preview-viewer {
  min-height: 320px;
  max-height: 68vh;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid #bfd1f1;
  background: #0f1624;
  display: grid;
  place-items: center;
  padding: 11.2px;
}
.sme-image-preview-tool .image-preview-viewer img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center;
  transition: transform 120ms ease;
  will-change: transform;
}

.swal2-container.sme-swal-container {
  z-index: 2147483647 !important;
}

.swal2-popup.sme-swal-popup {
  border: 1px solid var(--primary-3);
  border-radius: 0.75rem;
  background: var(--primary-surface);
  color: var(--primary-text);
  box-shadow: 0 16px 42px rgba(64, 95, 144, 0.24);
  font-size: 0.95rem;
}

.swal2-title.sme-swal-title {
  color: var(--primary-text);
  font-weight: 700;
}

.swal2-html-container.sme-swal-content {
  color: var(--primary-text);
}

.swal2-actions.sme-swal-actions {
  gap: 0.5rem;
}

.swal2-confirm.sme-swal-confirm,
.swal2-cancel.sme-swal-cancel {
  border: 0;
  border-radius: 0.5rem;
  padding: 0.45rem 0.9rem;
  font-weight: 600;
  line-height: 1.2;
}

.swal2-confirm.sme-swal-confirm {
  background: var(--primary-1);
  color: var(--primary-white);
}

.swal2-cancel.sme-swal-cancel {
  background: var(--primary-surface-inverse);
  color: var(--primary-text);
}

.swal2-confirm.sme-swal-confirm:hover {
  filter: brightness(1.05);
}

.swal2-cancel.sme-swal-cancel:hover {
  filter: brightness(0.98);
}

.swal2-toast.sme-swal-popup {
  border-width: 1px;
  border-radius: 0.6rem;
  background: var(--primary-white);
}

.sme-ad-management-tool {
  position: relative;
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 16px;
  border: 1px solid rgba(99, 129, 180, 0.25);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(46, 74, 119, 0.12);
}
.sme-ad-management-tool.editor-open {
  z-index: 12000;
  isolation: isolate;
}
.sme-ad-management-tool .tool-header {
  margin-bottom: 12.8px;
}
.sme-ad-management-tool .tool-header h2 {
  margin: 0 0 4px;
}
.sme-ad-management-tool .tool-header p {
  margin: 0;
  color: #4b6286;
}
.sme-ad-management-tool .tool-grid {
  display: grid;
  gap: 12.8px;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}
.sme-ad-management-tool .settings-panel,
.sme-ad-management-tool .items-panel,
.sme-ad-management-tool .editor-panel {
  border: 1px solid rgba(99, 129, 180, 0.2);
  border-radius: 12px;
  padding: 12px;
  background: #f9fbff;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}
.sme-ad-management-tool .settings-panel-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8.8px;
}
.sme-ad-management-tool .settings-panel-heading h3 {
  margin: 0;
  color: #2f4874;
}
.sme-ad-management-tool .settings-saving {
  flex-shrink: 0;
  font-size: 11.52px;
  color: #5a7399;
  font-weight: 600;
}
.sme-ad-management-tool .settings-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8.8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  align-items: stretch;
}
.sme-ad-management-tool .settings-control-slot {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}
.sme-ad-management-tool .settings-control-slot__label {
  flex: 0 0 auto;
  margin: 0 0 5.6px;
  padding: 0;
  line-height: 1.2;
  font-size: 12.48px;
  font-weight: 700;
  color: #355181;
  min-height: calc(12.48px * 1.2);
  display: flex;
  align-items: flex-end;
}
.sme-ad-management-tool .settings-control-slot__label--spacer {
  visibility: hidden;
  user-select: none;
}
.sme-ad-management-tool .settings-control-slot__body {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
}
.sme-ad-management-tool .settings-control-slot__body .settings-toggle {
  margin: 0;
}
.sme-ad-management-tool .settings-control-slot--display .settings-control-slot__body select {
  width: 100%;
  max-width: 100%;
}
.sme-ad-management-tool .settings-toggle {
  flex: 0 1 auto;
  min-width: min(100%, 176px);
}
.sme-ad-management-tool .settings-add-ad-btn {
  width: 100%;
  padding: 0 14.4px;
  white-space: nowrap;
}
.sme-ad-management-tool .copy-config-panel {
  margin-top: 10.4px;
  border: 1px solid #d1def6;
  border-radius: 10px;
  background: #ffffff;
  padding: 9.6px;
}
.sme-ad-management-tool .copy-config-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7.2px;
  margin-bottom: 7.2px;
}
.sme-ad-management-tool .copy-config-header h4 {
  margin: 0;
  color: #2f4874;
  font-size: 13.44px;
}
.sme-ad-management-tool .copy-config-loading {
  flex-shrink: 0;
  font-size: 11.52px;
  color: #5a7399;
  font-weight: 600;
}
.sme-ad-management-tool .copy-config-controls {
  display: grid;
  gap: 7.2px;
  grid-template-columns: minmax(0, 1fr);
}
.sme-ad-management-tool .copy-config-btn {
  width: 100%;
}
.sme-ad-management-tool .copy-config-hint {
  margin: 7.2px 0 0;
  color: #4f6589;
  font-size: 12.16px;
}
@media (min-width: 520px) {
  .sme-ad-management-tool .settings-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: flex-start;
  }
  .sme-ad-management-tool .settings-control-slot {
    flex: 0 1 auto;
    width: auto;
  }
  .sme-ad-management-tool .settings-control-slot--display {
    flex: 0 1 224px;
    max-width: 256px;
  }
  .sme-ad-management-tool .settings-toggle {
    min-width: 152px;
  }
  .sme-ad-management-tool .settings-control-slot--action {
    margin-left: auto;
  }
  .sme-ad-management-tool .settings-add-ad-btn {
    width: auto;
    min-width: 152px;
  }
}
@media (min-width: 960px) {
  .sme-ad-management-tool .settings-controls {
    flex-wrap: nowrap;
    justify-content: space-around;
  }
  .sme-ad-management-tool .settings-control-slot--display {
    flex: 0 1 240px;
    max-width: none;
  }
  .sme-ad-management-tool .settings-control-slot--action {
    margin-left: 0;
  }
}
@media (min-width: 780px) {
  .sme-ad-management-tool .copy-config-controls {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
  .sme-ad-management-tool .copy-config-btn {
    width: auto;
    min-width: 168px;
    white-space: nowrap;
  }
}
.sme-ad-management-tool h3 {
  margin: 0 0 8.8px;
  color: #2f4874;
}
.sme-ad-management-tool label {
  display: block;
  margin-bottom: 5.6px;
  color: #355181;
  font-size: 12.48px;
  font-weight: 700;
}
.sme-ad-management-tool select,
.sme-ad-management-tool input,
.sme-ad-management-tool button {
  width: 100%;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid #bfd1f1;
  padding: 7.2px 9.6px;
  font-size: 14.4px;
}
.sme-ad-management-tool button {
  border: none;
  cursor: pointer;
  background: #405f90;
  color: #fff;
  font-weight: 700;
}
.sme-ad-management-tool button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.sme-ad-management-tool .status-chip {
  border-radius: 10px;
  padding: 8px 10.4px;
  font-size: 12.8px;
  margin-bottom: 8.8px;
}
.sme-ad-management-tool .status-chip.muted {
  background: #eaf1ff;
  color: #3d5785;
}
.sme-ad-management-tool .status-chip.warning {
  background: #fff8e8;
  color: #7b5819;
  border: 1px solid #f5e2b4;
}
.sme-ad-management-tool .status-chip.error {
  background: #ffeef2;
  color: #7f2f47;
  border: 1px solid #f0bfd0;
}
.sme-ad-management-tool .status-chip.success {
  background: #e7f7ef;
  color: #1d6e46;
  border: 1px solid #b8e7cd;
}
.sme-ad-management-tool .toggle-label {
  display: flex;
  align-items: center;
  gap: 8.8px;
  margin: 7.2px 0;
  padding: 12.8px 9.92px;
  border: 1px solid #c2d4fb;
  border-radius: 10px;
  background: #f6f9ff;
  cursor: pointer;
  user-select: none;
}
.sme-ad-management-tool .toggle-label input {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  border-radius: 4px;
  accent-color: #405f90;
  flex: 0 0 auto;
}
.sme-ad-management-tool .toggle-label span {
  font-size: 12.8px;
  color: #345080;
}
.sme-ad-management-tool .settings-meta {
  margin-top: 9.6px;
  display: grid;
  gap: 4px;
  font-size: 12.48px;
  color: #476189;
}
.sme-ad-management-tool .items-header {
  margin-bottom: 7.2px;
}
.sme-ad-management-tool .items-header h3 {
  margin: 0;
}
.sme-ad-management-tool .items-list {
  display: grid;
  gap: 8.8px;
  max-height: 540px;
  overflow: auto;
}
.sme-ad-management-tool .list-placeholder {
  border: 1px dashed #bfd1f1;
  border-radius: 10px;
  padding: 12.8px;
  text-align: center;
  color: #4e668b;
  font-size: 13.12px;
}
.sme-ad-management-tool .ad-item-row {
  display: grid;
  gap: 9.6px;
  grid-template-columns: 80px minmax(0, 1fr);
  border: 1px solid #d5e1f9;
  border-radius: 10px;
  background: #ffffff;
  padding: 8px;
}
.sme-ad-management-tool .ad-item-row .thumb-cell img {
  width: 80px;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 8px;
  background: #edf3ff;
}
.sme-ad-management-tool .meta-cell {
  display: grid;
  gap: 2.4px;
  align-content: start;
  min-width: 0;
}
.sme-ad-management-tool .meta-cell strong {
  color: #2f4672;
  font-size: 13.44px;
  overflow-wrap: break-word;
  word-break: normal;
}
.sme-ad-management-tool .meta-cell span {
  color: #4f6589;
  font-size: 12.16px;
  overflow-wrap: break-word;
  word-break: normal;
}
.sme-ad-management-tool .meta-cell .url-text {
  word-break: break-all;
}
.sme-ad-management-tool .actions-cell {
  grid-column: 1/-1;
  display: grid;
  gap: 7.2px;
  align-content: start;
}
.sme-ad-management-tool .ad-item-enabled-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 7.2px;
  min-width: 0;
}
.sme-ad-management-tool .ad-item-meta-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8.8px;
  margin-left: auto;
  min-width: 0;
  text-align: right;
}
.sme-ad-management-tool .ad-item-meta-inline span {
  color: #4f6589;
  font-size: 12.16px;
  white-space: nowrap;
}
.sme-ad-management-tool .toggle-label.inline {
  margin: 0;
  padding: 7.2px 8.8px;
  flex-shrink: 0;
}
.sme-ad-management-tool .ad-item-pair-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6.4px;
}
.sme-ad-management-tool .ad-item-reorder-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5.6px;
}
.sme-ad-management-tool .ad-item-reorder-icon {
  width: 16px;
  height: 16px;
  display: block;
}
.sme-ad-management-tool .actions-cell .danger {
  background: #902846;
}
.sme-ad-management-tool .editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(13, 22, 38, 0.5);
  padding: 12px;
  display: grid;
  align-items: center;
  justify-items: center;
  box-sizing: border-box;
  overflow: auto;
}
.sme-ad-management-tool .editor-panel {
  width: min(92vw, 1120px);
  max-width: 1120px;
  max-height: 90vh;
  margin-top: 0;
  overflow: auto;
  box-shadow: 0 16px 34px rgba(21, 35, 58, 0.24);
}
.sme-ad-management-tool .editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 9.6px;
  margin-bottom: 8px;
}
.sme-ad-management-tool .editor-header button {
  width: auto;
  min-width: 90px;
  padding: 0 12.8px;
  background: #637ba8;
}
.sme-ad-management-tool .editor-grid {
  display: grid;
  gap: 11.2px;
  grid-template-columns: 1fr;
  min-width: 0;
}
.sme-ad-management-tool .editor-grid--single {
  grid-template-columns: 1fr;
}
.sme-ad-management-tool .club-logo-badge {
  display: inline-block;
  width: fit-content;
  padding: 1.92px 7.2px;
  border-radius: 999px;
  font-size: 10.88px;
  font-weight: 700;
  color: #5a3d10;
  background: #fff3d6;
  border: 1px solid #e8c97a;
  margin-bottom: 2.4px;
}
.sme-ad-management-tool .ad-item-row--club-logo {
  border-color: #e8c97a;
  background: #fffdf8;
}
.sme-ad-management-tool .editor-fields {
  border: 1px solid #d2def8;
  border-radius: 10px;
  background: #ffffff;
  padding: 10.4px;
  min-width: 0;
}
.sme-ad-management-tool .selected-image-preview {
  border: 1px solid #d2def8;
  border-radius: 10px;
  background: #f9fbff;
  padding: 8px;
  margin-bottom: 9.6px;
  display: grid;
  gap: 7.2px;
  min-width: 0;
}
.sme-ad-management-tool .selected-image-preview img {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 8px;
  background: #edf3ff;
}
.sme-ad-management-tool .selected-image-meta {
  display: grid;
  gap: 2.4px;
  min-width: 0;
}
.sme-ad-management-tool .selected-image-meta strong {
  font-size: 13.12px;
  color: #2f4672;
}
.sme-ad-management-tool .selected-image-meta span {
  font-size: 11.84px;
  color: #4f6589;
}
.sme-ad-management-tool .selected-image-empty {
  font-size: 12.48px;
  color: #476189;
}
.sme-ad-management-tool .editor-picker {
  border: 1px solid #d2def8;
  border-radius: 10px;
  background: #ffffff;
  padding: 10.4px;
  min-width: 0;
}
@media (min-width: 980px) {
  .sme-ad-management-tool .ad-item-row {
    grid-template-columns: minmax(210px, 280px) minmax(260px, 1fr);
    grid-template-rows: auto auto;
    align-items: start;
  }
  .sme-ad-management-tool .ad-item-row .thumb-cell {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
  }
  .sme-ad-management-tool .ad-item-row .thumb-cell img {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16/9;
    height: auto;
  }
  .sme-ad-management-tool .meta-cell {
    grid-column: 1;
    grid-row: 2;
    margin-top: 3.2px;
  }
  .sme-ad-management-tool .actions-cell {
    grid-column: 2;
    grid-row: 1/span 2;
  }
  .sme-ad-management-tool .editor-grid {
    grid-template-columns: minmax(260px, 320px) 1fr;
  }
  .sme-ad-management-tool .editor-grid--single {
    grid-template-columns: 1fr;
  }
}

.sme-ad-display-tool {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16/9;
  background: var(--sme-surface-muted, #f4f4f5);
  overflow: hidden;
  border-radius: 6px;
}
.sme-ad-display-tool__inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sme-ad-display-tool__link {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
}
.sme-ad-display-tool__link:focus-visible {
  box-shadow: inset 0 0 0 2px var(--sme-focus, #2563eb);
}
.sme-ad-display-tool__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  vertical-align: middle;
}

.sme-manage-club-image-tool {
  position: relative;
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(99, 129, 180, 0.22);
  border-radius: 14px;
  background: #ffffff;
}
.sme-manage-club-image-tool .tool-header {
  margin-bottom: 11.2px;
}
.sme-manage-club-image-tool .tool-header h3 {
  margin: 0 0 3.2px;
  color: #2f4874;
}
.sme-manage-club-image-tool .tool-header p {
  margin: 0;
  color: #546b90;
  font-size: 13.6px;
}
.sme-manage-club-image-tool .club-image-body {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.sme-manage-club-image-tool .club-image-preview-panel {
  border: 1px solid rgba(99, 129, 180, 0.2);
  border-radius: 12px;
  background: #f9fbff;
  padding: 11.2px;
  min-width: 0;
}
.sme-manage-club-image-tool .club-image-preview-frame {
  width: 100%;
  max-width: min(100%, 480px);
  aspect-ratio: 16/9;
  border-radius: 10px;
  overflow: hidden;
  background: #eff3ff;
  border: 1px solid #d5e1f9;
}
.sme-manage-club-image-tool .club-image-preview-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.sme-manage-club-image-tool .club-image-thumb-placeholder,
.sme-manage-club-image-tool .club-image-placeholder {
  border-radius: 10px;
  border: 1px dashed #bfd1f1;
  background: #f2f6ff;
  color: #5b7093;
  font-size: 13.12px;
  padding: 16px;
  text-align: center;
}
.sme-manage-club-image-tool .club-image-thumb-placeholder {
  min-height: 80px;
  display: grid;
  place-items: center;
}
.sme-manage-club-image-tool .club-image-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.sme-manage-club-image-tool .club-image-actions button {
  width: 100%;
  max-width: 320px;
  min-height: 44px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: #405f90;
  color: #fff;
  font-weight: 700;
  font-size: 14.4px;
  padding: 7.2px 9.6px;
}
.sme-manage-club-image-tool .club-image-actions button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.sme-manage-club-image-tool .status-chip {
  border-radius: 10px;
  padding: 8px 10.4px;
  font-size: 12.8px;
  margin: 5.6px 0;
}
.sme-manage-club-image-tool .status-chip.muted {
  background: #eaf1ff;
  color: #3d5785;
}
.sme-manage-club-image-tool .status-chip.warning {
  background: #fff8e8;
  color: #7b5819;
  border: 1px solid #f5e2b4;
}
.sme-manage-club-image-tool .status-chip.error {
  background: #ffeef2;
  color: #7f2f47;
  border: 1px solid #f0bfd0;
}
.sme-manage-club-image-tool .url-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9.6px;
  margin-top: 8px;
}
.sme-manage-club-image-tool .url-list a {
  color: #335a96;
  font-size: 12.8px;
  font-weight: 700;
  text-decoration: none;
}
.sme-manage-club-image-tool .url-list a:hover {
  text-decoration: underline;
}
.sme-manage-club-image-tool {
  /* Fixed overlay so the dialog width follows the viewport, not a narrow parent column. */
}
.sme-manage-club-image-tool .upload-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(13, 22, 38, 0.5);
  padding: 12px;
  display: grid;
  align-items: center;
  justify-items: center;
  box-sizing: border-box;
  overflow: auto;
}
.sme-manage-club-image-tool .upload-modal-panel {
  width: min(92vw, 1120px);
  max-width: 1120px;
  max-height: 90vh;
  overflow: auto;
  border: 1px solid rgba(99, 129, 180, 0.2);
  border-radius: 12px;
  padding: 12px;
  background: #f9fbff;
  box-shadow: 0 16px 34px rgba(21, 35, 58, 0.24);
  min-width: 0;
}
@media (min-width: 960px) {
  .sme-manage-club-image-tool .upload-modal-panel {
    padding: 16px;
  }
  .sme-manage-club-image-tool .upload-tool-shell {
    padding: 10.4px;
  }
}
.sme-manage-club-image-tool .upload-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 9.6px;
  margin-bottom: 8px;
}
.sme-manage-club-image-tool .upload-modal-header h3 {
  margin: 0;
  color: #2f4874;
  font-size: 16px;
}
.sme-manage-club-image-tool .upload-modal-header button {
  width: auto;
  min-width: 90px;
  padding: 0 12.8px;
  min-height: 44px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  background: #637ba8;
  color: #fff;
  font-weight: 700;
}
.sme-manage-club-image-tool .upload-tool-shell {
  margin: 0;
  border: 1px solid #d5e1f9;
  border-radius: 10px;
  background: #ffffff;
  padding: 7.2px;
}
