html.splay-open { overflow: hidden; }
.splay-dialog {
  --splay-ink: #23483e;
  --splay-paper: #f6f3e9;
  --splay-muted: #707a70;
  --splay-rule: #d9dbce;
  --splay-accent: #a74b3c;
  width: min(640px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  color: var(--splay-ink);
  background: #faf9f5;
  border: 1px solid #e4e4da;
  border-radius: 5px;
  box-shadow: 0 28px 110px #102b2540;
  font-family: "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif;
  line-height: 1.7;
  overflow: hidden;
  overscroll-behavior: contain;
}
.splay-dialog::backdrop { background: #0d2824a8; backdrop-filter: blur(5px); }
.splay-dialog[open] { animation: splay-enter 220ms ease-out; }
.splay-dialog *, .splay-dialog *::before, .splay-dialog *::after { box-sizing: border-box; }
.splay-dialog p, .splay-dialog h2 { margin: 0; }
.splay-dialog button, .splay-dialog input { font: inherit; }
.splay-dialog button, .splay-dialog a { -webkit-tap-highlight-color: transparent; }
.splay-dialog button { cursor: pointer; }
.splay-dialog button:disabled { cursor: wait; opacity: .58; }
.splay-dialog :focus-visible { outline: 2px solid var(--splay-accent); outline-offset: 5px; }
.splay-dialog h2:focus { outline: none; }
.splay-panel { display: flex; flex-direction: column; max-height: calc(100dvh - 50px); }
.splay-header { display: flex; align-items: center; justify-content: space-between; min-height: 67px; padding: 10px 28px; border-bottom: 1px solid var(--splay-rule); flex: 0 0 auto; }
.splay-brand { font-size: 11px; font-weight: 650; letter-spacing: .23em; }
.splay-close { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; background: transparent; border: 0; color: var(--splay-ink); font: 300 29px/1 sans-serif !important; border-radius: 50%; transition: background 160ms ease; }
.splay-close:hover { background: #e8eae1; }
.splay-main { padding: 29px 40px 33px; overflow-y: auto; scrollbar-width: thin; overscroll-behavior: contain; }
.splay-progress { display: flex; gap: 7px; margin-bottom: 30px; }
.splay-progress-segment { height: 2px; flex: 1; background: #dedfd5; }
.splay-progress-segment.is-filled { background: var(--splay-ink); }
.splay-eyebrow { color: var(--splay-muted); font-size: 11px; letter-spacing: .1em; margin-bottom: 15px !important; }
.splay-heading { font-family: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(23px, 4vw, 30px); font-weight: 500; line-height: 1.65; letter-spacing: .025em; text-wrap: balance; }
.splay-heading-part { display: inline-block; max-width: 100%; vertical-align: top; overflow-wrap: anywhere; word-break: normal; }
.splay-description { margin-top: 11px !important; color: var(--splay-muted); font-size: 12px; }
.splay-choices { display: grid; gap: 11px; margin: 29px 0 25px; }
.splay-choice { display: flex; align-items: center; gap: 15px; width: 100%; min-height: 74px; padding: 15px 19px; text-align: left; border: 1px solid var(--splay-rule); background: #fffef9; color: var(--splay-ink); border-radius: 2px; transition: border-color 160ms ease, background 160ms ease, transform 160ms ease; }
.splay-choice:hover, .splay-choice.is-selected { background: #edf0e7; border-color: #789282; }
.splay-choice:hover { transform: translateX(2px); }
.splay-choice-number { font-family: Georgia, serif; font-size: 17px; color: #7e8c7d; }
.splay-choice-label { flex: 1; font-size: 13px; line-height: 1.8; }
.splay-choice-arrow { font-size: 15px; color: #7c8f7f; }
.splay-question-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.splay-text-button { padding: 7px 0; border: 0; background: none; color: var(--splay-ink); font-size: 11px !important; border-bottom: 1px solid #bac4b8; }
.splay-text-button:hover { color: var(--splay-accent); }
.splay-fineprint { font-size: 10px; color: var(--splay-muted); }
.splay-paper { position: relative; padding: 29px 29px 26px; background: var(--splay-paper); border: 1px solid #c7cbbb; text-align: center; box-shadow: inset 0 0 0 6px var(--splay-paper), inset 0 0 0 7px #dce0d1; }
.splay-paper-kicker { font-size: 10px; letter-spacing: .18em; color: var(--splay-muted); margin-bottom: 12px !important; }
.splay-paper .splay-heading { font-size: 21px; letter-spacing: .12em; }
.splay-score { font: 400 85px/1.25 Georgia, "Times New Roman", serif; letter-spacing: -.045em; padding-top: 7px; }
.splay-percent { font-size: 34px; letter-spacing: 0; margin-left: 7px; }
.splay-appoint { font-size: 10px; color: var(--splay-muted); margin-top: 10px !important; }
.splay-role { font-family: "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 23px; letter-spacing: .025em; line-height: 1.7; margin: 10px 0 24px !important; text-wrap: balance; }
.splay-result-message { padding-top: 20px; border-top: 1px solid #cdd2c4; font-size: 12px; line-height: 1.9; }
.splay-paper-footer { margin-top: 8px !important; color: var(--splay-muted); font-size: 10px; }
.splay-stamp { position: absolute; top: 82px; right: 25px; display: grid; place-items: center; width: 45px; height: 45px; padding: 3px; white-space: pre-line; font-family: "Yu Mincho", serif; font-size: 14px; font-weight: 600; line-height: 1.2; color: var(--splay-accent); border: 2px solid var(--splay-accent); outline: 1px solid var(--splay-accent); outline-offset: -5px; transform: rotate(-8deg); opacity: .84; }
.splay-save-form { display: grid; grid-template-columns: 1fr 1fr; column-gap: 10px; row-gap: 9px; margin-top: 23px; }
.splay-name-label { grid-column: 1 / -1; font-size: 11px; }
.splay-optional { color: var(--splay-muted); font-size: 10px; margin-left: 9px; }
.splay-name { width: 100%; min-width: 0; height: 47px; padding: 10px 12px; border: 1px solid #c8cfbf; border-radius: 2px; color: var(--splay-ink); background: #fffefb; font-size: 13px !important; }
.splay-name::placeholder { font-size: 10px; color: #8b9084; }
.splay-primary-button { min-height: 47px; padding: 10px 13px; border: 1px solid var(--splay-ink); border-radius: 2px; background: var(--splay-ink); color: #fffef7; font-size: 12px !important; letter-spacing: .02em; transition: background 160ms ease; }
.splay-primary-button:hover { background: #16372e; }
.splay-save-status { grid-column: 1 / -1; color: var(--splay-muted); font-size: 11px; }
.splay-save-status:empty { display: none; }
.splay-result-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 13px; margin-top: 17px; }
.splay-article-link { color: var(--splay-ink); text-decoration: none; font-size: 11px; }
.splay-article-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.splay-result-note { text-align: center; margin-top: 20px !important; font-size: 10px; color: var(--splay-muted); }
@keyframes splay-enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 480px) {
  .splay-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 24px); }
  .splay-panel { max-height: calc(100dvh - 26px); }
  .splay-header { min-height: 59px; padding: 8px 17px; }
  .splay-main { padding: 24px 19px; }
  .splay-progress { margin-bottom: 25px; }
  .splay-heading { font-size: 23px; }
  .splay-choices { margin: 23px 0; gap: 10px; }
  .splay-choice { min-height: 83px; padding: 13px 13px; gap: 10px; }
  .splay-choice-label { font-size: 12px; }
  .splay-choice-arrow { font-size: 13px; }
  .splay-question-footer { row-gap: 15px; }
  .splay-fineprint { width: 100%; }
  .splay-question-footer > span:empty { display: none; }
  .splay-paper { padding: 23px 16px 22px; }
  .splay-paper .splay-heading { font-size: 20px; }
  .splay-score { font-size: 78px; }
  .splay-role { font-size: 21px; margin-bottom: 19px !important; }
  .splay-stamp { top: 90px; right: 15px; width: 36px; height: 36px; font-size: 11px; }
  .splay-appoint { font-size: 9px; }
  .splay-result-message { font-size: 11px; }
  .splay-paper-footer { font-size: 9px; }
  .splay-save-form { grid-template-columns: 1fr; row-gap: 9px; margin-top: 19px; }
  .splay-name { font-size: 16px !important; }
  .splay-name::placeholder { font-size: 12px; }
  .splay-primary-button { font-size: 12px !important; }
  .splay-result-actions { gap: 10px; }
  .splay-result-actions .splay-text-button, .splay-article-link { font-size: 10px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .splay-dialog[open] { animation: none; }
  .splay-dialog *, .splay-dialog *::before, .splay-dialog *::after { transition: none !important; scroll-behavior: auto !important; }
  .splay-choice:hover { transform: none; }
}
