html[data-ludik-theme="comic"] #dialog[data-variant="hilo-proof"] {
  width: min(728px, calc(100% - 20px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: visible;
  color: var(--hilo-ink);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;

  &::backdrop { background: #170919d9; }

  & #dialog-content {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: clamp(8px, 2.2vw, 16px);
    max-height: calc(100dvh - 24px);
    padding: clamp(13px, 3.2vw, 28px);
  }

  & #dialog-content::before, & #dialog-content::after {
    position: absolute;
    z-index: -2;
    inset: 0 -2px -4px;
    content: "";
    clip-path: var(--hilo-edge);
    background: var(--hilo-ink);
    pointer-events: none;
  }

  & #dialog-content::after {
    z-index: -1;
    inset: 2px 0 0;
    background: var(--hilo-cream) var(--hilo-fiber) center / 360px auto repeat;
  }

  & .dialog-head {
    align-items: center;
    gap: clamp(7px, 2vw, 14px);
    margin: 0;
    padding: 0 3px 0 2px;
    border: 0;
    background: none;
  }

  & .dialog-head h2 {
    position: relative;
    isolation: isolate;
    min-width: 0;
    margin: 0 auto 0 0;
    padding: .29em .48em .38em;
    color: var(--hilo-ink);
    font: italic 900 clamp(1.17rem, 5vw, 2.45rem)/1.04 var(--hilo-display);
    overflow-wrap: normal;
  }

  & .dialog-head h2::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    content: "";
    border: 2px solid var(--hilo-ink);
    border-radius: 3px;
    background: var(--hilo-lemon) radial-gradient(#160e0926 .6px, transparent .95px) 0 0 / 4px 4px;
    box-shadow: 3px 4px var(--hilo-ink);
    transform: skewX(-5deg) rotate(-1deg);
  }

  & .dialog-head .icon-button {
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    min-height: 44px;
    padding: 0;
    color: var(--hilo-ink);
    border: 2px solid var(--hilo-ink);
    border-radius: 4px;
    background: var(--hilo-mint);
    box-shadow: 2px 3px var(--hilo-ink);
    font: 820 1.5rem/1 var(--font-interface);
  }

  & .hilo-proof-sheet {
    display: grid;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #56351c transparent;
    gap: clamp(11px, 2vw, 17px);
    padding: 3px 6px 5px 2px;
    color: var(--hilo-ink);
    font: 560 clamp(.82rem, 2.25vw, .975rem)/1.42 var(--font-interface);
  }

  & :is(.hilo-receipt-totals, .hilo-proof-cards, .hilo-receipt-verification) {
    min-width: 0;
    margin: 0;
    color: var(--hilo-ink);
    border: 2px solid var(--hilo-ink);
    border-radius: 4px;
    background: #fff9ec;
    box-shadow: 2px 3px var(--hilo-ink);
  }

  & .hilo-receipt-status {
    --receipt-status: #fff293;
    display: flex;
    gap: .35em 1em;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: .48em .8em .54em;
    border-block-end: 2px solid var(--hilo-ink);
    background: var(--receipt-status) radial-gradient(#160e092b .65px, transparent .98px) 0 0 / 5px 5px;
  }

  & [data-result="win"] .hilo-receipt-status { --receipt-status: var(--hilo-mint); }
  & [data-result="loss"] .hilo-receipt-status { --receipt-status: #ffbfd2; }
  & .hilo-receipt-status h3 {
    margin: 0;
    font: italic 900 clamp(1.45rem, 5vw, 2.7rem)/1 var(--hilo-display);
  }

  & .hilo-receipt-status time {
    font-weight: 730;
    font-variant-numeric: tabular-nums;
  }

  & .hilo-receipt-totals dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
  }

  & .hilo-receipt-totals dl div { min-width: 0; padding: .48em .61em .58em; }
  & .hilo-receipt-totals dl div + div { border-inline-start: 1px dashed #98795e; }
  & .hilo-receipt-totals dl div:last-child { background: #fff0ca; }
  & .hilo-receipt-totals dt { color: #563922; font-size: .86em; font-weight: 760; }
  & .hilo-receipt-totals dd {
    margin: 0;
    font-size: clamp(.86rem, 2.75vw, 1.45rem);
    font-weight: 860;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
  }

  & .hilo-receipt-totals[data-result="win"] dl div:last-child dd { color: #14502c; }
  & .hilo-receipt-totals[data-result="loss"] dl div:last-child dd { color: #8a1946; }

  & :is(.hilo-proof-cards, .hilo-receipt-verification) > h3 {
    margin: 0;
    padding: .37em .6em;
    color: var(--hilo-ink);
    border-block-end: 2px solid var(--hilo-ink);
    background: #ffdae9;
    font: italic 900 clamp(1.06rem, 3.7vw, 1.55rem)/1.12 var(--hilo-display);
  }

  & .hilo-proof-cards h3 {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .3em .65em;
  }

  & .hilo-proof-cards h3 small {
    font-size: 1em;
    font-variant-numeric: tabular-nums;
  }

  & .hilo-proof-cards ol { flex-wrap: wrap; gap: .5em; margin: 0; padding: clamp(8px, 2vw, 14px); }
  & .hilo-proof-cards li {
    min-inline-size: 1.72em;
    block-size: 1.82em;
    padding: .18em .22em;
    background: #fff3d9 var(--hilo-fiber) center / 240px auto;
    box-shadow: 1.5px 2px var(--hilo-ink);
  }

  & .hilo-proof-cards li:first-child { background-color: #fff3ba; background-blend-mode: multiply; }
  & [data-result="loss"] .hilo-proof-cards li:last-child { background-color: #ffdae9; background-blend-mode: multiply; }
  & .hilo-receipt-verification > h3 { background: var(--hilo-mint); }
  & .hilo-receipt-verify-body {
    display: grid;
    gap: .63em;
    padding: clamp(8px, 2vw, 14px);
  }

  & .hilo-receipt-copy {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: .45em .6em;
    min-width: 0;
    padding: .59em .65em;
    border: 1px solid #a58361;
    border-radius: 3px;
    background: #fff0d0;
  }

  & .hilo-receipt-copy > div { flex: 1 1 13em; min-width: 0; }
  & .hilo-receipt-copy span { display: block; font-size: .9em; font-weight: 800; }
  & .hilo-receipt-copy code {
    color: #4c311c;
    font: 590 .82em/1.4 var(--mono, monospace);
    overflow-wrap: anywhere;
  }

  & .hilo-proof-sheet .button {
    min-height: 44px;
    padding: .4em .65em;
    color: var(--hilo-ink);
    border: 2px solid var(--hilo-ink);
    border-radius: 3px;
    background: #fff8e8;
    box-shadow: 1.5px 2px var(--hilo-ink);
    font: 800 .9em/1.18 var(--font-interface);
    text-align: center;
    white-space: normal;
  }

  & .hilo-receipt-verify-actions { gap: .48em; margin: 0; }
  & .hilo-proof-sheet [data-action="verify-proof"] { background: var(--hilo-lemon); }
  & :is(.dialog-head .icon-button, .hilo-proof-sheet .button):hover { background: #ffccde; }
  & :is(button, summary) { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  & :is(button, summary):focus-visible { outline: 3px solid #86123f; outline-offset: 2px; }

  & .hilo-receipt-disclosure {
    min-width: 0;
    padding: .05em .55em;
    border: 1px solid #ad8d6d;
    border-radius: 3px;
    background: #fff9ee;
  }

  & .hilo-receipt-disclosure[open] { padding-bottom: .55em; }
  & .hilo-receipt-disclosure > summary {
    margin: 0;
    padding-block: .55em;
    color: var(--hilo-ink);
    font-weight: 790;
  }

  & .hilo-receipt-disclosure > :is(dl, ol, .hilo-receipt-copy) + :is(dl, ol, .hilo-receipt-copy) { margin-top: .55em; }
  & .hilo-receipt-note, & .hilo-receipt-meta, & .hilo-receipt-log, & .hilo-receipt-meta dd { margin: 0; }
  & .hilo-receipt-meta > div, & .hilo-receipt-log li {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: .2em .75em;
    padding: .38em .35em;
    border-block-end: 1px solid #cbb293;
  }

  & .hilo-receipt-meta > div:last-child, & .hilo-receipt-log li:last-child { border: 0; }
  & .hilo-receipt-meta dt { font-weight: 730; }
  & .hilo-receipt-meta dd, & .hilo-receipt-log time { color: #4c311c; text-align: end; }

  & .hilo-receipt-log { list-style: none; padding: 0; }
  & .hilo-receipt-disclosure pre {
    margin: 0;
    max-height: 20em;
    color: #422611;
    border: 1px solid #a58361;
    background: #fff1d5;
    font-size: .81em;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  & #proof-status.notice {
    margin: 0;
    color: #114622;
    border-color: #396746;
    background: #dcf8df;
  }

  & #proof-status.notice.error {
    color: #7f1539;
    border-color: #8a2349;
    background: #ffdfeb;
  }
}
