.detail-editor { width: 100%; max-width: none; height: auto; max-height: none; padding: 0; border: 1px solid #876b3c; border-radius: 6px; background: #101110; color: #eee9df; color-scheme: dark; overflow: hidden; scroll-margin-top: 80px; }
.detail-editor:not([hidden]) { display: flex; flex-direction: column; }
.constructor-page.is-detail-editing .workspace-stage,
.constructor-page.is-detail-editing .selection-panel,
.constructor-page.is-detail-editing .roll-layout,
.constructor-page.is-detail-editing .mobile-selection-bar { display: none !important; }
.constructor-page.is-detail-editing .toast { display: none; }
.constructor-page.is-detail-editing .constructor-layout { grid-template-columns: minmax(0,1fr); }
.constructor-page.is-detail-editing .workspace-column { grid-column: 1 / -1; }
.detail-editor * { box-sizing: border-box; letter-spacing: 0; }
.detail-editor [hidden] { display: none !important; }
.de-head { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-bottom: 1px solid #483e2c; }
.de-head h2 { margin: 3px 0 0; font-size: 19px; line-height: 1.2; }
.de-eyebrow { color: #d8b97e; font-size: 9px; font-weight: 700; }
.de-head select { margin-left: auto; max-width: 340px; width: 38%; }
.detail-editor button, .detail-editor input, .detail-editor select, .detail-editor textarea { min-height: 36px; border: 1px solid #655335; border-radius: 3px; color: #eee9df; background: #1b1c19; font: inherit; font-size: 12px; padding: 7px 9px; }
.detail-editor button { cursor: pointer; font-weight: 600; }
.detail-editor input, .detail-editor select { height: 36px; }
.detail-editor button:hover:not(:disabled) { background: #332d21; border-color: #dfbc7b; }
.detail-editor button:disabled { opacity: .4; cursor: default; }
.detail-editor :focus-visible { outline: 2px solid #e5bd7b; outline-offset: 2px; }
.de-toolbar { display: flex; gap: 5px; padding: 8px 12px; border-bottom: 1px solid #483e2c; flex-wrap: wrap; }
.de-toolbar button, .de-section button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.de-toolbar button > svg, .de-section button > svg { width: 16px; height: 16px; flex-shrink: 0; }
.detail-editor .de-icon { width: 36px; height: 36px; flex: 0 0 36px; padding: 8px; display: inline-flex; align-items: center; justify-content: center; }
.de-icon svg { width: 19px; height: 19px; }
.detail-editor [aria-pressed="true"], .detail-editor .de-primary { background: #dfbb79; color: #14130f; border-color: #dfbb79; }
.detail-editor .de-primary:hover:not(:disabled) { background: #f0cf95; }
.de-separator { width: 1px; margin: 3px 4px; background: #54432b; }
.de-brush-options { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 6px 12px; border-bottom: 1px solid #483e2c; }
.de-brush-options strong { font-size: 12px; color: #e7c58b; }
.de-brush-segment { display: flex; flex-wrap: wrap; gap: 4px; }
.de-brush-options label { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; }
.de-brush-options input { width: 78px; }
.de-tooltip {
    position: fixed; z-index: 1200; max-width: min(250px, calc(100vw - 16px)); padding: 6px 9px;
    border: 1px solid #866c43; border-radius: 4px; background: #23231e; color: #f7efe1;
    font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; pointer-events: none;
}
.de-body { display: grid; grid-template-columns: minmax(0, 1fr) 270px; min-height: 0; height: clamp(450px, 65dvh, 680px); }
.de-canvas-wrap { position: relative; min-width: 0; min-height: 0; background: #090a09; overflow: hidden; }
#de-canvas { display: block; width: 100%; height: 100%; min-height: 200px; touch-action: none; user-select: none; cursor: crosshair; }
#de-shapes path { fill: #cfad6445; stroke: #f1ce8d; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
#de-shapes path[data-hole="true"] { fill: #0b0d0b; stroke: #d9b77d; }
#de-original path { fill: none; stroke: #97968c; stroke-width: 1; stroke-dasharray: 4 5; opacity: .4; vector-effect: non-scaling-stroke; }
#de-handles circle { fill: #e7c281; stroke: #17160f; stroke-width: 1; vector-effect: non-scaling-stroke; }
#de-handles circle[data-selected="true"] { fill: #f59a7c; stroke: #ffe8ce; stroke-width: 1.5; }
.detail-editor[data-mode="holes"] #de-shapes path[data-hole="true"]:hover { fill: #b94732; cursor: pointer; }
#de-cut path { fill: #ed6e4c30; stroke: #ef997e; stroke-width: 1.5; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
#de-cut circle { fill: #ef997e; }
#de-cut path[data-line="true"] { fill: none; stroke-dasharray: none; stroke-width: 3; }
#de-brush-preview, #de-brush-cursor { pointer-events: none; color: #f29f85; }
#de-brush-preview[data-action="fill"], #de-brush-cursor[data-action="fill"] { color: #96d9bc; }
#de-brush-cursor[data-action="stretch"] { color: #8ed9e7; }
#de-brush-preview { opacity: .42; }
#de-brush-preview :is(path, circle) { fill: currentColor; }
#de-brush-preview polyline { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
#de-brush-preview [data-lasso] { stroke: currentColor; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
#de-brush-cursor :is(circle, rect) { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
#de-secondary path { fill: #e0d5b51c; stroke: #eee7d4; stroke-width: 1.5; stroke-dasharray: 5 3; vector-effect: non-scaling-stroke; cursor: move; }
.de-properties { padding: 12px; border-left: 1px solid #483e2c; overflow: auto; min-height: 0; }
.de-section { display: grid; align-content: start; gap: 8px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid #393125; }
.de-section:last-child { border-bottom: 0; margin-bottom: 0; }
.de-section strong { font-size: 12px; color: #e7c58b; }
.de-section label { display: grid; align-content: start; gap: 5px; font-size: 11px; color: #bfb9aa; min-width: 0; }
.de-section summary { color: #e7c58b; font-size: 12px; font-weight: 600; cursor: pointer; }
.de-section summary + * { margin-top: 8px; }
.de-section textarea { width: 100%; resize: vertical; min-height: 70px; max-height: 150px; }
.de-section .de-check { display: flex; align-items: center; gap: 8px; }
.de-section .de-check input { width: 16px; height: 16px; min-height: 16px; accent-color: #dfbb79; }
.de-segments { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
#de-selected-count { font-size: 12px; color: #d6cbb4; }
.de-font-sample { min-height: 42px; padding: 5px; text-align: center; font-size: 24px; color: #f4d49a; overflow-wrap: anywhere; }
#de-original-reset { align-self: start; }
.de-section input, .de-section select { width: 100%; min-width: 0; }
.de-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.de-offset { display: grid; gap: 6px; padding-top: 8px; margin-top: 8px; border-top: 1px solid #393125; }
.de-offset-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.de-offset .de-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.de-offset button { min-width: 0; padding-inline: 4px; }
.de-offset button > svg { width: 14px; height: 14px; }
.de-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid #483e2c; }
#de-status { font-size: 12px; color: #c8c0ad; line-height: 1.4; overflow-wrap: anywhere; }
#de-status.is-error { color: #f0a38e; }
#de-canvas-properties button { min-height: 36px; }
.logo-request-progress { margin: 0; color: #d4c6ae; font-size: 13px; overflow-wrap: anywhere; }
.logo-request-progress[data-error="true"] { color: #f0a38e; }
.logo-request-form input[type="file"] { width: 100%; max-width: 100%; min-width: 0; padding: 8px; }
.logo-request-form .logo-request-consent { display: flex; align-items: flex-start; gap: 7px; font-size: 12px; }
.logo-request-consent input[type="checkbox"] { flex: none; width: 16px; height: 16px; min-height: 0; margin: 2px 0 0; accent-color: #dfbb79; }
.logo-request-consent a { text-decoration: underline; }
.logo-request [hidden] { display: none !important; }
.de-footer-actions { display: flex; gap: 8px; flex-shrink: 0; }
.constructor-toolbar-actions #detail-edit-open { color: #edcf98; border-color: #a4834d; gap: 5px; }
.constructor-toolbar-actions #detail-edit-open svg { width: 15px; height: 15px; }
.constructor-page .workspace-stage { position: relative; }
.constructor-page .detail-edit-inline { position: absolute; z-index: 5; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; min-height: 0; padding: 7px; border: 1px solid #e0ba75; border-radius: 4px; background: #14130fed; color: #f0ce91; cursor: pointer; box-shadow: 0 2px 8px #0008; }
.constructor-page .detail-edit-inline[hidden] { display: none; }
.constructor-page .detail-edit-inline svg { width: 16px; height: 16px; flex-shrink: 0; pointer-events: none; }
.constructor-page .detail-edit-inline:hover { background: #e0ba75; color: #15130e; }
.constructor-page .detail-edit-inline:focus-visible { outline: 2px solid #fff0ca; outline-offset: 2px; }
.detail-hit.is-edited { fill: #ba954c80; stroke: #ffe0a1; stroke-width: 2; vector-effect: non-scaling-stroke; }
.detail-hit.is-merged-source { pointer-events: none; opacity: .12; }
@media(max-width:700px) {
    .constructor-page .workspace-toolbar .constructor-toolbar-actions { grid-template-columns: repeat(auto-fit, 40px); gap: 4px; }
    .constructor-page .detail-edit-inline { display: none; }
    .detail-editor { width: 100%; height: auto; border-radius: 4px; border-width: 1px; }
    .de-head { padding: 10px; gap: 8px; }
    .de-head h2 { font-size: 15px; }
    .de-head select { width: 42%; font-size: 11px; }
    .de-toolbar { padding: 6px 10px; gap: 4px; }
    .de-toolbar .de-separator { display: none; }
    .detail-editor .de-toolbar .de-icon, .detail-editor .de-brush-segment .de-icon { width: 40px; height: 40px; flex: 0 0 40px; }
    .de-brush-options { gap: 6px 8px; padding-inline: 10px; }
    .de-body { display: flex; flex-direction: column; height: auto; }
    .de-canvas-wrap { height: min(58dvh,440px); min-height: 280px; flex: 0 0 auto; }
    .detail-editor[data-mode="text"] .de-canvas-wrap { height: 260px; min-height: 220px; }
    .de-properties { border-left: 0; border-top: 1px solid #483e2c; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; align-content: start; overflow: visible; }
    #de-text-properties, #de-merge-properties, #de-size-properties { grid-column: 1 / -1; }
    .de-head select { max-width: 45%; flex: 1; }
    .de-toolbar button { min-height: 40px; font-size: 11px; }
    .de-section { margin: 0; }
    .de-footer { flex-direction: column; align-items: stretch; padding: 8px 10px max(8px, env(safe-area-inset-bottom)); gap: 7px; }
    .de-footer-actions { justify-content: flex-end; }
    #de-status { min-height: 30px; font-size: 11px; }
}
@media (min-width: 375px) and (max-width: 700px) {
    .de-toolbar { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); }
    .detail-editor .de-toolbar .de-icon { width: 100%; min-width: 0; }
}
