.box-view-launch {
  display:flex;align-items:center;justify-content:center;gap:.55rem;min-height:44px;
  margin:.7rem auto 0;padding:.48rem 1rem;border:1px solid #fff0d69c;border-radius:999px;
  color:#fff1dc;background:transparent;font:600 .89rem/1.2 var(--sans);cursor:pointer;
}
.box-view-launch:hover {background:#fff1dc;color:#641a2b;}
.box-view-launch:focus-visible {outline:3px solid #fff1dc;outline-offset:3px;}
#box-view {
  width:min(820px,calc(100% - 32px));max-width:none;max-height:calc(100vh - 26px);max-height:calc(100dvh - 26px);
  padding:0;border:1px solid #a87b65;border-radius:14px;background:#fcf2e3;color:#4f222a;
  box-shadow:0 20px 85px #32101961;overflow:auto;overscroll-behavior:contain;
}
#box-view::backdrop {background:#231015ab;}
.box-view-header,.box-view-tools {padding:clamp(14px,2.4vw,25px) clamp(17px,3vw,30px);}
.box-view-header {display:flex;align-items:center;justify-content:space-between;gap:12px;}
.box-view-header h2 {margin:0;color:#521c2a;font:400 clamp(1.95rem,4vw,2.8rem)/1.08 var(--serif);letter-spacing:-.043em;}
.box-view-close,.box-view-controls button {
  display:grid;place-items:center;min-width:44px;min-height:44px;padding:0;
  border:1px solid #a77a6c;border-radius:50%;background:transparent;color:#5d2431;cursor:pointer;
}
.box-view-close:hover,.box-view-controls button:hover {background:#672438;border-color:#672438;color:#fff4e0;}
#box-view :focus-visible {outline:3px solid #85273c;outline-offset:2px;}
.box-view-stage {
  position:relative;isolation:isolate;width:100%;height:clamp(224px,48vh,438px);height:clamp(224px,48dvh,438px);
  background:radial-gradient(ellipse at 42% 33%,#fff8ed 5%,#f2dfc9 80%,#e8cdb7 112%);
}
.box-view-poster,.box-view-canvas {position:absolute;inset:0;width:100%;height:100%;}
.box-view-poster {object-fit:contain;padding:7% 11%;}
.box-view-canvas {touch-action:none;cursor:grab;}
.box-view-canvas:active {cursor:grabbing;}
.box-view-canvas canvas {display:block;width:100%;height:100%;}
.box-view-tools {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;background:#fcf2e3;}
#box-view-hint,.box-view-message {margin:0;color:#694339;font:500 .89rem/1.5 var(--sans);}
#box-view-hint {max-width:39ch;}
.box-view-controls {display:flex;align-items:center;flex-wrap:wrap;gap:5px;}
.box-view-retry {min-height:44px;margin-left:12px;padding:0;border:0;background:transparent;color:#651d30;text-decoration:underline;text-underline-offset:.2em;cursor:pointer;}
.box-view-message:has(span:empty) {display:none;}
@media (max-width:620px) {
  #box-view {width:calc(100% - 20px);}
  .box-view-tools {flex-direction:column;align-items:flex-start;}
  .box-view-stage {height:clamp(218px,44vh,370px);height:clamp(218px,44dvh,370px);}
}
@media (max-height:470px) and (orientation:landscape) {
  .box-view-header,.box-view-tools {padding-block:7px;}
  .box-view-stage {height:44vh;height:44dvh;}
}
