.menu-btn.menu-tile.cm-thanks-menu {
  grid-column: 1 / -1;
  min-height: clamp(48px, 7.5vh, 60px);
  flex-direction: row;
  justify-content: center;
  gap: 10px;
  padding: 7px 12px 5px;
  font-size: clamp(13px, 1.9vh, 16px);
}

.menu-btn.cm-thanks-menu .ico {
  width: 22px;
  height: 22px;
  color: #f5cf78;
  font: 700 24px/1 Georgia, serif;
}

.cm-thanks-overlay {
  position: fixed;
  z-index: 10020;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 28px);
  overflow-y: auto;
  background: #1a0e07aa;
  backdrop-filter: blur(4px);
  pointer-events: auto;
  animation: cm-thanks-fade .24s ease-out;
  scrollbar-width: none;
}

.cm-thanks-overlay::-webkit-scrollbar,
.cm-thanks-panel::-webkit-scrollbar { display: none; }

.cm-thanks-panel {
  position: relative;
  width: min(860px, 94vw);
  max-height: min(86dvh, 760px);
  overflow-y: auto;
  padding: clamp(24px, 4vw, 38px) clamp(22px, 4vw, 42px) clamp(24px, 3vw, 32px);
  border: 9px solid #8a522b;
  outline: 2px solid #3a1f10;
  outline-offset: -1px;
  background: linear-gradient(180deg, #fffaf0, #f3dfbd);
  box-shadow: inset 0 0 0 3px #d9b77b, 0 18px 55px #000b;
  clip-path: polygon(16px 0, calc(100% - 16px) 0, 100% 16px, 100% calc(100% - 16px), calc(100% - 16px) 100%, 16px 100%, 0 calc(100% - 16px), 0 16px);
  color: #503019;
  scrollbar-width: none;
}

.cm-thanks-panel h2 {
  margin: 0;
  padding-inline-end: 52px;
  color: #6b351d;
  font: 800 clamp(25px, 4vw, 35px)/1.15 var(--xcv-font-display, Georgia, serif);
  text-shadow: 0 2px #fff8, 0 3px 5px #3a1f1033;
}

.cm-thanks-rule {
  width: min(460px, 80%);
  height: 3px;
  margin: 13px 0 24px;
  background: linear-gradient(90deg, transparent, #c3432d 25%, #e1b65d 75%, transparent);
}

.cm-thanks-message {
  margin: 0;
  color: #57361f;
  font: 700 clamp(16px, 2.1vw, 21px)/1.55 Georgia, "Times New Roman", serif;
  text-wrap: pretty;
}

.cm-thanks-divider {
  height: 1px;
  margin: clamp(16px, 2.6vw, 26px) 0;
  background: #cbb58f;
}

.cm-thanks-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 3px solid #3a1f10;
  border-radius: 0;
  background: linear-gradient(180deg, #a8693a, #6b3c1d);
  box-shadow: inset 0 2px #ffffff45, 0 3px #2e170a;
  color: #fff3dc;
  text-shadow: 0 2px #2a150a;
  font: 700 25px/1 var(--xcv-font-display, system-ui, sans-serif);
  cursor: pointer;
}

.cm-thanks-close:hover,
.cm-thanks-close:focus-visible,
.cm-thanks-done:hover,
.cm-thanks-done:focus-visible {
  filter: brightness(1.12);
  outline: 2px solid #d6452c;
  outline-offset: 2px;
}

.cm-thanks-done {
  display: block;
  min-height: 42px;
  margin: clamp(20px, 3vw, 28px) 0 0 auto;
  padding: 8px 24px 6px;
  border: 3px solid #3a1f10;
  background: linear-gradient(180deg, #a8693a, #6b3c1d);
  box-shadow: inset 0 2px #ffffff45, 0 3px #2e170a;
  color: #fff3dc;
  text-shadow: 0 2px #2a150a;
  font: 800 16px/1.2 var(--xcv-font-display, system-ui, sans-serif);
  cursor: pointer;
}

.cm-thanks-overlay[dir="rtl"] .cm-thanks-close { right: auto; left: 14px; }
.cm-thanks-overlay[dir="rtl"] .cm-thanks-done { margin: clamp(20px, 3vw, 28px) auto 0 0; }

@keyframes cm-thanks-fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 520px) {
  .cm-thanks-panel { width: 100%; max-height: 88dvh; padding: 24px 20px 22px; border-width: 6px; }
  .cm-thanks-rule { margin: 12px 0 18px; }
  .cm-thanks-close { top: 8px; right: 8px; width: 34px; height: 34px; font-size: 22px; }
  .cm-thanks-overlay[dir="rtl"] .cm-thanks-close { right: auto; left: 8px; }
}

@media (prefers-reduced-motion: reduce) { .cm-thanks-overlay { animation: none; } }
