/* A stable evidence workspace with the original answer forms. */
body[data-surface=prologue] .workspace:has(.puzzle-desk){grid-template-columns:minmax(0,1fr)!important;gap:20px!important}
body[data-surface=prologue] .workspace:has(.puzzle-desk) .sidebar{position:static;display:flex;align-items:center;gap:18px;border:0;border-bottom:1px solid #c9baa2;padding:0 0 14px!important;flex-wrap:wrap}
body[data-surface=prologue] .workspace:has(.puzzle-desk) .sidebar>.eyebrow{display:none}
body[data-surface=prologue] .workspace:has(.puzzle-desk) .sidebar h1{font-size:23px!important;margin:0!important}
body[data-surface=prologue] .workspace:has(.puzzle-desk) .steps{display:flex!important;flex:1;margin:0;gap:6px}
body[data-surface=prologue] .workspace:has(.puzzle-desk) .steps li{flex:1;min-width:0}
body[data-surface=prologue] .workspace:has(.puzzle-desk) .steps button{min-height:44px!important;width:100%;padding:8px!important;flex-direction:row}
body[data-surface=prologue] .workspace:has(.puzzle-desk) .step-title{display:none}
body[data-surface=prologue] .workspace:has(.puzzle-desk) .step-short{display:block;font:12px/1.4 Arial,sans-serif!important}
body[data-surface=prologue] .workspace:has(.puzzle-desk) .case-tools{margin:0;padding:0;border:0;position:relative}
body[data-surface=prologue] .workspace:has(.puzzle-desk) .case-tools[open]{flex-basis:100%}
body[data-surface=prologue] .puzzle-desk>h2{font-size:32px!important;margin-bottom:10px!important}
body[data-surface=prologue] .puzzle-desk>.goal{font-size:16px;line-height:1.5;margin-bottom:18px;max-width:80ch}
.desk-columns{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(300px,1fr);gap:24px;align-items:start}
.desk-evidence,.desk-answers{min-width:0}
.desk-answers{position:sticky;top:16px;max-height:calc(100dvh - 32px);overflow:auto;overscroll-behavior:contain}
body[data-surface=prologue] .puzzle-desk .answerbox{margin:0!important;padding:20px!important}
body[data-surface=prologue] .puzzle-desk .printer-inputs,body[data-surface=prologue] .puzzle-desk .audit-answer .printer-inputs{grid-template-columns:1fr!important;gap:12px!important}
body[data-surface=prologue] .puzzle-desk .inputrow{flex-direction:column}
body[data-surface=prologue] .puzzle-desk .inputrow input{flex:none}
body[data-surface=prologue] .puzzle-desk .answerbox input{font-size:16px!important;min-height:44px}
body[data-surface=prologue] .puzzle-desk .evidence-phone-strip{margin:0 0 10px;padding:0!important}
.evidence-tabs{display:flex;gap:6px;overflow-x:auto;padding:2px 2px 10px;scrollbar-width:thin}
.evidence-tabs button{flex:1;min-width:90px;min-height:44px;padding:9px 12px;border:1px solid #c9baa2;background:#f6f0e3;border-radius:4px;color:#5a4939;font:13px/1.3 Arial,sans-serif;cursor:pointer}
.evidence-tabs button[aria-selected=true]{background:#70403b;color:#fffaf0;border-color:#70403b}
.evidence-tabs button:focus-visible,.puzzle-desk [role=button]:focus-visible{outline:3px solid #99722e;outline-offset:2px}
body[data-surface=prologue] .puzzle-desk .documents{display:block!important}
body[data-surface=prologue] .puzzle-desk .document{max-height:none;overflow:visible}
body[data-surface=prologue] .puzzle-desk .document[hidden]{display:none!important}
body[data-surface=prologue] .puzzle-desk .document .doctitle{font-size:20px!important;margin-bottom:12px}
body[data-surface=prologue] .puzzle-desk .document-upload>img{max-height:62dvh!important;width:100%;height:auto;object-fit:contain}
.puzzle-desk .document-upload>img,.puzzle-desk .photo-image{cursor:zoom-in}
.answer-dock{display:none}
body[data-surface=prologue] #exhibit{width:100vw!important;max-width:100vw!important;height:100dvh;max-height:100dvh!important;margin:0!important;border:0!important;border-radius:0!important;box-sizing:border-box}
body[data-surface=prologue] #exhibit>.dialoghead{position:sticky;top:-20px;z-index:2;background:#f6f0e3;padding:10px 0}
body[data-surface=prologue] #exhibit .zoom-viewport{max-height:calc(100dvh - 155px)}
.answer-drawer{box-sizing:border-box;border:1px solid #c9baa2;background:#f6f0e3;color:#332d27;border-radius:16px 16px 0 0;padding:0!important;width:100vw;max-width:100vw;max-height:85dvh;margin:auto 0 0;overflow:auto;overscroll-behavior:contain}
.answer-drawer::backdrop{background:#201b17a8}
.drawer-head{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:0;z-index:1;background:#f6f0e3;padding:14px 18px;border-bottom:1px solid #d4c5ab}
.drawer-head h2{font:22px/1.3 Georgia,serif;margin:0!important}
.drawer-head button{min-height:44px;font-size:13px}
.drawer-content{padding:16px 18px max(18px,env(safe-area-inset-bottom))}
@media(max-width:850px){
 .desk-columns{display:block}
 .desk-answers{display:none}
 body[data-surface=prologue] .workspace:has(.puzzle-desk){padding-bottom:90px!important}
 body[data-surface=prologue] .workspace:has(.puzzle-desk) .sidebar{gap:10px;margin-bottom:16px}
 body[data-surface=prologue] .workspace:has(.puzzle-desk) .steps{flex-basis:100%;order:2}
 body[data-surface=prologue] .workspace:has(.puzzle-desk) .case-tools{margin-left:auto}
 body[data-surface=prologue] .workspace:has(.puzzle-desk) .case-tools[open]{margin-left:0;order:3}
 body[data-surface=prologue] .workspace:has(.puzzle-desk) .steps button{font-size:11px!important;gap:4px!important;padding:8px 3px!important}
 body[data-surface=prologue] .workspace:has(.puzzle-desk) .step-short{font-size:10px!important}
 body[data-surface=prologue] .puzzle-desk>h2{font-size:27px!important}
 body[data-surface=prologue] .puzzle-desk .document{max-height:none;overflow:visible;padding:16px!important}
 body[data-surface=prologue] .puzzle-desk .document-upload>img{max-height:58dvh!important}
 body[data-surface=prologue] .puzzle-desk .answerbox{border:0!important;padding:0!important;background:transparent!important}
 .evidence-tabs{position:sticky;top:0;z-index:2;background:#f6f0e3;padding-top:8px}
 .answer-dock{display:block;position:fixed;bottom:0;left:0;right:0;z-index:20;padding:10px 18px max(10px,env(safe-area-inset-bottom));background:#f6f0e3;border-top:1px solid #c9baa2;box-shadow:0 -4px 20px #332d2710}
 .answer-dock button{width:100%;min-height:44px;font-size:14px}
 body[data-surface=prologue] #exhibit>.dialoghead{top:-12px}
 body[data-surface=prologue] #exhibit .zoom-viewport{max-height:calc(100dvh - 175px)}
}
/* Compact mobile sheet; scroll inside it while the evidence remains visible. */
.desk-answers .drawer-guidance{display:contents}
.desk-answers .drawer-guidance>summary{display:none}
body[data-surface=prologue] #desk-answer-dialog{position:fixed;inset:auto 0 0!important;width:100%!important;max-width:100%!important;height:auto!important;max-height:min(48dvh,430px)!important;margin:0!important;border-radius:16px 16px 0 0!important;box-shadow:0 -8px 32px #332d2726;overflow:hidden!important;padding:0!important}
body[data-surface=prologue] #desk-answer-dialog[open]{display:flex;flex-direction:column;animation:drawer-rise .22s ease-out}
body[data-surface=prologue] #desk-answer-dialog.drawer-closing{animation:drawer-fall .18s ease-in forwards}
body[data-surface=prologue] #desk-answer-dialog::backdrop{background:#201b172e}
.drawer-grip{flex:none;display:flex;justify-content:center;padding:10px 0 4px;touch-action:none;cursor:grab}
.drawer-grip>span{width:34px;height:4px;border-radius:4px;background:#a99980}
body[data-surface=prologue] #desk-answer-dialog .drawer-head{position:static;flex:none;padding:2px 16px 8px;min-height:36px}
body[data-surface=prologue] #desk-answer-dialog .drawer-head h2{font-size:18px}
body[data-surface=prologue] #desk-answer-dialog .drawer-head button{padding:6px!important;min-height:36px;font-size:12px}
body[data-surface=prologue] #desk-answer-dialog .drawer-content{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:12px 16px max(12px,env(safe-area-inset-bottom))}
body[data-surface=prologue] #desk-answer-dialog .timeline-heading{display:none}
body[data-surface=prologue] #desk-answer-dialog .drawer-guidance{margin:0 0 10px;font:12px/1.4 Arial,sans-serif}
body[data-surface=prologue] #desk-answer-dialog .drawer-guidance summary{min-height:30px;padding:4px 0;cursor:pointer}
body[data-surface=prologue] #desk-answer-dialog .drawer-guidance p{font-size:12px!important;line-height:1.45!important;margin:6px 0!important}
body[data-surface=prologue] #desk-answer-dialog :is(.timeline-inputs,.printer-inputs){grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;margin:0 0 12px}
body[data-surface=prologue] #desk-answer-dialog .printer-answer .printer-inputs>div:first-child{grid-column:1/-1}
body[data-surface=prologue] #desk-answer-dialog .answerbox label{font-size:12px!important;margin-bottom:5px}
body[data-surface=prologue] #desk-answer-dialog .answerbox input{padding:9px!important;min-height:42px!important}
body[data-surface=prologue] #desk-answer-dialog .answerbox .primary{min-height:42px!important;padding:9px 12px!important;font-size:13px!important}
body[data-surface=prologue] #desk-answer-dialog .hintline{margin-top:6px}
body[data-surface=prologue] #desk-answer-dialog .hintline .quiet{min-height:36px!important;padding:6px 0!important}
@keyframes drawer-rise{from{transform:translateY(100%)}to{transform:translateY(0)}}
@keyframes drawer-fall{from{transform:translateY(0)}to{transform:translateY(100%)}}
@media(prefers-reduced-motion:reduce){body[data-surface=prologue] #desk-answer-dialog[open],body[data-surface=prologue] #desk-answer-dialog.drawer-closing{animation:none}}

/* Inline evidence fits its panel; only the enlarged viewer pans and scrolls. */
body[data-surface=prologue] .puzzle-desk .document :is(.plan-viewport,.evidence-extract){height:auto!important;max-height:none!important;overflow:visible!important}
body[data-surface=prologue] .puzzle-desk .document .plan-viewport img{display:block;width:100%!important;height:auto!important;max-height:58dvh!important;object-fit:contain!important}
body[data-surface=prologue] .puzzle-desk .document table{width:100%;table-layout:fixed}
body[data-surface=prologue] .puzzle-desk .document :is(td,th){overflow-wrap:anywhere}
.evidence-carousel-nav{display:none}
.desk-evidence .evidence-context{font:13px/1.5 Arial,sans-serif;margin-top:10px}
.desk-evidence .evidence-context>summary{cursor:pointer;min-height:36px;padding:8px 0}
@media(min-width:851px){.evidence-context{display:contents}.evidence-context>summary{display:none}}
@media(max-width:850px){
 body[data-surface=prologue] .puzzle-desk .evidence-tabs{display:none}
 .evidence-carousel-nav{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:10px}
 .evidence-carousel-nav button{flex:none;width:42px;min-height:40px;background:#fffaf0;border:1px solid #c9baa2;border-radius:5px;color:#70403b;font:26px/1 Arial,sans-serif}
 .evidence-carousel-nav span{text-align:center;font:600 13px/1.4 Arial,sans-serif;color:#5a4939}
 body[data-surface=prologue] .puzzle-desk .documents{touch-action:pan-y}
 body[data-surface=prologue] .puzzle-desk .document{padding:12px!important;animation:evidence-appear .16s ease-out}
 body[data-surface=prologue] .puzzle-desk .document .dochead{margin:0}
 body[data-surface=prologue] .puzzle-desk .document .doctitle{font-size:17px!important;margin:0 0 8px!important;padding-bottom:8px}
 body[data-surface=prologue] .puzzle-desk .document-upload{margin:0!important}
 body[data-surface=prologue] .puzzle-desk .document .document-upload>img,body[data-surface=prologue] .puzzle-desk .document .plan-viewport img{max-height:42dvh!important;height:auto!important;width:100%!important;object-fit:contain!important}
 body[data-surface=prologue] .puzzle-desk .evidence-photo{max-width:none;margin:0}
 body[data-surface=prologue] .puzzle-desk .photo-image>img{display:block;width:100%;height:32dvh;object-fit:contain}
 body[data-surface=prologue] .puzzle-desk .photo-image{max-width:240px;margin:auto}
 body[data-surface=prologue] .puzzle-desk .evidence-photo figcaption{font-size:13px;line-height:1.4;margin-top:8px}
 body[data-surface=prologue] .puzzle-desk .artifact-transcript>summary{min-height:34px;padding:7px 0;font-size:12px}
 body[data-surface=prologue] .workspace:has(.puzzle-desk){padding-top:12px!important}
 body[data-surface=prologue] .workspace:has(.puzzle-desk) .sidebar{margin-bottom:8px!important;padding-bottom:8px!important}
 body[data-surface=prologue] .workspace:has(.puzzle-desk) .sidebar h1{font-size:20px!important}
 body[data-surface=prologue] .puzzle-desk>.eyebrow{font-size:10px;margin-bottom:5px}
 body[data-surface=prologue] .puzzle-desk>h2{font-size:24px!important;margin-bottom:8px!important}
 body[data-surface=prologue] .puzzle-desk>.goal{font-size:14px;line-height:1.45;margin-bottom:12px}
 body[data-surface=prologue] .puzzle-desk .evidence-phone-strip{display:none}
}
@keyframes evidence-appear{from{opacity:.65;transform:translateX(8px)}to{opacity:1;transform:translateX(0)}}
@media(prefers-reduced-motion:reduce){body[data-surface=prologue] .puzzle-desk .document{animation:none}}
@media(max-width:850px){
 body[data-surface=prologue]:not(.puzzle-zero)>header{display:grid!important;grid-template-columns:120px minmax(0,1fr);gap:8px!important;padding:10px 0!important;align-items:center!important}
 body[data-surface=prologue]:not(.puzzle-zero)>header>.app-brand img{width:120px!important}
 body[data-surface=prologue]:not(.puzzle-zero)>header>.header-actions{display:contents!important}
 body[data-surface=prologue]:not(.puzzle-zero)>header .music-controls{gap:5px!important;justify-content:flex-end!important;min-width:0}
 body[data-surface=prologue]:not(.puzzle-zero)>header .music-volume{display:none}
 body[data-surface=prologue]:not(.puzzle-zero)>header .music-choice{min-width:0;max-width:140px}
 body[data-surface=prologue]:not(.puzzle-zero)>header .music-choice select{max-width:100%;font-size:11px!important;height:32px!important;min-height:32px!important;padding:4px!important}
 body[data-surface=prologue]:not(.puzzle-zero)>header .music-toggle{width:32px!important;min-width:32px!important;height:32px!important;min-height:32px!important}
 body[data-surface=prologue]:not(.puzzle-zero)>header .headtools{grid-column:1/-1;justify-content:space-between!important;gap:6px!important}
 body[data-surface=prologue]:not(.puzzle-zero)>header .headtools button{min-height:34px!important;padding:6px 9px!important;font-size:11px!important}
 body[data-surface=prologue] .workspace:has(.puzzle-desk) .sidebar h1{display:none}
 body[data-surface=prologue] .workspace:has(.puzzle-desk) .sidebar{gap:5px}
 body[data-surface=prologue] .workspace:has(.puzzle-desk) .case-tools{order:3;width:100%;margin:0!important}
 body[data-surface=prologue] .workspace:has(.puzzle-desk) .case-tools>summary{min-height:26px;padding:4px 0!important;font-size:11px!important}
 body[data-surface=prologue] .puzzle-desk>h2{font-size:22px!important;line-height:1.2!important}
 body[data-surface=prologue] .puzzle-desk>.goal{font-size:13px;line-height:1.4}
 body[data-surface=prologue] .puzzle-desk .document .document-upload>img,body[data-surface=prologue] .puzzle-desk .document .plan-viewport img{max-height:36dvh!important}
 body[data-surface=prologue] .puzzle-desk .photo-image>img{height:26dvh}
}
@media(max-width:850px){
 body[data-surface=prologue] .puzzle-desk .document .document-upload>img,body[data-surface=prologue] .puzzle-desk .document .plan-viewport img{max-height:var(--evidence-fit-height,32dvh)!important}
 body[data-surface=prologue] .puzzle-desk .document .photo-image>img{height:var(--evidence-fit-height,26dvh)!important;max-height:var(--evidence-fit-height,26dvh)!important}
}

/* Keep the camera imprint legible against the cake photograph. */
body[data-surface=prologue] .photo-time{color:#fff3d6!important;background:#21170d!important;border:1px solid #fff3d680;border-radius:3px;padding:7px 10px!important;font:700 17px/1.35 monospace!important;letter-spacing:.5px;text-shadow:none!important;box-shadow:0 2px 8px #0006;right:10px!important;bottom:10px!important}
@media(max-width:850px){body[data-surface=prologue] .photo-time{font-size:16px!important;padding:6px 9px!important;right:8px!important;bottom:8px!important}}

/* Clear time entry without increasing the mobile drawer. */
.evening-time{display:grid;grid-template-columns:minmax(0,1fr) 76px;gap:8px;align-items:center}.evening-time input{min-width:0;width:100%}.evening-time select{width:100%;min-height:44px;padding:8px;border:1px solid #b9b0a0;border-radius:5px;background:#f8f4eb;color:#29251e;font:inherit}.field-source{font-size:.78rem;margin:3px 0 8px;color:#655d50}.timeline-answer .time-status{display:block;line-height:1.45;margin-top:6px;overflow-wrap:anywhere}.opening-purpose{max-width:38rem;line-height:1.5}.clue-next-step{font-weight:600;line-height:1.45}
