
/* custom theme options (corners, shadows, grid); the borders and text contrast are colour values set in applyThemeExtras */
.te-seg.n4 { grid-template-columns: repeat(4, 1fr); gap: 4px; }
.te-seg.n4 button { padding: 7px 4px; font-size: 12px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-t-shape] { --t-r: 8px; --t-rs: 6px; --t-rl: 14px; --t-pill: 8px; --t-tile: 12px; }
html[data-t-shape="square"] { --t-r: 2px; --t-rs: 2px; --t-rl: 3px; --t-pill: 2px; --t-tile: 2px; }
html[data-t-shape="soft"] { --t-r: 8px; --t-rs: 6px; --t-rl: 12px; --t-pill: 8px; --t-tile: 12px; }
html[data-t-shape="round"] { --t-r: 14px; --t-rs: 10px; --t-rl: 22px; --t-pill: 999px; --t-tile: 26px; }
html[data-t-shape] :is(.btn, .te-seg button, .fp-tabs button, .nav-tab, .snav-pill) { border-radius: var(--t-pill) !important; }
html[data-t-shape] :is(.system-input, .auth-input, .edit-input, .friends-search-bar, #chat-search-input, select.system-input) { border-radius: var(--t-r) !important; }
html[data-t-shape] :is(.channel-item, .member-row, .snav, .ctx-item, .menu-item, .um-item, .te-seg, .rail-btn.active) { border-radius: var(--t-rs) !important; }
html[data-t-shape] :is(.settings-card, #ctx-menu, #ctx-sub, #user-menu, .um-list, .vc-popover, .gl-menu, .mc-box, .dp-box, .te-box, .th-card, .fp-card, .pc-shell, dialog:not(.theme-editor-dlg), #toast-container .toast-item, #ux-tip, #reconnect-bar, #mail-bar.show, #dir-ask, #side-notes > *) { border-radius: var(--t-rl) !important; }
html[data-t-shape] #voice-call-screen #voice-stage-grid { --tile-r: var(--t-tile) !important; }
html[data-t-shape] #chat-form, html[data-t-shape] .chat-form, html[data-t-shape] #chat-input-wrap { border-radius: var(--t-rl) !important; }
html[data-t-depth] :is(#ctx-menu, #ctx-sub, #user-menu, .um-list, .vc-popover, .gl-menu, .mc-box, .dp-box, dialog:not(.theme-editor-dlg), #toast-container .toast-item, #ux-tip, #reconnect-bar, #mail-bar.show, #dir-ask) { box-shadow: var(--t-shadow) !important; }
html[data-t-depth="flat"] { --t-shadow: none; }
html[data-t-depth="soft"] { --t-shadow: 0 6px 18px rgba(0,0,0,.22); }
html[data-t-depth="deep"] { --t-shadow: 0 22px 56px rgba(0,0,0,.55), 0 4px 12px rgba(0,0,0,.35); }
html[data-t-depth="flat"] :is(.settings-card, .th-card, .fp-card) { box-shadow: none !important; }
html[data-t-grid="1"] :is(#main, .chat-view, #chat-messages) { background-image: linear-gradient(color-mix(in srgb, var(--accent) 7%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--accent) 7%, transparent) 1px, transparent 1px); background-size: 32px 32px; background-position: -1px -1px; }
