.advanced-row { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.advanced-row h3 { margin:0; margin-right:auto; }
.scene-quick-add { position:absolute; top:max(10px,env(safe-area-inset-top)); right:max(10px,env(safe-area-inset-right)); z-index:6; min-width:88px; min-height:44px; padding:8px 12px; border:1px solid #ba8caa; border-radius:10px; background:#211526ed; color:#fff; font:inherit; font-size:14px; font-weight:600; cursor:pointer; touch-action:manipulation; }
.scene-quick-add:hover:not(:disabled), .scene-quick-add:active:not(:disabled) { background:#493050; }
.scene-quick-add:focus-visible { outline:2px solid #ffc7e0; outline-offset:2px; }
.scene-quick-add:disabled { opacity:.5; cursor:default; }
#watchStage:fullscreen.controls-idle .scene-quick-add { opacity:0; pointer-events:none; }
.advanced-list { list-style:none; padding:0; margin:12px 0 0; display:grid; gap:8px; max-height:360px; overflow:auto; }
.advanced-list li { display:flex; align-items:center; flex-wrap:wrap; gap:8px; border:1px solid var(--border, #554448); border-radius:12px; padding:8px; }
.advanced-list .scene-jump { display:flex; flex:1; gap:12px; align-items:center; text-align:left; background:transparent; color:inherit; border:0; min-width:0; min-height:44px; cursor:pointer; }
.scene-jump time { font-variant-numeric:tabular-nums; flex-shrink:0; }
.scene-jump span { overflow-wrap:anywhere; }
.scene-type-badge { display:block; flex:none; color:var(--accent, #ff74ad); }
.scene-custom-icon { position:relative; width:36px; height:32px; background:#251b29; border:1px solid #93677d; border-radius:6px; color:#ff9fc8; box-sizing:border-box; }
/* Original PNGs remain untouched. A uniform rose silhouette works in either theme. */
.scene-custom-icon > img { position:absolute; inset:3px; display:block; width:calc(100% - 6px); height:calc(100% - 6px); object-fit:contain; opacity:0; pointer-events:none; filter:brightness(0) saturate(100%) invert(78%) sepia(24%) saturate(1402%) hue-rotate(292deg) brightness(106%) contrast(102%); }
.scene-custom-icon > svg { width:100%; height:100%; }
.scene-custom-icon > img[hidden] { display:none; }
.scene-custom-icon.is-loaded > img { opacity:1; }
.scene-custom-icon.is-loaded > svg { visibility:hidden; }
.scene-type-preview { display:flex; align-items:center; gap:10px; min-height:44px; }
.scene-type-preview { flex-wrap:wrap; overflow-wrap:anywhere; }
.scene-icon-set { display:inline-flex; flex-wrap:wrap; align-items:center; gap:4px; max-width:100%; }
.scene-icon-set, .scene-marker-group, .scene-tip-icons { background:#251b29; box-shadow:inset 0 0 0 1px #93677d; border-radius:6px; color:#ff9fc8; }
/* One surface per combined scene, not one separate tile per type. */
:is(.scene-icon-set,.scene-marker-group,.scene-tip-icons) .scene-custom-icon { background:transparent; border:0; border-radius:0; }
:is(.scene-icon-set,.scene-marker-group,.scene-tip-icons) .scene-type-badge { color:#ff9fc8; }
:is(.scene-icon-set,.scene-marker-group,.scene-tip-icons) .scene-type-badge rect { fill:none; stroke:none; }
.scene-jump .scene-icon-set, .timeline-scene-list .scene-icon-set, #remoteSceneList .scene-icon-set { flex:0 1 116px; min-width:36px; }
.scene-type-preview[hidden] { display:none; }
#sceneTypeHint { margin:0; font-size:13px; line-height:1.5; }
.scene-type-picker { min-width:0; margin:0; padding:0; border:0; }
.scene-type-picker legend { padding:0; margin-bottom:8px; }
.scene-type-options { position:relative; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; max-height:272px; overflow:auto; overscroll-behavior:contain; padding:4px; scrollbar-gutter:stable; }
.advanced-form .scene-type-option { display:grid; grid-template-columns:16px 38px minmax(0,1fr); align-items:center; gap:8px; min-width:0; min-height:60px; padding:8px; border:1px solid var(--line-strong,#78676e); border-radius:10px; background:var(--surface-solid,#241f23); color:var(--ink,#fff); cursor:pointer; touch-action:manipulation; overflow-wrap:anywhere; font-size:14px; line-height:1.35; box-sizing:border-box; }
.advanced-form .scene-type-option input { width:16px; height:16px; min-height:0; margin:0; padding:0; accent-color:var(--accent,#ff74ad); }
.scene-type-option-icon { display:flex; align-items:center; justify-content:center; min-width:0; }
.scene-type-option { -webkit-tap-highlight-color:transparent; }
.scene-type-option:has(input:checked) { border-color:var(--accent,#ff74ad); box-shadow:inset 0 0 0 1px var(--accent,#ff74ad); background:var(--accent-soft,#442936); }
.scene-type-option:has(input:focus-visible) { outline:2px solid var(--accent,#ff74ad); outline-offset:1px; }
.scene-type-option:active { background:var(--surface-hot,#443440); }
.scene-type-picker:disabled { opacity:.6; }
.scene-type-picker:disabled .scene-type-option { cursor:not-allowed; }
@media(min-width:600px) { .scene-type-options { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:480px) {
  .advanced-form .scene-type-option { grid-template-columns:14px 32px minmax(0,1fr); gap:6px; padding:6px; }
  .advanced-form .scene-type-option input { width:14px; height:14px; }
  .scene-type-option-icon .scene-type-badge { width:32px; height:30px; }
}
@media(max-width:360px) { .scene-type-options { grid-template-columns:minmax(0,1fr); } }
.advanced-list .current-scene { border-color:var(--accent, #ff5268); background:rgb(255 82 104 / 10%); }
.advanced-form { display:grid; gap:16px; }
.advanced-form label { display:grid; gap:8px; }
.advanced-form input, .advanced-form textarea, .advanced-form select { box-sizing:border-box; width:100%; padding:12px; font:inherit; font-size:16px; color:inherit; background:#241f23; border:1px solid #78676e; border-radius:8px; }
.advanced-dialog button, .advanced-scenes button { min-height:44px; }
#advancedError { color:#ffadb8; overflow-wrap:anywhere; }
.advanced-dialog { max-width:min(680px, calc(100vw - 24px)); }
.advanced-dialog .advanced-list p { overflow-wrap:anywhere; }
.admin-care, .advanced-dialog .advanced-list li { overflow-wrap:anywhere; min-width:0; }
.duplicate-group { border:1px solid var(--line-strong); border-radius:12px; padding:12px; min-width:0; }
.duplicate-group h3 { font-size:15px; margin:0 0 8px; }
.duplicate-copy { padding:12px 0; border-bottom:1px solid var(--line); min-width:0; }
.duplicate-copy:last-child { border-bottom:0; }
.duplicate-copy p,.duplicate-path { overflow-wrap:anywhere; }
.duplicate-copy p { margin:0 0 8px; }
.advanced-form .confirm-check { display:flex; align-items:flex-start; gap:12px; line-height:1.6; }
.advanced-form .confirm-check input { flex:none; width:20px; height:20px; min-height:0; margin:3px 0 0; accent-color:var(--accent); }
.pair-code { font-size:clamp(28px,8vw,48px); letter-spacing:.15em; font-variant-numeric:tabular-nums; text-align:center; }
.advanced-dialog :focus-visible, .advanced-scenes :focus-visible { outline:2px solid #ffbdc5; outline-offset:3px; }
.comfort-tools summary { cursor:pointer; padding:8px 0; min-height:44px; }
.comfort-tools .advanced-row { margin-top:12px; }
.comfort-tools button, .comfort-tools select { min-height:44px; }
.comfort-tools select { color:inherit; background:#241f23; border:1px solid #78676e; border-radius:8px; padding:8px; font-size:16px; }
.precise-seek { padding:12px 4px; }
.precise-seek label { display:flex; justify-content:space-between; }
.precise-seek input { width:100%; height:44px; accent-color:#ed536b; touch-action:pan-y; }
#seekPreview { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
#seekPreview[hidden], #touchShield[hidden], #oneHandDock[hidden] { display:none; }
#seekPreview img { max-width:100%; object-fit:contain; border-radius:8px; }
#watchStage { position:relative; }
.card-actions { flex-wrap:wrap; }
.card-actions .delete-video-button { min-height:44px; }
.action-menu [data-feature-action="trash-video"] { border-color:var(--danger); color:var(--danger); margin-top:8px; }
.advanced-dialog [data-advanced="purge-file"] { color:var(--danger,#f8a6b5); border-color:currentColor; margin:8px 0 0 8px; min-height:44px; }
html[data-theme="light"] .advanced-dialog [data-advanced="purge-file"] { color:#96304d; }
#touchShield { position:absolute; inset:0; z-index:30; display:flex; justify-content:center; align-items:flex-start; padding:12px; background:transparent; touch-action:none; }
#unlockTouch { background:#201c22; }
#oneHandDock { display:none; }
#discreetScreen { border:0; border-radius:0; width:100vw; max-width:100vw; height:100dvh; max-height:100dvh; inset:0; margin:0; background:#20252b; color:white; text-align:center; padding:30vh 16px 16px; box-sizing:border-box; }
#discreetScreen::backdrop { background:#20252b; }
body.discreet { background:#20252b !important; }
body.discreet > :not(#discreetScreen) { visibility:hidden !important; }
@media(max-width:760px) {
  #oneHandDock:not([hidden]) { position:fixed; display:flex; gap:8px; z-index:90; bottom:calc(12px + env(safe-area-inset-bottom)); right:12px; left:12px; justify-content:flex-end; pointer-events:none; }
  #oneHandDock button { pointer-events:auto; min-height:48px; min-width:44px; padding:8px; color:#fff; background:#30232b; border:1px solid #b98797; border-radius:12px; }
  body[data-one-hand=left] #oneHandDock { justify-content:flex-start; }
  body.has-one-hand .watch-page { padding-bottom:90px; }
  .comfort-tools .advanced-row > button { flex:1 1 145px; }
}
