#cbp-bensho-shell { margin: 16px auto 32px; max-width: 1104px; }
#cbp-bensho-shell .cbp-bensho-frame { display: block; border: 1px solid #d9cbb5; border-radius: 5px; width: 100%; height: 1350px; background: #fffaf0; }
#cbp-bensho-shell .cbp-bensho-back { font-size: 13px; line-height: 1.9; margin: 17px 0 0; }
html.cbp-bensho-modal-open { overflow: hidden; }

/* Only this tool's parent dialog is styled; the site's theme stays unchanged. */
.cbp-bensho-dialog { position: fixed; inset: 0; margin: auto; box-sizing: border-box; border: 1.5px solid #3d3027; border-radius: 6px; padding: 0; width: calc(100% - 32px); max-width: 660px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; color: #3d3027; background: #fffaf0; box-shadow: 5px 6px 0 #3d30272b; font: 16px/1.85 "BIZ UDPGothic", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif; text-align: left; }
.cbp-bensho-dialog * { box-sizing: border-box; }
.cbp-bensho-dialog::backdrop { background: #34251a88; }
.cbp-bensho-dialog .dialog-inner { padding: 0 28px 28px; }
.cbp-bensho-dialog .dialog-heading { position: sticky; top: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 23px 0 17px; background: #fffaf0; z-index: 1; }
.cbp-bensho-dialog h2 { font-family: inherit; font-size: 23px; font-weight: 700; line-height: 1.6; color: inherit; margin: 0; }
.cbp-bensho-dialog .icon-button { border: 1px solid #d9cbb5; background: #fffdf8; border-radius: 3px; width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; font-family: inherit; font-size: 27px; line-height: 1; color: #3d3027; cursor: pointer; padding: 0; }
.cbp-bensho-dialog p { font-size: 15px; line-height: 2; color: #6e6052; margin: 14px 0 0; }
.cbp-bensho-dialog a { color: #69462f; text-decoration: underline; text-underline-offset: 4px; overflow-wrap: anywhere; }
.cbp-bensho-dialog .text-link { display: inline-block; font-size: 14px; margin-top: 16px; }
.cbp-bensho-dialog .dialog-note { border-left: 3px solid #bca27c; padding: 10px 16px; background: #f3e8d4; }
.cbp-bensho-dialog .dialog-buttons { display: flex; justify-content: flex-end; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.cbp-bensho-dialog .dialog-buttons button { border: 1.5px solid #3d3027; border-radius: 4px; padding: 12px 22px; min-height: 50px; font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1.6; cursor: pointer; }
.cbp-bensho-dialog .primary-button { color: #fffdf8; background: #69462f; box-shadow: 3px 3px 0 #3d3027; }
.cbp-bensho-dialog .primary-button:hover { background: #513322; }
.cbp-bensho-dialog .secondary-button { color: #69462f; background: #fffdf8; }
.cbp-bensho-dialog .secondary-button:hover { background: #f1e6d3; }
.cbp-bensho-dialog button:focus-visible, .cbp-bensho-dialog a:focus-visible { outline: 3px solid #9e452e; outline-offset: 5px; }
.cbp-bensho-dialog .about-families { margin: 20px 0; }
.cbp-bensho-dialog .about-families article { display: flex; align-items: center; gap: 20px; border-bottom: 1px solid #d9cbb5; padding: 16px 0; }
.cbp-bensho-dialog .about-families article > span { font: 700 28px "Yu Mincho", "Hiragino Mincho ProN", serif; min-width: 40px; text-align: center; flex-shrink: 0; }
.cbp-bensho-dialog h3 { font-family: inherit; font-size: 16px; font-weight: 700; line-height: 1.6; margin: 0; color: inherit; }
.cbp-bensho-dialog .about-families p { font-size: 14px; margin-top: 3px; }

@media (max-width: 650px) {
  #cbp-bensho-shell { margin-top: 10px; }
  #cbp-bensho-shell .cbp-bensho-frame { height: 1700px; border-radius: 3px; }
  .cbp-bensho-dialog .dialog-inner { padding: 0 20px 22px; }
  .cbp-bensho-dialog .dialog-heading { gap: 14px; padding-top: 19px; }
  .cbp-bensho-dialog h2 { font-size: 21px; }
  .cbp-bensho-dialog p { font-size: 14px; }
  .cbp-bensho-dialog .dialog-buttons { gap: 12px; }
  .cbp-bensho-dialog .dialog-buttons button { font-size: 13px; padding-inline: 15px; }
  .cbp-bensho-dialog .about-families article { gap: 14px; }
  .cbp-bensho-dialog .about-families h3 { font-size: 15px; }
}
@media print {
  #cbp-bensho-shell .cbp-bensho-back, .cbp-bensho-dialog { display: none !important; }
  #cbp-bensho-shell .cbp-bensho-frame { border: 0; }
}
