#ku-hint-sheet {
  width: min(960px, calc(100% - 28px));
  max-width: none;
  max-height: 90vh;
  max-height: 90dvh;
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 7px;
  box-shadow: 4px 5px 0 var(--ink);
}

#ku-hint-sheet[open] {
  display: flex;
  flex-direction: column;
}

#ku-hint-sheet::backdrop { background: #33291f99; }
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px 8px 16px;
  border-bottom: 1px solid #b9a888;
}
.sheet-head h2 { margin: 0; font-size: clamp(15px, 2vw, 23px); line-height: 1.3; }
.sheet-actions { display: flex; gap: 6px; }
.sheet-head button {
  min-height: 38px;
  padding: 4px 10px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: white;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
#ku-zoom-sheet[aria-pressed=true] { background: #ffe5a4; }
.sheet-body { min-height: 0; overflow: auto; overscroll-behavior: contain; }
#ku-sheet-view {
  width: 100%;
  max-height: 63vh;
  max-height: 63dvh;
  overflow: auto;
  background: white;
}
#ku-sheet-view:focus-visible { outline-offset: -3px; }
.sheet-canvas { width: 100%; padding: 12px; }
.sheet-canvas img { display: block; height: auto; width: 100%; margin-inline: auto; }
#ku-sheet-view:not(.sheet-enlarged) .sheet-canvas img { max-height: 58vh; max-height: 58dvh; object-fit: contain; }
#ku-sheet-view.sheet-enlarged { overscroll-behavior: contain; }
#ku-sheet-view.sheet-enlarged .sheet-canvas { width: max(180%, 940px); }
.sheet-transcript { padding: 0 16px; border-top: 1px solid #b9a888; }
.sheet-transcript summary { cursor: pointer; padding: 12px 0; font-size: 14px; font-weight: 750; }
#ku-sheet-index { display: grid; grid-template-columns: max-content 1fr; gap: 0 12px; margin: 0 0 12px; }
#ku-sheet-index dt, #ku-sheet-index dd { margin: 0; padding: 7px 0; border-top: 1px dashed #ccbea8; font-size: 14px; line-height: 1.65; }
#ku-sheet-index dt { font-weight: 750; }
@media(max-width: 620px) {
  #ku-hint-sheet { width: calc(100% - 14px); }
  .sheet-head { padding: 6px 8px; gap: 4px; }
  .sheet-head button { min-height: 39px; padding-inline: 7px; }
  .sheet-canvas { padding: 5px; }
  .sheet-transcript { padding-inline: 10px; }
  #ku-sheet-index { column-gap: 8px; }
}
