

.tcs {
    position: fixed;
    inset: 0;
    z-index: 100020;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.tcs-scrim {
    position: absolute;
    inset: 0;
    background: rgba(3, 4, 10, 0.66);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.tcs-panel {
    position: relative;
    width: min(440px, 100%);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    padding: 18px 18px 16px;
    border-radius: 22px;
    background: rgba(14, 16, 28, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
    color: #e7e7ee;
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tcs-panel:focus {
    outline: none;
}

.tcs.open .tcs-scrim { opacity: 1; }
.tcs.open .tcs-panel { opacity: 1; transform: none; }

.tcs-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.tcs-title {
    font-family: var(--font-display, 'Outfit', system-ui, sans-serif);
    font-size: 1.08rem;
    font-weight: 800;
    color: #fff;
}

.tcs-x {
    flex: none;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
}

.tcs-what {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.tcs-what img {
    flex: none;
    width: 44px;
    height: 66px;
    border-radius: 8px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.06);
}

.tcs-what span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tcs-what b { color: #fff; font-weight: 700; font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tcs-what small { color: rgba(255, 255, 255, 0.55); font-size: 0.78rem; }

.tcs-shot {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

.tcs-shot img {
    height: min(46vh, 380px);
    aspect-ratio: 9 / 16;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    object-fit: cover;
}

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

.tcs-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 48px;
    padding: 0 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.tcs-btn i { font-size: 1.05rem; }

@media (hover: hover) {
    .tcs-btn:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.18); }
}

.tcs-btn--main {
    grid-column: 1 / -1;
    background: var(--btn-bg, var(--primary, #8b76ff));
    border-color: transparent;
    color: var(--on-primary, #fff);
}

.tcs-btn--wa i { color: #25d366; }
.tcs-btn--tg i { color: #2aabee; }

.tcs-btn:focus-visible,
.tcs-x:focus-visible {
    outline: 2px solid var(--primary, #8b76ff);
    outline-offset: 2px;
}

.tcs-url {
    margin-top: 10px;
}

.tcs-url input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.7);
    font: inherit;
    font-size: 0.8rem;
}

@media (max-width: 599px) {
    .tcs { align-items: flex-end; padding: 10px; }
    .tcs-panel {
        width: 100%;
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }
}

.tcs-end {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 14px;
    padding: 10px 10px 10px 10px;
    border-radius: 16px;
    border: 1px solid rgba(var(--primary-rgb, 139, 118, 255), 0.35);
    background: linear-gradient(90deg, rgba(var(--primary-rgb, 139, 118, 255), 0.12), rgba(255, 255, 255, 0.03));
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.tcs-end.on { opacity: 1; transform: none; }

.tcs-end-img {
    flex: none;
    width: 40px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.06);
}

.tcs-end-img--ico {
    display: grid;
    place-items: center;
    color: var(--primary, #8b76ff);
}

.tcs-end-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1 1 auto;
}

.tcs-end-text b {
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tcs-end-text small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.76rem;
    line-height: 1.35;
}

.tcs-end-btn {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: var(--btn-bg, var(--primary, #8b76ff));
    color: var(--on-primary, #fff);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 800;
    cursor: pointer;
}

.tcs-end-x {
    flex: none;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
}

@media (max-width: 420px) {
    .tcs-end-btn span { display: none; }
    .tcs-end-btn { padding: 0 13px; }
}

html.reduce-motion .tcs-scrim,
html.reduce-motion .tcs-panel,
html.reduce-motion .tcs-end { transition: none !important; }

@media (prefers-reduced-motion: reduce) {
    .tcs-scrim, .tcs-panel, .tcs-end { transition: none; }
}
