.tior-credit-dialog {
  box-sizing: border-box;
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 28px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line, #444);
  border-radius: 24px;
  background: var(--theme-workspace-surface, #111);
  color: var(--text, #f6f6f6);
  font-family: var(--font-ui, sans-serif);
  text-align: left;
  box-shadow: 0 24px 70px #0006;
  corner-shape: squircle;
}

.tior-credit-dialog::backdrop { background: rgb(0 0 0 / .52); backdrop-filter: blur(4px); }
html:has(.tior-credit-dialog[open]),
html:has(.tior-credit-dialog[open]) body { overflow: hidden !important; overscroll-behavior: none; }

.tior-credit-dialog .tior-credit-dialog__close {
  position: static;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line, #444);
  border-radius: var(--action-radius);
  background: transparent;
  color: inherit;
  font: 24px/1 var(--font-ui, sans-serif);
  cursor: pointer;
}

.tior-credit-dialog h2 { margin: 0; font-size: 24px; font-weight: 600; line-height: 1.25; letter-spacing: -.03em; }
.tior-credit-dialog p { margin: 16px 0 0; font-size: 15px; line-height: 1.6; word-break: keep-all; overflow-wrap: break-word; }
.tior-credit-dialog .tior-credit-dialog__note { margin-top: 12px; color: var(--muted, #aaa); font-size: 13px; }
.tior-credit-dialog__actions { display: flex; gap: 10px; margin-top: 28px; }
.tior-credit-dialog__actions > button,
.tior-credit-dialog__actions > a {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--line, #444);
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font: 600 14px/1.4 var(--font-ui, sans-serif);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.tior-credit-dialog__actions > a { border-color: transparent; background: var(--text, #f6f6f6); color: var(--theme-ink-inverse, #171717); }
.tior-credit-dialog :is(button, a):focus-visible { outline: 2px solid var(--text, #f6f6f6); outline-offset: 4px; }
.tior-credit-dialog :is(button, a):hover { opacity: .8; }

@media (max-width: 420px) {
  .tior-credit-dialog { padding: 28px; }
  .tior-credit-dialog h2 { font-size: 24px; }
  .tior-credit-dialog__actions { flex-direction: column-reverse; }
}

.tior-credit-dialog__header { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.tior-credit-dialog__header h2 { flex:1; min-width:0; }
.tior-credit-dialog__header .labs-dialog-close { flex:0 0 44px; }
.tior-credit-dialog__close svg { width:20px; height:20px; }
