.gr-dialog{--gr-bg:#fcfcfa;--gr-ink:#202620;--gr-muted:#62695f;--gr-line:rgba(32,40,32,.15);--gr-soft:#fff9df;width:min(640px,calc(100vw - 32px));max-height:85dvh;margin:auto;padding:24px;border:1px solid var(--gr-line);border-radius:20px;background:var(--gr-bg);color:var(--gr-ink);box-shadow:0 20px 70px rgba(30,38,28,.2);overflow:auto}
.gr-dialog::backdrop{background:rgba(25,30,26,.45)}.gr-dialog header,.gr-dialog footer{display:flex;align-items:center;justify-content:space-between;gap:12px}.gr-dialog h2{font-size:20px;margin:0}.gr-dialog p,.gr-dialog small{color:var(--gr-muted);line-height:1.7}.gr-dialog p{font-size:14px}.gr-dialog button{cursor:pointer;min-height:38px;padding:8px 12px;border:1px solid var(--gr-line);border-radius:10px;background:var(--gr-bg);color:var(--gr-ink);font:inherit}.gr-dialog button:focus-visible,.gr-dialog input:focus-visible{outline:2px solid var(--gr-ink);outline-offset:2px}.gr-options{max-height:45dvh;overflow-y:auto;margin:16px 0;display:grid;gap:8px}.gr-dialog .gr-option{display:flex;align-items:center;gap:12px;text-align:left;min-height:72px}.gr-option img{width:60px;height:48px;object-fit:contain;border-radius:6px}.gr-option>svg{flex-shrink:0}.gr-option>span{flex:1;min-width:0;overflow-wrap:anywhere}.gr-option small{display:block;font-size:12px}.gr-option[aria-pressed=true]{background:var(--gr-soft);border-color:var(--gr-muted)}.gr-dialog button:disabled{opacity:.5}.gr-dialog footer{font-size:14px}.gr-dialog footer button{background:#f6cb19}
.gr-chips{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 10px}.gr-chips button{display:flex;align-items:center;gap:6px;max-width:100%;padding:5px 8px;border:1px solid rgba(32,40,32,.12);border-radius:8px;background:#fff9df;font-size:12px;color:#202620;min-height:28px}.gr-chips button>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:230px}.gr-chips svg{flex-shrink:0}.iw-setting-buttons>.gr-trigger{font-size:12px;min-width:38px}.gr-dialog button:hover{filter:brightness(.98)}.gr-dialog button:active{transform:scale(.98)}
@media(prefers-reduced-motion:reduce){.gr-dialog button:active{transform:none}}
.gr-chip{display:inline-flex;max-width:100%;align-items:center;border:1px solid var(--iw-line,rgba(43,49,37,.14));border-radius:9px;background:var(--iw-selected,#fff8dc)}.gr-chip select{width:82px;max-width:82px;flex:none;font:inherit;font-size:10px;background:transparent;border:0;border-left:1px solid var(--iw-line,rgba(43,49,37,.14));padding:4px;color:inherit}.gr-chip button{min-width:0}.gr-chip select:focus-visible{outline:2px solid currentColor;outline-offset:2px}
/* finesse · redesign · existing PIKA surface and focus tokens · reference selection */
 .gr-options .gr-group{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;grid-column:1/-1;min-width:0}
 .gr-group h3{grid-column:1/-1;margin:12px 0 2px;font-size:14px;font-weight:500;color:var(--muted,#5b6258)}
 @media(max-width:600px){.gr-options .gr-group{grid-template-columns:minmax(0,1fr)}}

.gr-dialog .gr-option{min-width:0;max-width:100%;overflow:hidden}
.gr-dialog .gr-option img{flex:0 0 60px;min-width:0}
.gr-dialog .gr-option>.gr-video-thumbnail{flex:0 0 60px;width:60px;height:60px;display:flex;align-items:center;justify-content:center;background:transparent;border:0}
.gr-dialog .gr-video-thumbnail img{flex:0 1 auto;width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain;border-radius:8px;background:transparent;border:0}
.gr-dialog .gr-option-copy{display:block;flex:1;min-width:0;overflow:hidden}
.gr-dialog .gr-option-title{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gr-dialog .gr-option.is-timeline{grid-column:1/-1}

/* All @ pickers share a non-modal, top-layer panel anchored to the composer. */
.gr-popover{position:fixed;inset:auto;margin:0;box-sizing:border-box;padding:16px;border-radius:18px;overflow:hidden;transform-origin:bottom center;outline:none}
.gr-popover:popover-open{display:flex;flex-direction:column;animation:gr-rise .18s ease-out}
.gr-popover::backdrop{background:transparent;pointer-events:none}
.gr-popover header,.gr-popover footer{flex:none}
.gr-popover h2{font-size:16px;font-weight:500}
.gr-dialog header>button{display:grid;place-items:center;min-width:40px;min-height:40px;padding:8px;border:0;background:transparent;box-shadow:none}
.gr-popover .gr-options{min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain;margin:8px -4px 12px;padding:0 4px 4px;gap:8px}
.gr-popover .gr-group h3{margin:4px 0;font-size:13px}
.gr-dialog .gr-option{min-height:84px;border-color:transparent;background:transparent;transition:background .16s ease,transform .16s ease}
.gr-dialog .gr-option:hover{background:#f2f3ef;filter:none}
.gr-dialog .gr-option[aria-pressed=true]{background:#f2f3ef;border-color:transparent}
.gr-dialog .gr-option:active:not(:disabled){transform:scale(.99);transition-duration:90ms}
.gr-dialog button.gr-confirm{background:#f6cb19;color:var(--gr-ink);border:0;filter:none;box-shadow:none;transform:none;transition:transform .16s ease}
@media(hover:hover) and (pointer:fine){.gr-dialog button.gr-confirm:hover:not(:disabled){background:#f6cb19;color:var(--gr-ink);border:0;filter:none;box-shadow:none;transform:scale(1.035)}}
.gr-dialog button.gr-confirm:active:not(:disabled){background:#f6cb19;color:var(--gr-ink);border:0;filter:none;box-shadow:none;transform:scale(.97);transition-duration:90ms}
.gr-dialog button.gr-confirm:disabled{transform:none;filter:none;box-shadow:none}
@media(prefers-reduced-motion:reduce){.gr-dialog button.gr-confirm,.gr-dialog .gr-option{transition:none}.gr-dialog button.gr-confirm:is(:hover,:active):not(:disabled),.gr-dialog .gr-option:active:not(:disabled){transform:none}}
.gr-dialog .gr-option>.gr-selection{flex:0 0 18px;width:18px;height:18px;box-sizing:border-box;border:1.5px solid #999e96;border-radius:50%;display:grid;place-items:center;color:#1c211b}
.gr-dialog .gr-option[aria-pressed=true]>.gr-selection{background:#f6cb19;border-color:#f6cb19}
.gr-dialog .gr-option>.gr-selection>svg{width:10px;height:10px;flex:none}
.gr-dialog button:disabled{cursor:not-allowed}
@keyframes gr-rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:600px){.gr-popover{padding:12px}.gr-popover footer{font-size:12px}}
@media(prefers-reduced-motion:reduce){.gr-popover:popover-open{animation:none}.gr-dialog .gr-option{transition:none}}
/* Match the adjacent composer setting popovers, including form and footer copy. */
.gr-dialog.gr-popover{font-size:10px}
.gr-dialog.gr-popover :is(h2,h3,p,small,input,button,footer){font-size:10px;font-weight:400}
.gr-dialog.gr-popover button.gr-confirm{font-size:12px}
.gr-dialog footer>span[aria-live]{color:var(--gr-muted)}
/* Narrow video reference panel: keep filenames usable. */
.gr-popover.is-compact .gr-group{grid-template-columns:minmax(0,1fr)}
/* No title/upload row in the shared reference picker. */
.gr-popover .gr-options{margin-top:0}
.gr-dialog .gr-option[aria-disabled=true]{opacity:.5;cursor:not-allowed}
.gr-dialog .gr-option[aria-disabled=true]:is(:hover,:active){transform:none;background:transparent}
.gr-plan-option{min-width:0;display:grid;align-content:start;gap:4px}
.gr-plan-option>.gr-option{width:100%}
.gr-plan-scope{display:flex;align-items:center;gap:8px;padding:0 12px 8px;color:var(--gr-muted)}
.gr-plan-scope>.ui-select{flex:1;min-width:0}
.gr-plan-scope .ui-select-trigger{width:100%;min-width:0}
.gr-plan-scope .ui-select-trigger>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
