 
.ot-settings{display:grid;grid-template-columns:330px minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;gap:14px;min-height:0;max-height:calc(88vh - 100px);color:var(--ink,var(--text));font-family:inherit;font-size:13px}
.ot-settings .ot-preview-pane,.ot-settings .ot-options{min-width:0;min-height:0;overflow-y:auto;scrollbar-width:thin}
.ot-settings .ot-options{padding-right:2px}
.ot-settings .ot-preview-pane{display:grid;grid-template-rows:minmax(0,1fr);overflow:hidden;padding:10px;border:1px solid var(--line);border-radius:12px;background:var(--canvas,var(--card))}
.ot-settings .ot-preview-scroll{min-height:0;overflow-y:auto;scrollbar-width:thin}
.ot-settings section{border:1px solid var(--line);border-radius:12px;padding:10px;margin:0 0 10px;background:var(--surface,var(--card))}
.ot-settings h3{margin:0 0 8px;font-size:14px}
.ot-settings p{color:var(--muted);line-height:1.6;margin:7px 0}
.ot-settings .ot-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 10px}
.ot-settings label,.ot-settings .ot-layout-field{display:block;min-width:0}
.ot-settings label>span,.ot-settings .ot-label{display:block;margin-bottom:5px;color:var(--muted);font-size:13px}
.ot-settings input:not([type=checkbox]):not([type=color]):not([type=range]),.ot-settings select{width:100%;min-width:0;border:1px solid var(--line);border-radius:8px;padding:6px 10px;background:var(--surface,var(--card));color:inherit;font-family:Arial;font-size:13px}
.ot-settings .ot-font-size{display:flex;align-items:center;gap:8px}
.ot-settings .ot-font-size input[type=range]{flex:1;width:auto;min-width:0;max-width:220px;accent-color:var(--accent);cursor:pointer;vertical-align:middle}
.ot-settings .ot-font-size [data-font-size-value],.ot-settings .ot-font-size [data-countdown-size-value]{font-size:12px;min-width:42px;white-space:nowrap}
.ot-settings input[type=checkbox]{accent-color:var(--accent);margin:0;flex:none}
.ot-settings .ot-check,.ot-settings .ot-rule-fields>label{display:flex;align-items:center;gap:8px;font-size:13.5px;font-weight:500}
.ot-settings .ot-checks{display:flex;flex-wrap:wrap;gap:8px 12px;margin:8px 0 10px}
.ot-settings .ot-duration{display:flex;align-items:center;gap:5px}
.ot-settings .ot-duration input{min-width:0;padding-left:6px;padding-right:4px}
.ot-settings .ot-duration small{color:var(--muted);flex:none}
.ot-settings .ot-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.ot-settings .ot-rules-edit{display:grid;gap:8px;margin-bottom:10px}
.ot-settings .ot-rule-edit{border:1px solid var(--line);border-radius:10px;padding:6px 8px;background:var(--surface,var(--card))}
.ot-settings .ot-rule-head{display:flex;align-items:center;gap:7px;margin-bottom:8px}
.ot-settings .ot-rule-head .ot-rule-label{flex:1}
.ot-settings .ot-rule-head>button,.ot-settings .ot-rule-head>.ot-check{flex:none}
.ot-settings .ot-rule-order{display:flex;gap:4px;flex:none}
.ot-settings .ot-rule-fields{display:flex;align-items:center;gap:8px}
.ot-settings .ot-rule-fields select{width:76px;flex:none}
.ot-settings .ot-rule-fields .ot-duration{flex:1;min-width:0}
.ot-settings .ot-effect-input{flex:1;min-width:0}
.ot-settings .ot-random-bounds{display:grid;gap:6px}
.ot-settings .ot-random-bound{display:flex;align-items:center;gap:5px;min-width:0}
.ot-settings .ot-random-bound>span{flex:none}
.ot-settings .ot-random-bound select{width:44px;flex:none;padding-left:4px;padding-right:2px}
@media(max-width:520px){.ot-settings .ot-rule-fields .ot-random-bounds{flex-basis:100%;order:1}.ot-settings .ot-random-bound .ot-duration{min-width:0}}
.ot-settings .ot-status{font-weight:600;margin-bottom:8px}
.ot-settings .ot-preview{width:300px;max-width:100%;margin:0 auto}
.ot-settings iframe{display:block;width:300px;max-width:100%;height:160px;border:0;background:transparent;color-scheme:normal}
.ot-settings .ot-source{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:10px 2px 4px;border-top:1px solid var(--line)}
.ot-settings .ot-source-hint{flex:1;min-width:160px}
.ot-settings .ot-records{display:grid;gap:8px}
.ot-settings .ot-record{padding:9px;border:1px solid var(--line);border-radius:12px;background:var(--card-strong,var(--canvas,var(--surface)));overflow-wrap:anywhere}
.ot-settings .ot-footer{position:sticky;bottom:0;padding:8px 0 0;background:var(--surface,var(--card-strong));border-top:1px solid var(--line)}
.ot-settings .ot-footer .ot-actions{margin-top:0}
.ot-settings .ot-message{min-height:20px;color:var(--accent);margin-top:5px;font-size:12px;overflow-wrap:anywhere}
.ot-settings .ot-copy-actions{display:flex;justify-content:flex-end;flex:none;margin-left:auto}
.ot-settings .ot-copy-actions button{white-space:nowrap}
.ot-settings .ot-theme-row,.ot-settings .ot-color-panel{margin-top:10px}
.ot-settings .ot-themes,.ot-settings .ot-layouts{flex-wrap:wrap}
.ot-settings .ot-layouts{margin:0}
.ot-settings .ot-color{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:8px}
.ot-settings .ot-color input{width:44px;height:30px;border:1px solid var(--line);padding:2px;background:transparent;border-radius:6px}
.ot-settings .ot-color-value{color:var(--muted)}
.ot-settings .ot-help{font-size:12px}
.ot-settings .ot-icon{width:32px;height:32px;object-fit:contain;flex:none}
.ot-settings .ot-rule-label,.ot-settings .ot-record{display:flex;align-items:center;gap:8px;min-width:0}
.ot-settings .ot-rule-label>div,.ot-settings .ot-record>div{min-width:0;flex:1}
.ot-settings .ot-icon[hidden]{display:none}
.ot-settings .ot-rule-meta,.ot-settings .ot-record-user{display:block;margin-top:3px;color:var(--muted);font-size:12px;line-height:1.4}
.ot-settings .ot-record-gift{margin-top:3px;line-height:1.45}
.ot-settings .ot-delta{display:block;margin-top:5px;font-size:16px;line-height:1.35;font-weight:700}
.ot-settings .plus{color:var(--ot-plus,var(--accent))}
.ot-settings .minus{color:var(--ot-minus,var(--green,var(--sage,#217b55)))}
.ot-settings .ot-record-reason{margin-top:5px;color:var(--muted);font-size:12px;line-height:1.5}
.ot-settings .ot-gift-picker{width:min(880px,calc(100vw - 32px));height:78vh;max-height:78vh;margin:auto;padding:16px;border:1px solid var(--line);border-radius:18px;background:var(--surface,var(--card));color:inherit;box-shadow:var(--shadow-pop,0 12px 48px #0005)}
.ot-settings .ot-gift-picker[open]{display:flex;flex-direction:column}
.ot-settings .ot-gift-picker::backdrop{background:var(--t-scrim,rgba(0,0,0,.45));backdrop-filter:blur(3px)}
.ot-settings .ot-picker-head{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.ot-settings .ot-picker-head h3{margin:0}
.ot-settings .ot-picker-count{color:var(--muted);font-size:12px;flex:1}
.ot-settings .ot-candidates{min-height:0;flex:1;display:grid;gap:8px;align-content:start;overflow-y:auto;padding-right:2px;grid-template-columns:repeat(auto-fill,minmax(168px,1fr))}
.ot-settings .ot-candidate .ic:has(img:not([hidden])) .ot-fallback{display:none}
.ot-settings .ot-candidate .ot-fallback{width:20px;height:20px}
.ot-settings .ot-candidate img[hidden]{display:none}
.modal-box.ot-panel-box{width:960px;max-width:94vw;max-height:88vh;overflow:hidden}
.ot-panel-box .ot-settings{padding:0;flex:1}
dialog:has(.ot-settings){width:min(960px,calc(100vw - 32px));overflow:hidden}
dialog .ot-settings{font-size:12px;max-height:62vh}
dialog .ot-settings h3{font-size:13px}
dialog .ot-settings label>span,dialog .ot-settings .ot-label,dialog .ot-settings .ot-help{font-size:11.5px}
dialog .ot-settings input:not([type=checkbox]):not([type=color]):not([type=range]),dialog .ot-settings select{font-family:inherit;font-size:inherit;padding:7px 9px;border-radius:9px}
dialog .ot-settings .ot-check,dialog .ot-settings .ot-rule-fields>label{font-size:12.5px}
dialog .ot-settings .wishgift-bar{display:flex;flex-direction:column;gap:8px;margin-bottom:10px}
dialog .ot-settings .wishgift-chips{display:flex;flex-wrap:wrap;gap:6px}
dialog .ot-settings .wishgift-chips button{font-size:12px;padding:4px 10px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--ink);min-height:0}
dialog .ot-settings .wishgift-chips button.on{background:var(--accent);border-color:var(--accent);color:var(--t-on-accent)}
dialog .ot-settings .wishgift-foot{margin-top:10px;padding-top:10px;border-top:1px solid var(--line)}
dialog .ot-settings .ot-candidate{display:flex;align-items:center;gap:8px;padding:7px 9px;border:1px solid var(--line);border-radius:12px;background:var(--surface);cursor:pointer;text-align:left;min-width:0;color:var(--ink)}
dialog .ot-settings .ot-candidate:hover,dialog .ot-settings .ot-candidate.on{background:var(--t-sage-pale);border-color:var(--accent)}
dialog .ot-settings .ot-candidate .ic{position:relative;width:34px;height:34px;flex:none;border-radius:8px;background:var(--canvas);display:flex;align-items:center;justify-content:center;overflow:hidden}
dialog .ot-settings .ot-candidate .ic img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
dialog .ot-settings .ot-candidate .nm{flex:1;min-width:0;font-size:12.5px;line-height:1.3;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:break-all}
dialog .ot-settings .ot-candidate .src{font-size:10px;padding:1px 6px;border-radius:999px;border:1px solid var(--line);color:var(--muted);white-space:nowrap}
dialog .ot-settings .wishgift-empty{grid-column:1/-1;color:var(--muted);text-align:center;padding:26px 0}
@media(max-width:900px){dialog:has(.ot-settings){width:min(640px,calc(100vw - 32px));overflow:auto}dialog .ot-settings{display:block;max-height:none}dialog .ot-settings .ot-preview-pane{max-height:58vh}dialog .ot-settings .ot-options{overflow:visible;margin-top:12px}}
@media(max-width:767px){.modal-box.ot-panel-box{overflow:auto}.ot-panel-box .ot-settings{display:block;max-height:none}.ot-panel-box .ot-preview-pane{max-height:58vh}.ot-panel-box .ot-options{overflow:visible;margin-top:12px}}
@media(max-width:520px){.ot-settings .ot-preview-pane{padding:6px}.ot-settings .ot-fields{grid-template-columns:1fr}.ot-settings .ot-rule-fields{flex-wrap:wrap}.ot-settings .ot-rule-fields .ot-duration{min-width:170px}.ot-settings .ot-rule-head{align-items:flex-start;flex-wrap:wrap}}
