/* Own only the scene modal exterior. The cross-origin Ko-fi UI remains unmodified. */
.shrine-support,
.shrine-support *,
.shrine-support *::before,
.shrine-support *::after { box-sizing: border-box; }

.shrine-support {
  --support-ink: #f3e8ee;
  --support-muted: #c2b1bc;
  --support-accent: #e0a0c0;
  --support-line: #6e4c61;
  position: fixed;
  inset: 0;
  display: none;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(520px, calc(100vw - 32px));
  height: min(920px, calc(100vh - 32px));
  height: min(920px, calc(100dvh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom))));
  max-width: none;
  max-height: none;
  min-width: 0;
  min-height: 0;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #9e6c86;
  border-radius: 16px;
  background: #241a22;
  color: var(--support-ink);
  color-scheme: dark;
  font: 400 16px/1.45 "Inconsolata", "Consolas", "Microsoft YaHei", monospace;
  letter-spacing: normal;
  text-align: left;
  box-shadow: 0 18px 72px #170d1d4d;
  overscroll-behavior: contain;
  -webkit-text-size-adjust: 100%;
}
.shrine-support[open] { display: grid; animation: shrine-support-arrive 140ms ease-out both; }
.shrine-support::backdrop { background: rgb(17 9 23 / .38); }
.shrine-support__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--support-line);
}
.shrine-support__copy { min-width: 0; }
.shrine-support__title { margin: 0; font: 600 24px/1.15 "Inconsolata", "Consolas", monospace; overflow-wrap: anywhere; }
.shrine-support__description { margin: 12px 0 0; color: var(--support-muted); font-size: 15px; line-height: 1.35; }
.shrine-support__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  margin: 0;
  padding: 8px;
  appearance: none;
  border: 1px solid #9e6c86;
  border-radius: 9px;
  background: #3a2835;
  color: var(--support-ink);
  font: inherit;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.shrine-support__close:hover { background: #4a3141; border-color: var(--support-accent); }
.shrine-support__close:active { background: #58364a; }
.shrine-support :is(button, a):focus-visible { outline: 3px solid var(--support-accent); outline-offset: 3px; }
.shrine-support__scroll {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: #c5a5b6 #fbf7f9;
  background: #f9f9f9;
}
.shrine-support__frame-host { min-height: 100%; }
.shrine-support__frame {
  display: block;
  width: 100%;
  height: 712px;
  margin: 0;
  padding: 4px;
  border: 0;
  background: #f9f9f9;
  color-scheme: light;
}
.shrine-support__footer { padding: 12px 22px 14px; border-top: 1px solid var(--support-line); }
.shrine-support__status { min-height: 2.6em; margin: 0 0 4px; color: var(--support-muted); font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; }
.shrine-support__external {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
  color: var(--support-accent);
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
  touch-action: manipulation;
}
.shrine-support__external:hover { color: #7d174b; }
@keyframes shrine-support-arrive { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 480px) {
  .shrine-support {
    width: calc(100vw - max(12px, env(safe-area-inset-left)) - max(12px, env(safe-area-inset-right)));
    height: calc(100vh - 24px);
    height: calc(100dvh - max(12px, env(safe-area-inset-top)) - max(12px, env(safe-area-inset-bottom)));
    border-radius: 12px;
  }
  .shrine-support__header { gap: 10px; padding: 16px 14px 14px; }
  .shrine-support__title { font-size: 21px; }
  .shrine-support__description { font-size: 14px; margin-top: 10px; }
  .shrine-support__close { min-width: 48px; padding-inline: 8px; }
  .shrine-support__footer { padding: 10px 14px; }
}
@media (max-height: 480px) {
  .shrine-support__header { padding-block: 10px; }
  .shrine-support__title { font-size: 20px; }
  .shrine-support__description { margin-top: 5px; font-size: 13px; }
  .shrine-support__footer { padding-block: 6px; }
  .shrine-support__status { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .shrine-support[open] { animation: none; }
  .shrine-support, .shrine-support *, .shrine-support::backdrop { transition: none; scroll-behavior: auto; }
}
