.question-photo-dialog{box-sizing:border-box;width:min(760px,calc(100vw - 24px));max-width:none;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);margin:auto;padding:0;border:1px solid #dce1e8;border-radius:18px;background:#fff;color:#1d2939;box-shadow:0 20px 70px #12233c33;font:14px/1.5 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif;overflow:hidden}
.question-photo-dialog[open]{display:flex;flex-direction:column}
.question-photo-dialog::backdrop{background:#14213699}
.question-photo-dialog *{box-sizing:border-box}
.question-photo-heading{flex:none;padding:18px 22px 14px;border-bottom:1px solid #e7ebf0}
.question-photo-heading h2{font-size:21px;font-weight:650;line-height:1.3;margin:0 0 6px}
.question-photo-heading p{font-size:13px;color:#556476;margin:0}
.question-photo-content{min-height:0;overflow:auto;overscroll-behavior:contain;padding:16px 22px;display:grid;grid-auto-rows:max-content;align-content:start;gap:14px}
.question-photo-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
.question-photo-dialog button{font:inherit;cursor:pointer;border:1px solid #cbd5e1;background:#fff;color:#26384c;border-radius:10px;min-height:44px;padding:9px 13px;line-height:1.35;touch-action:manipulation}
.question-photo-dialog button:disabled,.question-photo-dialog input:disabled{opacity:.5;cursor:default}
.question-photo-dialog button:focus-visible,.question-photo-dialog input:focus-visible{outline:3px solid #83b9f5;outline-offset:2px}
.question-photo-rotation{font-size:12px;color:#627184;margin-left:auto}
.question-photo-viewport{min-width:0;min-height:40px;display:flex;align-items:center;justify-content:center;overflow:hidden;padding:2px;background:#edf1f6;border-radius:10px}
.question-photo-board{position:relative;width:fit-content;max-width:100%;flex:none;overflow:hidden;line-height:0;touch-action:none;user-select:none;-webkit-user-select:none;cursor:crosshair}
.question-photo-preview{display:block;width:auto;height:auto;max-width:100%;max-height:52vh;max-height:52dvh;object-fit:contain;background:#fff}
.question-photo-mask{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.question-photo-selection{position:absolute;pointer-events:none;border:2px solid #37816d;background:transparent}
.question-photo-selection[data-active="true"]{border:2px solid #086dd7;background:#217dde0a}
.question-photo-selection span{position:absolute;top:0;left:0;padding:3px 6px;background:#37816d;color:white;font-size:12px;line-height:1.2;border-radius:0 0 4px 0}
.question-photo-selection[data-active="true"] span{background:#086dd7}
.question-photo-regions{display:flex;flex-wrap:wrap;gap:8px}
.question-photo-regions button[aria-pressed="true"]{background:#eaf2ff;border-color:#086dd7;color:#075cb5;font-weight:600}
.question-photo-add{font-weight:600}
.question-photo-dialog [hidden]{display:none!important}
.question-photo-boundaries{min-width:0;border:0;padding:0;margin:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.question-photo-boundaries legend{float:none;width:100%;margin-bottom:8px;font-size:12px;color:#526476}
.question-photo-boundaries label{display:grid;min-width:0;gap:5px;font-size:12px;color:#526476}
.question-photo-boundaries input{width:100%;min-width:0;min-height:44px;border:1px solid #cbd5e1;border-radius:9px;padding:8px;font:inherit;font-size:16px;color:#1d2939;background:#fff}
.question-photo-status,.question-photo-help{margin:0;font-size:12px;color:#556476;line-height:1.6}
.question-photo-error{margin:0;padding:10px 12px;border:1px solid #ebc6bf;background:#fff4f2;border-radius:9px;color:#a03224;font-size:13px}
.question-photo-error[hidden]{display:none}
.question-photo-actions{flex:none;display:flex;justify-content:flex-end;gap:10px;padding:14px 22px calc(14px + env(safe-area-inset-bottom,0px));border-top:1px solid #e7ebf0;background:#fff}
.question-photo-actions .question-photo-confirm{background:#086dd7;border-color:#086dd7;color:#fff;font-weight:600}
@media(max-width:480px){.question-photo-dialog{width:calc(100vw - 12px);max-height:calc(100vh - 12px);max-height:calc(100dvh - 12px);border-radius:14px}.question-photo-heading{padding:15px}.question-photo-heading h2{font-size:19px}.question-photo-content{padding:13px;gap:12px}.question-photo-toolbar button{padding:9px 10px;font-size:13px}.question-photo-rotation{width:100%;margin:0}.question-photo-boundaries{gap:7px}.question-photo-actions{padding:12px 13px calc(12px + env(safe-area-inset-bottom,0px))}.question-photo-actions button{flex:1}.question-photo-preview{max-height:46vh;max-height:46dvh}}
@media(max-height:480px){.question-photo-heading{padding:10px 16px}.question-photo-heading p{font-size:12px}.question-photo-content{padding:10px 16px}.question-photo-preview{max-height:60vh;max-height:60dvh}.question-photo-actions{padding-top:10px;padding-bottom:calc(10px + env(safe-area-inset-bottom,0px))}}
