dialog.textum-fn {
  position: fixed; inset: auto; margin: 0; box-sizing: border-box;
  width: min(390px, calc(100vw - 24px)); max-width: calc(100vw - 24px);
  max-height: min(420px, calc(100dvh - 24px)); padding: 8px 12px 22px;
  border: 1px solid #e9e7e3; border-radius: 4px;
  background: #fffefa; color: #302e2b;
  box-shadow: 0 3px 8px rgb(30 25 20 / 3%), 0 14px 40px rgb(30 25 20 / 8%);
  font-family: Georgia, 'Times New Roman', serif; font-size: 16px; line-height: 1.7;
  overflow: auto; overscroll-behavior: contain; text-align: left;
}
dialog.textum-fn::backdrop { background: rgb(0 0 0 / 3%); }
.textum-fn .textum-fn__header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-left: 12px; }
.textum-fn h2 { margin: 0; font: normal 14px/1 Georgia, 'Times New Roman', serif; color: #78716a; }
.textum-fn button, .textum-fn a.textum-fn__original {
  box-sizing: border-box; margin: 0; padding: 0; border: 0; border-radius: 3px;
  background: transparent; box-shadow: none; color: #78716a; text-decoration: none; cursor: pointer;
}
.textum-fn button { display: grid; place-items: center; width: 44px; height: 44px; }
.textum-fn button:hover, .textum-fn a.textum-fn__original:hover { color: #302e2b; background: #f2f0eb; }
.textum-fn .textum-fn__content { padding: 2px 12px 0; overflow-wrap: anywhere; }
.textum-fn .textum-fn__content a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.textum-fn .textum-fn__content a.textum-fn__original {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; margin-left: 3px; vertical-align: middle;
  color: #78716a; text-decoration: none;
}
.textum-fn :focus-visible { outline: 1px solid #78716a; outline-offset: 2px; }
@media (pointer: coarse) {
  .textum-fn .textum-fn__content a.textum-fn__original { width: 44px; height: 44px; }
}

dialog.textum-fn:focus { outline: none; }
