/* The design journey on the page (design-journey.js): choose buttons on the full-screen pictures, the round bar, the board folder.
   Placement on the picture stage: the caption is top left (v7-shell.css), the close mark top right, the chat dock bottom centre (it ends
   about 70 px above the bottom), so a picture's own button sits at its bottom left and the round's bar under the close mark. */
#v8-picture-stage .v8-ps-grid.n6{grid-template-columns:1fr 1fr 1fr;grid-template-rows:1fr 1fr}
.v8-dj-act{position:absolute;left:16px;bottom:18px;display:flex;gap:6px;z-index:2}
.v8-ps-grid.many .v8-dj-act{left:auto;bottom:auto;right:10px;top:10px}
.v8-dj-act button,.v8-dj-bar button{font:500 13px Inter,system-ui,sans-serif;color:#1b1712;background:#ffe7a8;border:0;border-radius:999px;padding:7px 14px;cursor:pointer;box-shadow:0 4px 18px #0007}
.v8-dj-act button:hover,.v8-dj-bar button:hover{filter:brightness(1.06)}
.v8-dj-act button.quiet,.v8-dj-bar button.quiet{background:#1b1712c4;color:#fff;border:1px solid #ffffff40}
.v8-dj-act .done{font:500 13px Inter,system-ui,sans-serif;color:#1b1712;background:#bfe8c4;border-radius:999px;padding:7px 14px}
.v8-dj-bar{position:fixed;right:24px;top:132px;z-index:17;display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end;max-width:min(520px,calc(100vw - 48px))}
.v8-dj-bar span{font:400 13px Inter,system-ui,sans-serif;color:#fff;background:#1b1712c4;border-radius:999px;padding:7px 14px}
#v8-board{position:fixed;left:24px;top:132px;z-index:17;display:flex;align-items:center;gap:6px;padding:7px 11px;border-radius:14px;border:1px solid #ffffff38;background:#1b1712a6;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);color:#bfe8c4;cursor:pointer;box-shadow:0 6px 24px #0006;font:500 12px Inter,system-ui,sans-serif}
#v8-board[hidden]{display:none}
#v8-board svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linejoin:round}
#v8-board b{color:#fff;font-weight:500}
body:not(.v8-calm):not(.v8-picture) #v8-board{top:auto;bottom:156px}
@media (max-width:700px){#v8-picture-stage .v8-ps-grid.n6{grid-template-columns:1fr 1fr;grid-template-rows:repeat(3,1fr)}.v8-dj-act{left:8px;bottom:8px}.v8-dj-act button{padding:6px 10px;font-size:12px}}
/* Mac review 2026-11-10: the board folder sits under the render gallery (84 px) and the cameras (126 px), in the standard's glass */
#v8-board{top:168px!important;border-radius:var(--dv-r-bar)!important;padding:7px 13px 7px 11px!important;background:linear-gradient(rgba(12,10,8,.30),rgba(12,10,8,.30)),var(--dv-pane)!important;color:#fff!important;font:400 var(--dv-size) var(--dv-font)}#v8-board .gx{width:17px;height:17px;color:var(--dv-gold)}#v8-board b{font-weight:400!important}body:not(.v8-calm):not(.v8-picture) #v8-board{top:168px!important;bottom:auto!important}body.v8-picture #v8-board,body.v8-picture #v8-gallery{display:flex}

#v8-picture-stage .v8-ps-grid.v8-dj-comparison {
    width: min(1160px, 94vw);
    height: auto;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: auto;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 2px 14px;
}
#v8-picture-stage .v8-dj-comparison figure {
    align-items: stretch;
    justify-content: flex-start;
    cursor: default;
    border-radius: 14px;
    overflow: hidden;
}
#v8-picture-stage .v8-dj-comparison img { display: block; aspect-ratio: 3/2; height: auto; object-fit: contain; }
#v8-picture-stage .v8-dj-comparison figcaption { position: static; padding: 10px 12px; background: transparent; }
.v8-dj-comparison .v8-dj-act { position: static; margin: auto 0 0; padding: 0 12px 12px; }
.v8-dj-enlarge { display: block; width: 100%; border: 0; padding: 0; background: #171411; cursor: zoom-in; }
@media (max-width: 700px) {
    #v8-picture-stage .v8-ps-grid.v8-dj-comparison { grid-template-columns: repeat(4, minmax(170px, 70vw)); }
}

#v8-picture-stage:has(> .v8-dj-library-panel, .v8-dj-style-preview) {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: none;
}
#v8-picture-stage:has(> .v8-dj-library-panel, .v8-dj-style-preview) > * { pointer-events: auto; }

.v8-dj-library-panel {
    width: min(1510px, 96vw);
    max-height: min(58dvh, calc(100dvh - 220px));
    align-self: flex-start;
    margin-top: min(17dvh, 130px);
    pointer-events: none !important;
    overflow: auto;
    padding: clamp(14px, 2vw, 26px);
    color: #fff;
}
.v8-dj-library-panel h2 { margin: 0; color: var(--dv-text); }
.v8-dj-library-panel :is(.v8-dj-library, .v8-dj-act) { pointer-events: auto; }
.v8-dj-library-panel :is(figcaption, h2, p) { text-shadow: 0 1px 4px #000; }
.v8-dj-library-panel p { font-size: 13px; color: var(--dv-muted); }
#v8-picture-stage .v8-dj-library-panel .v8-dj-library {
    width: 100%;
    height: auto;
    padding: 8px 0;
    grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
    grid-template-rows: none;
    grid-auto-rows: auto;
    gap: 18px 12px;
    overflow: visible;
}
#v8-picture-stage .v8-dj-library figure {
    cursor: default;
    justify-content: flex-start;
    text-align: center;
}
.v8-dj-library .v8-dj-enlarge {
    width: min(100%, 94px);
    aspect-ratio: 1;
    flex: none;
    overflow: hidden;
    border-radius: 23%;
    box-shadow: 0 3px 10px #0006;
    touch-action: pan-y;
    -webkit-touch-callout: none;
    transition: transform 140ms ease-out;
}
@media (hover: hover) {
    .v8-dj-library .v8-dj-enlarge:hover { transform: scale(1.08); }
}
.v8-dj-library .v8-dj-enlarge:active { transform: scale(.91); }
#v8-picture-stage .v8-dj-library img {
    display: block;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
}
#v8-picture-stage .v8-dj-library-panel .v8-ps-grid.v8-dj-library figcaption {
    position: static;
    display: block;
    width: 100%;
    max-width: none;
    padding: 6px 2px 3px;
    background: none;
    color: #fff;
    font-size: 12px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}
.v8-dj-library figure button[aria-pressed] {
    margin: auto 0 0;
    padding: 2px 9px;
    color: inherit;
    font-size: 11px;
    cursor: pointer;
}
.v8-dj-library figure button[aria-pressed="true"] { background: var(--dv-hover); color: var(--dv-text); border-color: var(--dv-gold); }
.v8-dj-library-panel .v8-dj-act { position: static; flex-wrap: wrap; margin-top: 14px; }
.v8-dj-library-panel input { flex: 1 1 215px; min-width: 0; padding: 7px 10px; }
.v8-dj-library-panel button:disabled { opacity: .55; cursor: default; }
@media (max-width: 600px) {
    #v8-picture-stage .v8-dj-library-panel .v8-dj-library {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px 8px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .v8-dj-library .v8-dj-enlarge { transition: none; }
    .v8-dj-library .v8-dj-enlarge:is(:active, :hover) { transform: none; }
}

#v8-picture-stage .v8-dj-style-preview { position: relative; }
.v8-dj-style-details {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 14px;
    padding: clamp(24px, 7vw, 96px);
    overflow: auto;
    color: #fff;
    animation: v8-dj-style-turn 260ms ease-out;
}
.v8-dj-style-details[hidden] { display: none; }
.v8-dj-style-details h2, .v8-dj-style-details p { margin: 0; }
.v8-dj-style-details p { max-width: 42ch; font-size: clamp(16px, 2.2vw, 23px); line-height: 1.5; }
.v8-dj-style-flip { position: absolute; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 2; }
@keyframes v8-dj-style-turn {
    from { transform: perspective(900px) rotateY(-90deg); opacity: 0; }
    to { transform: perspective(900px) rotateY(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .v8-dj-style-details { animation: none; }
}
#v8-picture-stage .v8-dj-style-preview img { object-fit: contain; }
#v8-picture-stage .v8-dj-style-preview figcaption {
    display: block;
    top: auto;
    bottom: 24px;
}
.v8-dj-style-preview:has(.v8-dj-style-details:not([hidden])) figcaption { visibility: hidden; }
.v8-dj-style-flip {
    padding: 8px 16px;
    color: #fff;
    cursor: pointer;
}

#v8-picture-stage .v8-refine-panel[hidden] { display: none; }
#v8-picture-stage .v8-refine-panel { max-height: calc(100dvh - 152px); }
#v8-picture-stage .v8-refine-toggle {
    position: absolute;
    z-index: 3;
    top: 84px;
    right: 102px;
}

.v8-dj-survey {
    box-sizing: border-box;
    width: 100%;
    padding: 4px 0;
    color: var(--dv-text);
    font: 400 var(--dv-chat)/1.45 var(--dv-font);
}
.v8-dj-survey[hidden] { display: none; }
.v8-dj-survey h3 { margin: 0; }
.v8-dj-survey canvas {
    width: min(100%, 280px);
    height: auto;
    display: block;
    margin: 0 auto;
}
.v8-dj-survey-controls {
    display: grid;
    gap: 6px;
    margin: 0 0 8px;
}
.v8-dj-survey :is(.v8-dj-survey-controls > label, .v8-dj-brief > label, .v8-dj-survey-rooms) {
    display: grid;
    grid-template-columns: minmax(0, 7rem) minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}
.v8-dj-survey-controls > label:has(input[type="range"]) {
    grid-template-columns: minmax(0, 7rem) minmax(0, 1fr) auto auto;
}
.v8-dj-survey label > span:first-child, .v8-dj-survey-rooms > p { color: var(--dv-soft); }
.v8-dj-survey input, .v8-dj-survey select { width: 100%; min-width: 0; margin: 0; accent-color: var(--dv-glyph); }
.v8-dj-survey :is(input, select).dv-field { box-sizing: border-box; padding: 5px 10px; }
.v8-dj-survey p { margin: 0; }
.v8-dj-survey p:empty { display: none; }

/* Interactive replies need room inside the compact transcript. */
.davinci-dock.open #agent-messages:has(> .v8-dj-survey[data-survey-active]:not([hidden])) {
    max-height: min(55dvh, 440px) !important;
    overflow-y: auto !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
    cursor: auto;
    border-radius: var(--dv-r-panel) !important;
}
.davinci-dock:not(.history) #agent-messages > .v8-dj-survey[data-survey-active]:not([hidden]) {
    display: block !important;
    order: -1 !important;
}

#v8-picture-stage .v8-dj-style-preview img { max-height: 68dvh; }
.v8-dj-survey label input[type="number"] { box-sizing: border-box; }
.v8-dj-survey button.primary { margin-top: 8px; }

.v8-dj-room-rows { display: grid; gap: 6px; min-width: 0; }
.v8-dj-room-rows > div { display: grid; grid-template-columns: minmax(0, 1fr) min(5rem, 24%) 34px; gap: 8px; align-items: center; }
.v8-dj-room-rows .dv-field { box-sizing: border-box; }
.v8-dj-room-rows .dv-btn { padding: 0; aspect-ratio: 1; }

.v8-dj-choices { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; align-items: center; gap: 8px; }
.v8-dj-choices legend { float: left; box-sizing: border-box; width: 7rem; flex-shrink: 0; padding: 0; color: var(--dv-soft); }
.v8-dj-choice-strip { display: flex; min-width: 0; gap: 4px; overflow-x: auto; padding: 3px; }
.v8-dj-choice-strip label { position: relative; flex: none; cursor: pointer; }
.v8-dj-choice-strip .dv-chip { display: block; padding: 3px 8px; white-space: nowrap; }
.v8-dj-choices input { position: absolute; opacity: 0; pointer-events: none; }
.v8-dj-choices input:checked + .dv-chip { border-color: var(--dv-gold); background: var(--dv-hover); }
.v8-dj-choices input:focus-visible + .dv-chip { outline: 2px solid var(--dv-gold); outline-offset: 2px; }
.v8-dj-brief { margin-top: 10px; }
.v8-dj-brief summary { width: fit-content; }
.v8-dj-brief label { margin-top: 8px; }
.v8-dj-brief input { box-sizing: border-box; }
.v8-dj-custom-space { display: flex; gap: 4px; min-width: 0; }
.v8-dj-custom-space .dv-btn { padding: 4px 8px; aspect-ratio: auto; }

@media (max-width: 420px) {
    .v8-dj-survey :is(.v8-dj-survey-controls > label, .v8-dj-brief > label, .v8-dj-survey-rooms) {
        grid-template-columns: minmax(0, 5.25rem) minmax(0, 1fr);
    }
    .v8-dj-survey-controls > label:has(input[type="range"]) {
        grid-template-columns: minmax(0, 5.25rem) minmax(0, 1fr) auto auto;
    }
    .v8-dj-choices legend { width: 5.25rem; }
    .v8-dj-room-rows > div { gap: 4px; }
}

.v8-dj-survey [hidden] { display: none !important; }
.v8-dj-survey-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
/* The style library: the button that confirms the choices stays in view while the styles scroll (Eddy 2026-11-16: "all I need to see is a button to confirm my choices") */
#v8-picture-stage .v8-dj-library-panel .v8-dj-act { position: fixed; right: 24px; top: 168px; left: auto; bottom: auto; z-index: 6; pointer-events: auto; }
#v8-picture-stage .v8-dj-library-panel .v8-dj-act button { font-size: 14px; padding: 10px 20px; box-shadow: 0 6px 24px #000a; }
#v8-picture-stage .v8-dj-library-panel .v8-dj-act button:disabled { opacity: .55; cursor: default; }
.v8-dj-library figure[hidden] { display: none !important; }
.v8-dj-library-panel .v8-dj-more { pointer-events: auto; display: block; margin: 6px auto 12px; padding: 9px 22px; color: #fff; background: #ffffff1f; border: 1px solid #ffffff40; border-radius: 999px; cursor: pointer; font: 500 13px Inter, system-ui, sans-serif; }
.v8-dj-library-panel .v8-dj-more:hover { background: #ffffff33; }
/* Smooth arrival (Eddy 2026-11-16: "it jumped to this window abruptly, not thinking, and without a smooth transition"): the questionnaire card and
   the picture views come in with a short fade and rise, not all at once */
.v8-dj-survey { animation: v8djIn 520ms cubic-bezier(.2,.8,.2,1) both; }
#v8-picture-stage:not([hidden]) { animation: v8djStage 420ms ease-out both; }
@keyframes v8djIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes v8djStage { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .v8-dj-survey, #v8-picture-stage:not([hidden]) { animation: none; } }
