/* Discord-style per-text effects (Customer) */

.styled-text {
    display: inline-block;
    max-width: 100%;
    line-height: 1.2;
    font-family: var(--ts-font-family) !important;
}

.styled-text.ts-effect-minimal { color: var(--ts-color) !important; }

.styled-text.ts-effect-gradient {
    background: linear-gradient(90deg, var(--ts-color), var(--ts-color2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent !important;
}

.styled-text.ts-effect-gummy {
    background: linear-gradient(180deg, var(--ts-grad-stops, var(--ts-color), var(--ts-color2)));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent !important;
    filter: saturate(1.25);
}

.styled-text.ts-effect-prism {
    background: linear-gradient(90deg, var(--ts-grad-stops, var(--ts-color), var(--ts-color2)));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent !important;
    animation: ts-prism-shift 4s linear infinite;
}
.styled-text.ts-effect-neon {
    color: var(--ts-color) !important;
    text-shadow:
        0 0 4px color-mix(in srgb, var(--ts-color) 80%, transparent),
        0 0 12px color-mix(in srgb, var(--ts-color) 60%, transparent),
        0 0 24px color-mix(in srgb, var(--ts-color) 40%, transparent);
}

.styled-text.ts-effect-cartoon {
    color: var(--ts-color) !important;
    -webkit-text-stroke: 2px color-mix(in srgb, var(--ts-color) 30%, #000);
    paint-order: stroke fill;
    text-shadow: 0 2px 0 color-mix(in srgb, var(--ts-color) 50%, #000);
}

.styled-text.ts-effect-highlight {
    color: #fff !important;
    text-shadow:
        0.06em 0.06em 0 var(--ts-color),
        -0.03em -0.03em 0 var(--ts-color),
        0.03em -0.03em 0 color-mix(in srgb, var(--ts-color) 70%, #000);
}

@keyframes ts-prism-shift {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.styled-text.ts-anim-flashing {
    animation: ts-flash var(--ts-speed, 300ms) steps(1, end) infinite;
}

@keyframes ts-flash {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0.15; }
}

.styled-text .ts-anim-inner {
    display: inline;
}

div.styled-text.bio,
div.styled-text.location,
div.styled-text.reveal-text {
    display: block;
}

.profile-page h1.username {
    position: relative;
}

.profile-page h1.username.has-sparkles::before {
    content: '';
    position: absolute;
    inset: -6px -10px;
    background-image: var(--username-sparkle);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    z-index: 0;
}

.profile-page h1.username .styled-text {
    display: inline-block;
    position: relative;
    z-index: 1;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    vertical-align: baseline;
}

.profile-page .bio.styled-text,
.profile-page .location.styled-text,
.profile-page .reveal-text.styled-text {
    display: block;
}

.profile-page .tag.styled-text,
.profile-page .discord-presence-name .styled-text,
.profile-page .discord-presence-clan-tag .styled-text,
.profile-page .player-title .styled-text,
.profile-page .player-time-cur.styled-text,
.profile-page .player-time-dur.styled-text,
.profile-page .top-player-title .styled-text,
.profile-page .top-player-time.styled-text,
.profile-page .corner-stat-pill .styled-text,
.profile-page .corner-stat-tip.styled-text,
.profile-page .join-date .styled-text,
.profile-page .link-tip-text.styled-text,
.profile-page .link-box-meta .styled-text,
.profile-page .link-card-meta .styled-text,
.profile-page .badge-tip.styled-text,
.profile-page .watermark .styled-text {
    display: inline-block;
}

/* Only clip text for gradient-based effects (not minimal/neon/etc.) */
.profile-page .styled-text.ts-effect-gradient,
.profile-page .styled-text.ts-effect-gummy,
.profile-page .styled-text.ts-effect-prism {
    background-repeat: no-repeat;
    background-origin: border-box;
}

/* Dashboard editor */
.ts-extras-form.card {
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(88, 101, 242, 0.35);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

.text-styles-editor {
    background: linear-gradient(145deg, #181820, #141414);
}

.text-styles-editor button {
    -webkit-appearance: none;
    appearance: none;
}

.ts-editor-layout {
    display: grid;
    grid-template-columns: 1fr min(360px, 40%);
    gap: 0;
    min-height: 520px;
}

@media (max-width: 960px) {
    .ts-editor-layout { grid-template-columns: 1fr; }
}

.ts-editor-panel {
    padding: 20px 22px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.ts-editor-head {
    margin-bottom: 16px;
}

.ts-editor-title {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.ts-editor-sub {
    margin: 0;
    font-size: 12px;
    color: var(--muted, #9aa0a6);
    line-height: 1.45;
}

.ts-editor-preview {
    padding: 20px;
    background:
        radial-gradient(ellipse at 70% 20%, rgba(120, 140, 255, 0.14), transparent 50%),
        radial-gradient(ellipse at 20% 90%, rgba(40, 60, 100, 0.2), transparent 45%),
        #0a0a0c;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ts-target-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.ts-target-tab {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(17, 17, 17, 0.55);
    color: #f0f0f0;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.12s;
    line-height: 1.2;
}

.ts-target-tab:hover { transform: translateY(-1px); }

.ts-target-tab.active {
    border-color: #5865f2;
    background: rgba(88, 101, 242, 0.22);
    box-shadow: 0 0 0 1px rgba(88, 101, 242, 0.35);
}

.glass-pill.ts-enable-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(17, 17, 17, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 13px;
    color: #f0f0f0;
}

.ts-section {
    margin-bottom: 18px;
    transition: opacity 0.2s;
}

.ts-section.is-disabled,
.ts-editor-actions.is-disabled {
    opacity: 0.38;
    pointer-events: none;
}

.ts-section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    color: color-mix(in srgb, currentColor 88%, #5865f2);
}

.ts-section-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    font-size: 11px;
    background: color-mix(in srgb, #5865f2 18%, transparent);
    border: 1px solid color-mix(in srgb, #5865f2 30%, transparent);
}

.ts-font-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    max-height: 240px;
    overflow: auto;
    padding-right: 4px;
}

.ts-font-btn {
    min-height: 64px;
    border: 2px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(17, 17, 17, 0.55);
    color: #f0f0f0;
    cursor: pointer;
    position: relative;
    padding: 6px 4px 4px;
    transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s;
}

.ts-font-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(88, 101, 242, 0.55);
}

.ts-font-btn.active {
    border-color: #5865f2;
    box-shadow: 0 0 0 1px rgba(88, 101, 242, 0.4), 0 6px 16px rgba(88, 101, 242, 0.18);
}

.ts-font-preview {
    display: block;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.1;
}

.ts-font-label {
    display: block;
    margin-top: 4px;
    font-size: 9px;
    opacity: 0.65;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.ts-effect-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.ts-effect-btn {
    border: 2px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(17, 17, 17, 0.55);
    color: #f0f0f0;
    cursor: pointer;
    position: relative;
    min-height: 58px;
    padding: 8px 6px 6px;
    text-align: center;
    transition: border-color 0.15s, transform 0.12s;
}

.ts-effect-btn:hover { transform: translateY(-1px); }

.ts-effect-btn.active {
    border-color: #5865f2;
    box-shadow: 0 0 0 1px rgba(88, 101, 242, 0.35);
}

.ts-effect-preview {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}

.ts-effect-name {
    display: block;
    font-size: 10px;
    opacity: 0.75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ts-color-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ts-gradient-color-picks {
    display: contents;
}

.ts-color-main[hidden],
.ts-color-custom[hidden] {
    display: none !important;
}

.ts-color-main,
.ts-color-custom {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.14);
    cursor: pointer;
    padding: 0;
    transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
    flex-shrink: 0;
}

.ts-color-main[data-ts-color-slot].active {
    border-color: #5865f2;
    box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.35);
}

.ts-color-main:hover,
.ts-color-custom:hover { transform: scale(1.05); }

.ts-color-custom {
    background: rgba(255, 255, 255, 0.08);
    color: #f0f0f0;
    display: grid;
    place-items: center;
}

.ts-color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.ts-color-swatch {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    transition: transform 0.12s;
}

.ts-color-swatch:hover { transform: scale(1.08); }

.ts-color-swatch.active {
    border-color: #fff;
    box-shadow: 0 0 0 2px #5865f2;
}

.ts-gradient-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ts-gradient-swatch {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    transition: transform 0.12s;
}

.ts-gradient-swatch:hover { transform: scale(1.05); }

.ts-gradient-swatch.active {
    border-color: #fff;
    box-shadow: 0 0 0 2px #5865f2;
}

.ts-custom-grad-bar {
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.ts-custom-grad-stops {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ts-grad-stop-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    cursor: pointer;
    padding: 0;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.85);
    transition: transform 0.12s, box-shadow 0.15s;
}

.ts-grad-stop-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.ts-grad-stop-btn.active {
    border-color: #fff;
    box-shadow: 0 0 0 2px #5865f2;
}

.ts-custom-grad-hint {
    margin: 8px 0 0;
    font-size: 11px;
    color: var(--muted, #888);
}

.ts-anim-stack {
    display: grid;
    gap: 12px;
}

.ts-speed-field {
    margin: 0;
}

.ts-speed-field .speed-head {
    margin-bottom: 0.45rem;
}

.ts-speed-field .field-label {
    font-size: 12px;
    color: var(--muted, #888);
}

.ts-select {
    width: 100%;
    border-radius: 10px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(17, 17, 17, 0.65);
    color: #f0f0f0;
}

.ts-editor-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.ts-surprise-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(17, 17, 17, 0.55);
    color: #f0f0f0;
    border-radius: 10px;
    padding: 9px 14px;
    cursor: pointer;
    font-size: 13px;
    transition: border-color 0.15s, transform 0.12s;
}

.ts-surprise-btn:hover {
    border-color: rgba(88, 101, 242, 0.55);
    transform: translateY(-1px);
}

.ts-preview-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #949ba4;
}

/* Mini link-in-bio / vizitka preview */
.ts-preview-stage {
    position: relative;
    border-radius: 18px;
    overflow: visible;
    min-height: 480px;
    padding: 24px 16px 20px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #0a0a0c;
}

.ts-preview-stage-bg {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.08), transparent 55%),
        linear-gradient(160deg, #1a1c24 0%, #0d0e12 55%, #12141c 100%);
}

.ts-preview-stage.light {
    background: #eceff5;
    border-color: rgba(0, 0, 0, 0.06);
}

.ts-preview-stage.light .ts-preview-stage-bg {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.9), transparent 50%),
        linear-gradient(160deg, #e8ecf4 0%, #d5dae6 55%, #eceff5 100%);
}

.ts-preview-stage-glow {
    position: absolute;
    inset: -15% -10% auto;
    height: 50%;
    background: radial-gradient(ellipse at center, rgba(100, 120, 255, 0.2), transparent 70%);
}

.ts-preview-stage.light .ts-preview-stage-glow {
    background: radial-gradient(ellipse at center, rgba(120, 140, 220, 0.16), transparent 70%);
}

.ts-preview-card-wrap {
    position: relative;
    z-index: 2;
    width: min(100%, 268px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
}

.ts-preview-box {
    position: relative;
    width: 100%;
    padding: 38px 16px 16px;
    border-radius: 18px;
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
    box-sizing: border-box;
    overflow: visible;
}

.ts-preview-stage.light .ts-preview-box {
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 12px 32px rgba(40, 50, 80, 0.12);
}

/* Corner stats — top-right like profile */
.ts-preview-corner-stats {
    position: absolute;
    top: 10px;
    right: 10px;
    left: auto;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 4;
    pointer-events: none;
}

.ts-preview-stat {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.ts-preview-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 10px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.88);
}

.ts-preview-stage.light .ts-preview-stat-pill {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    color: #222;
}

.ts-preview-stat-ico {
    opacity: 0.8;
    flex-shrink: 0;
    color: inherit;
}

.ts-preview-stat-hash {
    width: 11px;
    height: 11px;
}

.ts-preview-stat-tip {
    pointer-events: none;
    position: absolute;
    left: 50%;
    top: calc(100% + 6px);
    bottom: auto;
    transform: translateX(-50%) translateY(2px) scale(0.96);
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: #000;
    color: #fff;
    font-size: 9px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.15s, transform 0.15s;
    z-index: 6;
}

.ts-preview-stat-tip.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
}

/* Identity block */
.ts-preview-identity {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 4px;
}

.ts-preview-avatar-wrap {
    width: 56px;
    height: 56px;
    margin: 0 auto 8px;
    flex-shrink: 0;
}

.ts-preview-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2), 0 6px 14px rgba(0, 0, 0, 0.3);
    background: #2a2a32;
}

.ts-preview-stage.light .ts-preview-avatar {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 4px 12px rgba(60, 70, 120, 0.15);
}

.ts-preview-identity-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    width: 100%;
}

.ts-preview-username {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    color: #f4f4f5;
    word-break: break-word;
}

.ts-preview-stage.light .ts-preview-username:not(.styled-text) {
    color: #16181d;
}

.ts-preview-badges-row {
    display: flex;
    justify-content: center;
    margin-top: 6px;
    position: relative;
    z-index: 3;
}

.ts-preview-badge-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}

.ts-preview-badge-ico {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: linear-gradient(135deg, #5865f2, #57f287);
    display: block;
}

.ts-preview-badge-tip {
    pointer-events: none;
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(3px) scale(0.96);
    white-space: nowrap;
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: #000;
    color: #fff;
    font-size: 9px;
    font-weight: 500;
    opacity: 0;
    z-index: 8;
    transition: opacity 0.15s, transform 0.15s;
}

.ts-preview-badge-item.show-tip .ts-preview-badge-tip {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
}

.ts-preview-bio {
    margin-top: 0.35rem;
    font-size: 0.75rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.62);
    word-break: break-word;
}

.ts-preview-stage.light .ts-preview-bio:not(.styled-text) {
    color: rgba(30, 34, 44, 0.62);
}

.ts-preview-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin-top: 8px;
}

.ts-preview-tag {
    display: inline-flex;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
}

.ts-preview-stage.light .ts-preview-tag:not(.styled-text) {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.08);
    color: #333;
}

.ts-preview-location,
.ts-preview-join {
    margin-top: 6px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
}

.ts-preview-stage.light .ts-preview-location:not(.styled-text),
.ts-preview-stage.light .ts-preview-join {
    color: rgba(30, 34, 44, 0.55);
}

.ts-preview-join {
    display: flex;
    width: 100%;
}

.ts-preview-loc-ico,
.ts-preview-join-ico {
    opacity: 0.65;
    flex-shrink: 0;
}

.ts-preview-discord,
.ts-preview-player,
.ts-preview-linkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    text-align: left;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-sizing: border-box;
}

.ts-preview-stage.light .ts-preview-discord,
.ts-preview-stage.light .ts-preview-player,
.ts-preview-stage.light .ts-preview-linkbox {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.06);
}

.ts-preview-discord-av,
.ts-preview-player-art,
.ts-preview-linkbox-ico {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #5865f2, #eb459e);
}

.ts-preview-player-art {
    border-radius: 6px;
    background: linear-gradient(135deg, #1db954, #191414);
}

.ts-preview-linkbox-ico {
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #9b59b6);
}

.ts-preview-discord-meta,
.ts-preview-player-meta,
.ts-preview-linkbox-meta {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.ts-preview-discord-row {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.ts-preview-discord-row [data-ts-slot="discord_name"],
.ts-preview-player-meta [data-ts-slot="player_title"],
.ts-preview-linkbox-meta strong {
    font-size: 11px;
    font-weight: 650;
    color: #f0f0f0;
    line-height: 1.2;
}

.ts-preview-stage.light .ts-preview-discord-row [data-ts-slot="discord_name"]:not(.styled-text),
.ts-preview-stage.light .ts-preview-player-meta [data-ts-slot="player_title"]:not(.styled-text),
.ts-preview-stage.light .ts-preview-linkbox-meta strong:not(.styled-text) {
    color: #1a1d24;
}

.ts-preview-discord-clan {
    font-size: 9px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(88, 101, 242, 0.35);
    color: #c5caff;
    letter-spacing: 0.04em;
}

.ts-preview-discord-act,
.ts-preview-player-time,
.ts-preview-linkbox-meta span {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.25;
}

.ts-preview-stage.light .ts-preview-discord-act,
.ts-preview-stage.light .ts-preview-player-time,
.ts-preview-stage.light .ts-preview-linkbox-meta span:not(.styled-text) {
    color: rgba(30, 34, 44, 0.55);
}

.ts-preview-watermark {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.45);
    text-align: center;
}

.ts-preview-stage.light .ts-preview-watermark {
    color: rgba(30, 34, 44, 0.45);
}

.ts-preview-reveal {
    position: absolute;
    inset: 0;
    z-index: 10;
    border-radius: inherit;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(8, 8, 10, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 20px;
}

.ts-preview-reveal.is-on {
    display: flex;
}

.ts-preview-reveal .ts-preview-slot {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
}

.ts-preview-stage.light .ts-preview-reveal {
    background: rgba(255, 255, 255, 0.78);
}

.ts-preview-stage.light .ts-preview-reveal .ts-preview-slot:not(.styled-text) {
    color: #16181d;
}

.ts-preview-slot {
    word-break: break-word;
    max-width: 100%;
}

.ts-preview-slot.is-focus {
    outline: none;
    box-shadow: 0 0 0 1.5px rgba(120, 160, 255, 0.6);
    border-radius: 4px;
}

[data-ts-focus-group].is-focus {
    outline: none;
    box-shadow: 0 0 0 1.5px rgba(120, 160, 255, 0.55);
    border-radius: 8px;
}

.ts-preview-stat.is-focus,
.ts-preview-corner-stats [data-ts-focus-group].is-focus {
    box-shadow: none;
}

.ts-preview-corner-stats [data-ts-focus-group].is-focus .ts-preview-stat-pill,
.ts-preview-stat.is-focus .ts-preview-stat-pill {
    box-shadow: 0 0 0 1.5px rgba(120, 160, 255, 0.65);
}

.ts-preview-sample {
    /* styled-text sizing helper */
}

.ts-preview-note {
    margin: 0;
    font-size: 10px;
    color: #72767d;
    line-height: 1.4;
}

.ts-theme-toggle {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: auto;
}

.ts-theme-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(17, 17, 17, 0.55);
    color: #f0f0f0;
    cursor: pointer;
    opacity: 0.55;
    font-size: 15px;
    transition: opacity 0.15s, border-color 0.15s;
}

.ts-theme-btn.active {
    opacity: 1;
    border-color: #5865f2;
}

.ts-form-actions {
    padding: 14px 20px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(17, 17, 17, 0.7);
}

.ts-color-popover {
    position: fixed;
    z-index: 9999;
    background: #1e1f22;
    border: 1px solid #3f4147;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    min-width: 200px;
}

.ts-color-popover input[type="color"] {
    width: 100%;
    height: 120px;
    border: none;
    padding: 0;
    cursor: pointer;
    border-radius: 8px;
}

.ts-color-popover input[type="text"] {
    width: 100%;
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #3f4147;
    background: #111214;
    color: inherit;
    font-family: ui-monospace, monospace;
    font-size: 13px;
}

@media (max-width: 640px) {
    .ts-effect-grid,
    .ts-font-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
