/* Shared window geometry for native dialogs and existing overlay editors. */
html[data-theme][data-interface-style] body dialog[open] { position:fixed!important; inset:0!important; margin:auto!important; box-sizing:border-box; max-width:calc(100vw - 24px)!important; max-height:calc(100dvh - 24px)!important; border:2px solid var(--note-ink)!important; border-radius:6px!important; background:var(--note-paper)!important; color:var(--text-main); box-shadow:5px 6px 0 var(--note-shadow)!important; }
html[data-theme] body dialog::backdrop { background:#100c1c88; backdrop-filter:blur(3px); }
html[data-theme][data-interface-style] body :is(.sinusModal,.profileModalOverlay,.taskModal,.variantResultOverlay) { position:fixed; inset:0; padding:12px; box-sizing:border-box; align-items:center!important; justify-content:center!important; overflow:auto; }
html[data-theme] body :is(.taskModal[style*="block"],.profileModalOverlay.isOpen,.sinusModal.is-open,.variantResultOverlay[aria-hidden="false"]) { display:flex!important; }
html[data-theme][data-interface-style] body :is(.sinusModal__card,.profileModal,.profileModalBox,.profileModalCard,.taskModalBox,.variantResultCard,.variantResultModal) { margin:auto!important; box-sizing:border-box; max-height:calc(100dvh - 24px)!important; max-width:calc(100vw - 24px)!important; overflow:auto; border:2px solid var(--note-ink)!important; border-radius:6px!important; background:var(--note-paper)!important; color:var(--text-main); box-shadow:5px 6px 0 var(--note-shadow)!important; }
html[data-theme] body :is(dialog>header,.taskModalBox>.taskModalHeader,.sinusModal__header,.profileModalHeader,.studyDialogHeader) { background:var(--note-bar); border-bottom:1px solid var(--note-line); padding:12px; }
html[data-interface-style="minimal"][data-theme] body :is(dialog[open],.sinusModal__card,.profileModal,.profileModalBox,.profileModalCard,.taskModalBox,.variantResultCard,.variantResultModal) { border:1px solid var(--note-line)!important; border-radius:14px!important; box-shadow:0 20px 70px #0003!important; }
html[data-theme][data-interface-style] body #feedbackDialog { width:min(540px,calc(100vw - 24px)); padding:18px; overflow:auto; }
html[data-theme] body #feedbackDialog .feedbackIntro { padding:0 32px 8px 0; gap:10px; }
html[data-theme] body #feedbackDialog .feedbackIntro img { width:42px; height:46px; }
html[data-theme] body #feedbackDialog .feedbackIntro h2 { font-size:16px; line-height:1.4; margin:5px 0; }
html[data-theme] body #feedbackDialog .feedbackIntro small { font-size:9px; }
html[data-theme] body #feedbackDialog #feedbackForm label { margin:5px 0; font-size:12px; }
html[data-theme] body #feedbackDialog .feedbackKinds { gap:6px; margin:10px 0; }
html[data-theme] body #feedbackDialog .feedbackKinds span { padding:8px; font-size:11px; }
html[data-theme] body #feedbackDialog :is(.feedbackKinds,.feedbackRating) legend { margin-bottom:5px; font-size:12px; }
html[data-theme] body #feedbackDialog .feedbackRating { display:block!important; margin:8px 0; }
html[data-theme] body #feedbackMessage { min-height:76px; height:90px; max-height:24dvh; padding:10px; font-size:14px; }
html[data-theme] body #feedbackDialog .feedbackHint { font-size:10px; margin:5px 0; }
html[data-theme] body #feedbackFiles { padding:6px; font-size:11px; }
html[data-theme] body #feedbackFileList { margin:2px 0; max-height:56px; overflow:auto; }
html[data-theme] body #feedbackSend { min-height:42px; padding:9px; margin-top:8px; font-size:12px; }
html[data-theme] body #feedbackStatus { font-size:12px; margin:5px 0; }
html[data-theme] body #feedbackDialog .feedbackRating label { position:relative; display:inline-block; }
html[data-theme] body #feedbackDialog .feedbackStar { display:block; width:30px; min-height:30px; height:30px; margin:5px; background:var(--note-line); clip-path:polygon(37.5% 0,62.5% 0,62.5% 25%,75% 25%,75% 37.5%,100% 37.5%,100% 50%,87.5% 50%,87.5% 62.5%,75% 62.5%,75% 75%,87.5% 75%,87.5% 100%,62.5% 100%,62.5% 87.5%,37.5% 87.5%,37.5% 100%,12.5% 100%,12.5% 75%,25% 75%,25% 62.5%,12.5% 62.5%,12.5% 50%,0 50%,0 37.5%,25% 37.5%,25% 25%,37.5% 25%); }
html[data-theme] body #feedbackDialog .feedbackRating :is(label:has(input:checked),label:has(~label input:checked),label:hover) .feedbackStar { background:var(--text-accent); }
.feedbackRating label:has(input:checked),.feedbackRating label:has(~label input:checked) { filter:drop-shadow(0 0 5px var(--text-accent)); }
html[data-interface-style="minimal"] body #feedbackDialog .feedbackStar { clip-path:polygon(50% 0,61% 35%,98% 35%,68% 57%,79% 94%,50% 72%,21% 94%,32% 57%,2% 35%,39% 35%); }
.ratingParticle { pointer-events:none; position:absolute; left:50%; top:50%; width:6px; height:6px; background:var(--text-accent); clip-path:polygon(50% 0,65% 35%,100% 50%,65% 65%,50% 100%,35% 65%,0 50%,35% 35%); animation:ratingBurst .6s ease-out forwards; }
.starPop .feedbackStar { animation:ratingPop .45s steps(4,end); }
html[data-interface-style="minimal"] .starPop .feedbackStar { animation-timing-function:ease-out; }
@keyframes ratingPop { 50% { transform:scale(1.22) rotate(8deg); } }
@keyframes ratingBurst { to { transform:translate(var(--dx),var(--dy)) rotate(90deg); opacity:0; } }
@media(max-height:650px) { html[data-theme] body #feedbackDialog { padding:12px; } html[data-theme] body #feedbackDialog .feedbackIntro img { display:none; } html[data-theme] body #feedbackMessage { height:65px; min-height:65px; } html[data-theme] body #feedbackDialog .feedbackIntro small { display:none; } }
@media(prefers-reduced-motion:reduce) { .starPop .feedbackStar,.ratingParticle { animation:none!important; } }
html[data-theme] body :is(dialog>h2:first-child,.taskModalHeader,.profileModalHeader,.variantResultHeader) { background:var(--note-bar); border-bottom:1px solid var(--note-line); padding:12px; }
html[data-interface-style="retro"][data-theme] body :is(dialog[open],.sinusModal__card,.profileModalCard,.taskModalBox,.variantResultModal) { border-top-width:5px!important; }
html[data-interface-style="minimal"] body .ratingParticle { border-radius:50%; }

html[data-theme="light"] body #feedbackSend { color:#fff!important; }
html[data-theme] body #feedbackDialog .feedbackUpload { display:flex; align-items:center; justify-content:space-between; gap:8px; cursor:pointer; padding:10px; background:var(--note-bar); border:1px solid var(--note-line); border-radius:5px; min-height:24px; }
html[data-theme] body #feedbackDialog .feedbackFileInput { position:absolute; opacity:0; width:1px; height:1px; padding:0; pointer-events:none; }
.feedbackUpload:has(+input:focus-visible) { outline:2px solid var(--text-accent); }
html[data-interface-style="minimal"][data-theme] body :is(#feedbackDialog,#dailyLoadDialog,#adminWorkspace,#inboxDialog,#platformTour,#taskPreview,#boardGeometryDialog,#boardCropDialog,#sinusNotice,#proGate) { border-radius:14px!important; border-width:1px!important; box-shadow:0 20px 70px #0003!important; }
