/* Theme actions and site choices use the same kit controls on phones and computers. */
.ds-actions { align-items: stretch; }
.ds-actions .ovk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; }
.ds-actions .ovk-i { width: 18px; height: 18px; }
.ds-actions [data-ovk-sheet] { min-height: 44px; }
.ds-try { display: block; }
.ds-try > span { display: block; }
.ds-try-sites { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px 0 8px; }
.ds-try .ds-try-sites a { display: inline-flex; flex: 1 1 52px; flex-direction: column; justify-content: center; gap: 3px; min-width: 0; max-width: 74px; min-height: 68px; padding: 6px 2px; border-radius: 14px; font-size: .62rem; line-height: 1.15; text-align: center; }
.ds-try-sites img { width: 26px; height: 26px; border-radius: 8px; }
.ds-share-preview { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--ovk-line); border-radius: 14px; background: var(--ovk-panel); }
.ds-share-preview .tk-dots { display: flex; }
#ds-submit-form { display: grid; gap: 12px; }
#ds-submit-form label { display: grid; gap: 5px; font-weight: 700; }
#ds-submit-form input { width: 100%; min-height: 44px; }
#ds-submit-form .ovk-btn { min-height: 44px; }
.ds-history summary { display: flex; gap: 8px; min-height: 44px; align-items: center; }
.ds-history summary .ovk-i { width: 18px; height: 18px; }
.ds-history ol { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 10px; scroll-snap-type: x proximity; }
.ds-history li { flex: 0 0 148px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 130px; padding: 10px; border: 1px solid var(--ovk-line); border-radius: 14px; background: var(--ovk-panel); scroll-snap-align: start; }
.ds-history li .ds-hist-dot { display: block; width: 100%; height: 34px; border-radius: 8px; }
.ds-history li b { line-height: 1.25; }
.ds-history li small { grid-column: auto; }
.ds-history li button { grid-column: auto; grid-row: auto; min-height: 44px; margin-top: auto; }
.ds-history li.ds-history-empty { flex: 1 0 100%; min-height: 90px; flex-direction: row; align-items: center; color: var(--ovk-muted); }
.ds-history-empty > span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--ovk-panel-2); font-size: 1.8rem; }
.ds-history-empty p { margin: 0; }

.lk-sites { padding: 0 14px; }
.lk-sites li { position: relative; display: flex; justify-content: flex-start; gap: 12px; min-height: 68px; padding: 8px 0; }
.lk-site-icon { flex: none; border-radius: 11px; object-fit: cover; }
.lk-site-text { display: grid; gap: 3px; min-width: 0; }
.lk-site-text b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lk-site-text small { display: flex; align-items: center; gap: 6px; color: var(--ovk-muted); }
.lk-site-swatch { width: 13px; height: 13px; border-radius: 50%; border: 1px solid var(--ovk-line); }
.lk-site-menu { position: relative; margin-left: auto; }
.lk-site-menu summary { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; cursor: pointer; font-size: 1.4rem; list-style: none; }
.lk-site-menu summary::-webkit-details-marker { display: none; }
.lk-site-menu[open] summary { background: var(--ovk-panel-2); }
.lk-site-menu button { position: absolute; z-index: 2; right: 0; top: 46px; min-width: 190px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--ovk-line); border-radius: 12px; background: var(--ovk-panel); color: var(--ovk-text); text-align: left; box-shadow: 0 10px 24px #0004; cursor: pointer; }
.lk-add { padding: 10px 14px 14px; }
.lk-add .ovk-btn { min-height: 44px; }
.lk-site-form { display: grid; gap: 14px; padding: 0; }
.lk-site-form label, .lk-site-form select { width: 100%; max-width: none; }
.lk-site-form .ovk-btn { justify-self: start; }
.lk-history-link a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.lk-history-link .ovk-i { width: 18px; height: 18px; }
.lk-toast { position: fixed; z-index: 60; left: 50%; bottom: calc(var(--ovnav-appbar-h, 0px) + 12px); transform: translateX(-50%); display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100vw - 28px); min-height: 48px; padding: 8px 10px 8px 16px; border: 1px solid var(--ovk-line); border-radius: 14px; background: var(--ovk-panel); color: var(--ovk-text); box-shadow: 0 12px 30px #0005; }
.lk-toast[hidden], .lk-toast button[hidden] { display: none; }
.lk-toast button { min-height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--ovk-panel-2); color: var(--ovk-text); font: inherit; font-weight: 700; cursor: pointer; }

@media (max-width: 759px) {
    /* The bar is fixed over the page, so the page's last thing (the footer) is what must clear it. */
    body:has(.ds-studio) main ~ footer { padding-bottom: 96px; }
    .ds-actions { position: fixed; z-index: 45; left: 0; right: 0; bottom: var(--ovnav-appbar-h, 0px); display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, auto); gap: 5px; margin: 0; padding: 8px max(12px, env(safe-area-inset-left)) 8px max(12px, env(safe-area-inset-right)); border-top: 1px solid var(--ovk-line); background: var(--ovk-panel); box-shadow: 0 -8px 24px #0003; }
    html:has(#ov-try-bar) .ds-actions { bottom: calc(var(--ovnav-appbar-h, 0px) + 68px); }
    .ds-actions .ovk-btn { flex-direction: column; gap: 2px; min-width: 52px; min-height: 48px; padding: 3px 5px; font-size: .67rem; line-height: 1.15; text-align: center; }
    .ds-actions #ds-use { flex-direction: row; min-width: 0; padding: 6px 8px; font-size: .82rem; }
    .ds-actions #ds-use span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    /* Undo, Code and Share are icon buttons on a phone; their labels stay for a screen reader and appear on a computer. */
    .ds-actions #ds-reset span, .ds-actions #ds-code span, .ds-actions [data-ovk-sheet] span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .ds-actions [data-ovk-sheet] { font-size: .67rem; }
    .ds-actions [data-ovk-sheet] .ovk-i { width: 18px; height: 18px; }
}

/* ── The Themes page's layout (2026-11-09: the owner flagged it; openvibe.design/rules) ── */
/* The preview is a <section>: the room's section spacing is for reading pages, not for a card in this grid. */
.ds .ds-grid > section { margin-top: 0; }
.ds-count { margin-left: 4px; font-size: .78rem; font-weight: 700; color: var(--text-muted, #7386a3); }
/* The status line belongs to the buttons it answers: above them, and no gap while it has nothing to say. */
.ds-actions .ds-status { grid-column: 1 / -1; flex-basis: 100%; min-height: 0; margin: 0; }
.ds-actions .ds-status:empty { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
/* Five sites, five even tiles. */
.ds-editor .ds-try-sites { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ds-editor .ds-try .ds-try-sites a { max-width: none; padding: 6px 1px; font-size: .6rem; }
.ds-editor .ds-try-sites a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 760px) {
    /* One button to use it, then three even ones: no ragged rows. */
    .ds-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ds-actions #ds-use { grid-column: 1 / -1; }
    .ds-actions .ovk-btn, .ds-actions [data-ovk-sheet] { box-sizing: border-box; width: 100%; min-width: 0; padding-inline: 6px; }
}
@media (min-width: 1100px) { .ds-grid { grid-template-columns: 250px minmax(0, 1fr) 340px; } }
@media (max-width: 1099px) {
    /* The themes as a rail of small tiles: three and the edge of a fourth on a phone, so the rail says it goes on. */
    .ds-gal-list { grid-auto-columns: 112px; gap: 8px; margin-inline: -14px; padding: 3px 14px; scroll-padding-inline: 14px; scrollbar-width: none; }
    .ds-gal-list::-webkit-scrollbar { display: none; }
    .ds-gal-list .ds-swatch { grid-template-columns: minmax(0, 1fr); align-content: center; gap: 7px; min-height: 68px; padding: 10px 10px 9px; }
    .ds-gal-list .ds-swatch-name { font-size: .84rem; }
    .ds-gal-list .ds-swatch-mode { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .ds-gal-list .ds-swatch { position: relative; }
}
@media (max-width: 759px) {
    /* The three sites side by side to swipe through, so the colours to edit are one screen below the preview, not three. */
    .ds-stage .ds-previews { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 86%; gap: 10px; margin-inline: -14px; padding-inline: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 14px; scrollbar-width: none; }
    .ds-stage .ds-previews::-webkit-scrollbar { display: none; }
    .ds-stage .ds-previews > .pv-frame { scroll-snap-align: start; }
    .ds-stage .pv-video { aspect-ratio: 16 / 6.5; }
    .ds-stage .pv-composer { margin-top: auto; }
    .ds-stage .pv-shoe-pic { aspect-ratio: 16 / 7; }
}

/* ── Your look ── */
/* The icon styles: the three screens are the choice. */
.lk-icons { border-top: 1px solid var(--ovk-line); padding-top: 14px; }
.lk-icons > .ovk-set-text { display: block; padding: 0 14px 10px; }
.lk .ovk-seg label span { text-align: center; }
/* The theme's colours as four separate dots: two overlapping ones read as a switch. */
.lk-theme .tk-dots { gap: 5px; }
.lk-theme .tk-dots .tk-dot + .tk-dot { margin-left: 0; }
/* Under the Motion choice, when the device itself asks for less motion. */
.lk-motion-note { margin: -4px 14px 12px; color: var(--ovk-muted); font-size: .86rem; line-height: 1.4; }
.lk-motion-note[hidden] { display: none; }
