/* Touchgrass social feature styles */

.tg-skip-link {
    position: absolute;
    left: -999px;
    top: -999px;
    background: #2b6cb0;
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 0.75rem;
    z-index: 1000;
    text-decoration: none;
    box-shadow: 0 12px 24px rgba(43, 108, 176, 0.25);
}

.tg-skip-link:focus,
.tg-skip-link:active {
    left: 1rem;
    top: 1rem;
}

/* Profile layout selector ------------------------------------------------ */
.tg-profile-layout-settings {
    background: #ffffff;
    border-radius: 1.5rem;
    box-shadow: 0 12px 32px rgba(18, 38, 63, 0.08);
    margin: 2.5rem auto;
    padding: 2.5rem;
    max-width: 960px;
}

.tg-profile-layout-settings__header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tg-profile-layout-settings__header h2 {
    font-size: 1.6rem;
    margin: 0;
}

.tg-profile-layout-settings__header p {
    margin: 0;
    color: #4a5568;
}

.tg-profile-layout-settings__options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.tg-layout-chip {
    align-items: flex-start;
    background: #f7fafc;
    border: 2px solid transparent;
    border-radius: 1rem;
    color: #2d3748;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.1rem 1.4rem;
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.tg-layout-chip:hover,
.tg-layout-chip:focus {
    border-color: #63b3ed;
    box-shadow: 0 10px 24px rgba(99, 179, 237, 0.25);
    outline: none;
}

.tg-layout-chip.is-active {
    background: #ebf8ff;
    border-color: #2b6cb0;
    box-shadow: 0 14px 30px rgba(43, 108, 176, 0.2);
}

.tg-layout-chip__title {
    font-weight: 600;
}

.tg-layout-chip__hint {
    color: #4a5568;
    font-size: 0.95rem;
}

/* Layout variants -------------------------------------------------------- */
.tg-profile-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.tg-profile-layout[data-layout="segmented"] .profile-main > section,
.tg-profile-layout[data-layout="segmented"] .profile-main > div {
    background: #ffffff;
    border-radius: 1.25rem;
    box-shadow: 0 18px 40px rgba(18, 38, 63, 0.08);
    padding: 2rem;
}

.tg-profile-layout[data-layout="segmented"] .profile-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tg-profile-layout[data-layout="showcase"] .profile-main {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.tg-profile-layout[data-layout="showcase"] #upto-section,
.tg-profile-layout[data-layout="showcase"] #upto-books-section,
.tg-profile-layout[data-layout="showcase"] #upto-movies-section {
    grid-column: 1 / -1;
}

.tg-profile-layout[data-layout="showcase"] #upto-section .upto-options,
.tg-profile-layout[data-layout="showcase"] #upto-books-section .upto-options,
.tg-profile-layout[data-layout="showcase"] #upto-movies-section .upto-options {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.tg-profile-layout[data-layout="showcase"] #upto-section .upto-category,
.tg-profile-layout[data-layout="showcase"] #upto-books-section .upto-category,
.tg-profile-layout[data-layout="showcase"] #upto-movies-section .upto-category {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 1.1rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.15);
    padding: 1.5rem;
}

/* Media picker ----------------------------------------------------------- */
.tg-media-picker {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-height: 480px;
}

.tg-media-picker__header h2 {
    margin: 0;
}

.tg-media-picker__header p {
    margin: 0.5rem 0 0 0;
    color: #4a5568;
}

.tg-media-picker__body {
    display: grid;
    gap: 1.5rem;
}

.tg-section-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.tg-section-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.tg-section-header p {
    margin: 0;
    color: #4a5568;
}

.tg-section-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tg-media-chip-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tg-media-chip {
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 1rem;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    display: flex;
    gap: 1rem;
    padding: 0.85rem 1.1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tg-media-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.tg-media-chip__art {
    width: 64px;
    height: 64px;
    border-radius: 0.75rem;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.tg-media-chip__body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.tg-media-chip__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.tg-media-chip__subtitle {
    margin: 0;
    color: #4a5568;
}

.tg-media-chip__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    font-size: 0.85rem;
    color: #4a5568;
}

.tg-media-chip__meta span:not(:first-child)::before {
    content: '•';
    margin-right: 0.35rem;
    color: #cbd5f5;
}

.tg-media-chip__link {
    font-size: 0.85rem;
    color: #2b6cb0;
    text-decoration: none;
}

.tg-media-chip__link:hover,
.tg-media-chip__link:focus {
    text-decoration: underline;
}

.tg-media-chip__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tg-media-badge {
    background: #edf2f7;
    border-radius: 999px;
    color: #2d3748;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.65rem;
    text-transform: capitalize;
}

.tg-media-badge--liked {
    background: rgba(236, 201, 75, 0.2);
    color: #b7791f;
}

.tg-media-badge--recommended {
    background: rgba(72, 187, 120, 0.2);
    color: #2f855a;
}

.tg-media-badge--reminder {
    background: rgba(99, 179, 237, 0.2);
    color: #2b6cb0;
}

.tg-media-badge--visibility {
    background: rgba(203, 213, 224, 0.4);
    color: #4a5568;
}

.tg-post-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tg-post-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
}

.tg-post-card__content {
    margin: 0;
    line-height: 1.55;
    color: #2d3748;
}

.tg-post-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #4a5568;
}

.tg-post-card__badge {
    background: #edf2f7;
    border-radius: 999px;
    padding: 0.25rem 0.75rem;
    font-weight: 600;
    font-size: 0.75rem;
}

.tg-post-card__badge--muted {
    background: #f7fafc;
    color: #718096;
}

.tg-photo-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.tg-photo-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1rem;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.tg-photo-card img,
.tg-photo-card__placeholder {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.tg-photo-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #edf2f7;
    color: #4a5568;
    font-weight: 600;
}

.tg-photo-card__caption {
    margin: 0;
    padding: 0.75rem 1rem 1rem;
    color: #4a5568;
    font-size: 0.9rem;
}

.tg-goal-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tg-goal {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1rem;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.tg-goal__title {
    font-weight: 600;
    margin: 0;
}

.tg-goal__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #4a5568;
}

.tg-goal__progress {
    background: rgba(56, 189, 248, 0.15);
    border-radius: 999px;
    color: #0c4a6e;
    font-weight: 600;
    padding: 0.2rem 0.65rem;
}

.tg-goal__summary {
    margin: 0;
    color: #4a5568;
    font-size: 0.9rem;
}

.tg-tablist {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tg-tablist__tab {
    background: #edf2f7;
    border: none;
    border-radius: 999px;
    color: #2d3748;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0.55rem 1.2rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.tg-tablist__tab.is-active {
    background: #2b6cb0;
    color: #fff;
}

/* Friendship hub --------------------------------------------------------- */
.tg-friends-hub {
    margin: 0 auto;
    max-width: 1100px;
    padding: 3rem 1.5rem 4rem;
}

.tg-friends-hub__intro {
    align-items: flex-start;
    background: #ffffff;
    border-radius: 1.5rem;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
    padding: 2.25rem 2.5rem;
}

.tg-friends-hub__intro h1 {
    font-size: 2rem;
    margin: 0;
}

.tg-friends-hub__intro p {
    color: #4a5568;
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0;
}

.tg-friends-hub__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tg-pill-button {
    align-items: center;
    background: #2b6cb0;
    border: none;
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.95rem;
    font-weight: 600;
    gap: 0.5rem;
    padding: 0.65rem 1.4rem;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.tg-pill-button:hover,
.tg-pill-button:focus {
    background: #24569b;
    box-shadow: 0 12px 28px rgba(36, 86, 155, 0.25);
    outline: none;
}

.tg-pill-button--secondary {
    background: #edf2f7;
    color: #1a202c;
}

.tg-pill-button--secondary:hover,
.tg-pill-button--secondary:focus {
    background: #dce6f2;
    box-shadow: none;
}

.tg-friends-grid {
    display: grid;
    gap: 1.75rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.tg-friends-card {
    background: #ffffff;
    border-radius: 1.35rem;
    box-shadow: 0 18px 40px rgba(18, 38, 63, 0.08);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.8rem 1.9rem;
}

.tg-friends-card__header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.tg-friends-card__header h2 {
    font-size: 1.25rem;
    margin: 0;
}

.tg-friends-card__header span {
    color: #718096;
    font-size: 0.9rem;
}

.tg-friends-card__list,
.tg-friends-card__meta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tg-friends-card__list-item {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.tg-circle-list-item {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.tg-circle-list-item__body {
    align-items: center;
    display: flex;
    gap: 0.75rem;
}

.tg-circle-drag-handle {
    align-items: center;
    background: #edf2f7;
    border-radius: 0.75rem;
    color: #4a5568;
    cursor: grab;
    display: inline-flex;
    height: 1.8rem;
    justify-content: center;
    width: 1.8rem;
}

.tg-circle-list-item.is-dragging {
    opacity: 0.6;
}

.tg-circle-list-item.is-drag-over {
    box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.35) inset;
}

.tg-friends-card__list-item button,
.tg-friends-card__list-item a {
    font-size: 0.85rem;
}

.tg-friends-card__empty {
    color: #718096;
    font-size: 0.92rem;
}

.tg-friends-chip {
    align-items: center;
    background: #ebf4ff;
    border-radius: 999px;
    color: #1a365d;
    display: inline-flex;
    font-size: 0.75rem;
    font-weight: 600;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    text-transform: uppercase;
}

.tg-friends-tablist {
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
}

.tg-friends-tablist__tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #4a5568;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.tg-friends-tablist__tab.is-active {
    border-color: #2b6cb0;
    color: #2b6cb0;
}

.tg-friends-actor {
    align-items: center;
    display: grid;
    gap: 0.55rem;
    grid-template-columns: 40px auto;
}

.tg-friends-actor__avatar {
    background: linear-gradient(135deg, #c3dafe, #a3bffa);
    border-radius: 50%;
    height: 40px;
    overflow: hidden;
    width: 40px;
}

.tg-friends-actor__avatar img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.tg-friends-actor__meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.tg-friends-actor__name {
    font-weight: 600;
}
.tg-friends-actor__name-link {
    color: inherit;
    text-decoration: none;
}
.tg-friends-actor__name-link:hover,
.tg-friends-actor__name-link:focus {
    text-decoration: underline;
}

.tg-friends-actor__handle {
    color: #718096;
    font-size: 0.85rem;
}

.tg-friends-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tg-icon-button {
    align-items: center;
    background: #edf2f7;
    border: none;
    border-radius: 999px;
    color: #1a202c;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.85rem;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.tg-icon-button:hover,
.tg-icon-button:focus {
    background: #dce6f2;
    color: #1a202c;
    outline: none;
}

.tg-icon-button--danger {
    background: #fed7d7;
    color: #822727;
}

.tg-icon-button--danger:hover,
.tg-icon-button--danger:focus {
    background: #feb2b2;
}

.tg-friends-section {
    background: #ffffff;
    border-radius: 1.5rem;
    box-shadow: 0 18px 40px rgba(18, 38, 63, 0.08);
    margin-top: 2.5rem;
    padding: 2.25rem 2.5rem;
}

.tg-friends-section h2 {
    font-size: 1.5rem;
    margin: 0 0 1.25rem;
}

.tg-friends-remote__grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.tg-friends-remote__panel {
    background: #f7fafc;
    border-radius: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
}

.tg-friends-remote__panel h3 {
    font-size: 1.15rem;
    margin: 0;
}

.tg-friends-hint {
    color: #4a5568;
    font-size: 0.9rem;
    margin: 0;
}

.tg-friends-feed {
    background: #f7fafc;
    border-radius: 1rem;
    margin-top: 1rem;
    max-height: 420px;
    overflow: auto;
    padding: 1rem;
}

.tg-friends-feed__item {
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 0;
}

.tg-friends-feed__item:last-child {
    border-bottom: none;
}

.tg-friends-feed__meta {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.tg-friends-feed__meta strong {
    font-size: 0.95rem;
}

.tg-friends-feed__content {
    color: #2d3748;
    font-size: 0.95rem;
}

.tg-status-pill {
    background: #e6fffa;
    border-radius: 999px;
    color: #0f766e;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    text-transform: uppercase;
}

.tg-status-pill--pending {
    background: #fffaf0;
    color: #c05621;
}

.tg-status-pill--quiet {
    background: #edf2f7;
    color: #4a5568;
}

.tg-circles-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tg-circles-filter button {
    background: #edf2f7;
    border: none;
    border-radius: 999px;
    color: #1a202c;
    cursor: pointer;
    font-size: 0.82rem;
    padding: 0.4rem 0.85rem;
}

.tg-circles-filter button.is-active {
    background: #2b6cb0;
    color: #fff;
}

.tg-modal {
    align-items: center;
    background: rgba(15, 23, 42, 0.5);
    display: none;
    inset: 0;
    justify-content: center;
    padding: 2rem;
    position: fixed;
    z-index: 10000;
}

.tg-modal.is-active {
    display: flex;
}

.tg-modal__dialog {
    background: #ffffff;
    border-radius: 1.25rem;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
    max-height: calc(100vh - 4rem);
    overflow: auto;
    padding: 2rem;
    position: relative;
    width: min(720px, 100%);
}

.tg-modal__close {
    background: transparent;
    border: none;
    color: #4a5568;
    cursor: pointer;
    font-size: 1.8rem;
    position: absolute;
    right: 1.25rem;
    top: 1.1rem;
}

.tg-circle-editor {
    display: grid;
    gap: 1.75rem;
}

.tg-circle-editor__header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tg-circle-editor__header h2 {
    margin: 0;
}

.tg-circle-editor__body {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.tg-circle-editor__toolbar {
    align-items: center;
    background: #ffffff;
    border-radius: 0.9rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.85rem 1.1rem;
}

.tg-circle-editor__toolbar p {
    margin: 0;
}

.tg-circle-editor__list {
    background: #f7fafc;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
}

.tg-circle-editor__list h3 {
    font-size: 1rem;
    margin: 0 0 0.5rem;
}

.tg-circle-editor__item {
    align-items: center;
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
}

.tg-circle-editor__item.is-selected {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35);
}

.tg-circle-editor__item button {
    font-size: 0.85rem;
}

.tg-circle-editor__empty {
    color: #718096;
    font-size: 0.9rem;
}

.tg-circle-editor__form {
    display: grid;
    gap: 1rem;
}

.tg-circle-editor__form label {
    color: #4a5568;
    font-size: 0.9rem;
    font-weight: 600;
}

.tg-circle-editor__form input,
.tg-circle-editor__form textarea,
.tg-circle-editor__form select {
    border: 1px solid #cbd5e0;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    padding: 0.6rem 0.85rem;
    width: 100%;
}

.tg-circle-editor__form textarea {
    min-height: 90px;
    resize: vertical;
}

.tg-circle-editor__select {
    align-items: center;
    display: flex;
    gap: 0.65rem;
    position: relative;
    width: 100%;
}

.tg-circle-editor__select input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tg-circle-editor__select-indicator {
    align-items: center;
    border: 2px solid #cbd5e0;
    border-radius: 0.45rem;
    display: inline-flex;
    height: 1.1rem;
    justify-content: center;
    transition: all 0.2s ease;
    width: 1.1rem;
}

.tg-circle-editor__item.is-selected .tg-circle-editor__select-indicator {
    background: #2b6cb0;
    border-color: #2b6cb0;
}

.tg-circle-editor__item.is-selected .tg-circle-editor__select-indicator::after {
    background: #ffffff;
    border-radius: 0.2rem;
    content: '';
    height: 0.55rem;
    width: 0.55rem;
}

.tg-circle-editor__select-label {
    color: #2d3748;
    flex: 1;
}

.tg-contact-sync {
    display: grid;
    gap: 1.5rem;
}

.tg-contact-sync__stepper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tg-contact-sync__step {
    align-items: center;
    background: #edf2f7;
    border-radius: 999px;
    color: #4a5568;
    display: inline-flex;
    font-size: 0.85rem;
    font-weight: 600;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
}

.tg-contact-sync__step.is-active {
    background: #2b6cb0;
    color: #fff;
}

.tg-contact-sync__upload {
    align-items: center;
    border: 2px dashed #cbd5e0;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 2.25rem 1.5rem;
    text-align: center;
}

.tg-contact-sync__upload button {
    font-size: 0.95rem;
}

.tg-contact-sync__handles {
    background: #f7fafc;
    border-radius: 1rem;
    display: grid;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
}

.tg-contact-sync__handles textarea {
    border: 1px solid #cbd5e0;
    border-radius: 0.75rem;
    font-family: inherit;
    min-height: 120px;
    padding: 0.75rem 1rem;
    resize: vertical;
}

.tg-contact-sync__handles .tg-friends-actions {
    justify-content: flex-start;
}

.tg-contact-sync__summary {
    background: #f7fafc;
    border-radius: 1rem;
    padding: 1rem 1.25rem;
}

.tg-contact-sync__summary strong {
    display: block;
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
}

.tg-contact-sync__matches {
    display: grid;
    gap: 0.75rem;
}

.tg-contact-sync__match {
    align-items: center;
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1rem;
}

.tg-quiet-note {
    color: #a0aec0;
    font-size: 0.85rem;
}

.tg-feed-toggle {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tg-feed-toggle button {
    background: #edf2f7;
    border: none;
    border-radius: 999px;
    color: #1a202c;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.45rem 0.9rem;
}

.tg-feed-toggle button.is-active {
    background: #2b6cb0;
    color: #fff;
}

.tg-account-settings {
    margin: 0 auto;
    max-width: 960px;
    padding: 3rem 2rem 4rem;
    display: grid;
    gap: 2rem;
}

.tg-account-settings__header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tg-account-settings__header p {
    color: #4a5568;
    margin: 0;
}

.tg-account-grid {
    display: grid;
    gap: 1.5rem;
}

.tg-account-audit__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.85rem;
}

.tg-account-audit__item {
    background: #ffffff;
    border-radius: 0.9rem;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
    display: grid;
    gap: 0.45rem;
    padding: 0.95rem 1.1rem;
}

.tg-account-audit__row {
    align-items: flex-start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.tg-account-audit__event {
    color: #2d3748;
    font-weight: 600;
}

.tg-account-audit__item time {
    color: #718096;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .tg-friends-hub {
        padding: 2.5rem 1rem 3rem;
    }

    .tg-friends-hub__intro {
        padding: 1.75rem 1.5rem;
    }

    .tg-modal__dialog {
        padding: 1.5rem;
    }

    .tg-account-settings {
        padding: 2.5rem 1rem 3rem;
    }

    .tg-account-audit__row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

.tg-media-picker__panel {
    display: none;
}

.tg-media-picker__panel.is-active {
    display: block;
}

.tg-media-picker__form {
    display: grid;
    gap: 1rem;
}

.tg-media-picker__actions {
    display: flex;
    justify-content: flex-end;
}

.tg-media-picker__placeholder {
    color: #4a5568;
    margin: 0;
}

.tg-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.tg-field__label {
    color: #2d3748;
    font-weight: 600;
}

.tg-field input,
.tg-field textarea,
.tg-field select {
    border: 1px solid #cbd5e0;
    border-radius: 0.75rem;
    font-size: 1rem;
    padding: 0.75rem 1rem;
    width: 100%;
}

.tg-field textarea {
    min-height: 120px;
    resize: vertical;
}

.tg-media-picker__suggestions {
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.15);
    list-style: none;
    margin: 0;
    max-height: 220px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.tg-media-picker__suggestions li {
    cursor: pointer;
    padding: 0.65rem 1rem;
}

.tg-media-picker__suggestions li:hover,
.tg-media-picker__suggestions li:focus {
    background: #ebf8ff;
}

.tg-media-picker__footer {
    align-items: center;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    padding-top: 1rem;
}

.tg-media-picker__toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tg-toggle-btn {
    align-items: center;
    background: #edf2f7;
    border: none;
    border-radius: 999px;
    color: #2d3748;
    cursor: pointer;
    display: inline-flex;
    gap: 0.4rem;
    padding: 0.45rem 1.1rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.tg-toggle-btn[aria-pressed="true"] {
    background: #2b6cb0;
    color: #ffffff;
}

.tg-media-picker__visibility label {
    color: #4a5568;
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.tg-media-picker__visibility select {
    border: 1px solid #cbd5e0;
    border-radius: 0.75rem;
    padding: 0.5rem 1rem;
}

.tg-media-picker__status {
    color: #2d3748;
    font-size: 0.95rem;
    min-height: 1.2rem;
}

/* Media detail modal ----------------------------------------------------- */
.tg-media-detail {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(140px, 180px) 1fr;
}

.tg-media-detail__cover img {
    border-radius: 1rem;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.2);
    width: 100%;
}

.tg-media-detail__meta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tg-media-detail__actions {
    display: flex;
    gap: 0.75rem;
}

.tg-media-detail__actions .like-btn,
.tg-media-detail__actions .recommend-btn {
    align-items: center;
    display: inline-flex;
    gap: 0.4rem;
    padding: 0.6rem 1.1rem;
}

.tg-media-detail__visibility {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.tg-media-detail__visibility select {
    border: 1px solid #cbd5e0;
    border-radius: 0.75rem;
    padding: 0.5rem 1rem;
}

.tg-media-detail__body {
    display: grid;
    gap: 1.5rem;
    grid-column: 1 / -1;
}

.tg-media-detail__review-display {
    background: #f7fafc;
    border-radius: 1rem;
    padding: 1.25rem;
}

.tg-media-detail__review-display p {
    margin: 0;
    white-space: pre-wrap;
}

.tg-media-detail__meta-row {
    color: #4a5568;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.85rem;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.tg-review-form {
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    display: grid;
    gap: 1rem;
    padding: 1.5rem;
}

.tg-review-form__row {
    display: grid;
    gap: 0.75rem;
}

.tg-review-form__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.tg-rating-slider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tg-rating-slider output {
    font-weight: 600;
}

@media (max-width: 768px) {
    .tg-profile-layout-settings {
        padding: 1.8rem;
    }

    .tg-media-detail {
        grid-template-columns: 1fr;
    }

    .tg-media-detail__cover img {
        margin: 0 auto;
        max-width: 220px;
    }

    .tg-profile-layout[data-layout="showcase"] #upto-section .upto-options,
    .tg-profile-layout[data-layout="showcase"] #upto-books-section .upto-options,
    .tg-profile-layout[data-layout="showcase"] #upto-movies-section .upto-options {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

/* Stream layout ---------------------------------------------------------- */
.tg-stream {
    background: #f1f5f9;
    min-height: 100vh;
}

.tg-card {
    background: #ffffff;
    border-radius: 1.25rem;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
    padding: 1.75rem;
}

.tg-stream__layout {
    margin: 0 auto;
    max-width: 1200px;
    padding: 2.5rem 1.5rem 4rem;
    display: grid;
    gap: 2rem;
}

@media (min-width: 1100px) {
    .tg-stream__layout {
        grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1fr);
        align-items: start;
    }
}

.tg-stream__primary {
    display: grid;
    gap: 1.75rem;
}

.tg-stream__sidebar {
    position: sticky;
    top: 96px;
    display: grid;
    gap: 1.5rem;
    align-content: start;
}

@media (max-width: 1099px) {
    .tg-stream__sidebar {
        position: static;
    }
}

/* Composer --------------------------------------------------------------- */
.tg-stream-composer__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.tg-stream-composer__title {
    font-size: 1.75rem;
    margin: 0;
}

.tg-stream-composer__hint {
    margin: 0.35rem 0 0 0;
    color: #4a5568;
    max-width: 38ch;
}

.tg-stream-composer__break {
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #f97316, #facc15);
    color: #1f2937;
    font-weight: 600;
    padding: 0.65rem 1.6rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tg-stream-composer__break:hover,
.tg-stream-composer__break:focus {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.26);
    outline: none;
}

.tg-stream-composer__form {
    display: grid;
    gap: 1.5rem;
}

.tg-stream-composer__tabs {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tg-stream-composer__tab {
    background: #e2e8f0;
    border: none;
    border-radius: 0.75rem;
    color: #1f2937;
    cursor: pointer;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.tg-stream-composer__tab.is-active {
    background: #1d4ed8;
    color: #ffffff;
    transform: translateY(-1px);
}

.tg-stream-composer__field {
    display: grid;
    gap: 0.5rem;
}

.tg-stream-composer__field-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1f2937;
}

.tg-stream-composer__field textarea {
    border: 1px solid #cbd5e0;
    border-radius: 1rem;
    min-height: 140px;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    resize: vertical;
}

.tg-stream-composer__photo {
    background: #f7fafc;
    border: 1px dashed #cbd5e0;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 1rem 1.25rem;
}

.tg-stream-composer__photo-input {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #2d3748;
}

.tg-stream-composer__photo-input input[type="file"] {
    font-size: 0.95rem;
}

.tg-stream-composer__photo-input small {
    color: #4a5568;
}

.tg-stream-composer__photo-preview {
    align-items: center;
    background: #ffffff;
    border-radius: 0.85rem;
    box-shadow: inset 0 0 0 1px rgba(203, 213, 225, 0.6);
    display: flex;
    gap: 1rem;
    padding: 0.85rem;
}

.tg-stream-composer__photo-preview img {
    border-radius: 0.75rem;
    max-height: 140px;
    object-fit: cover;
}

.tg-stream-composer__photo-remove {
    background: #edf2f7;
    border: 1px solid #cbd5e0;
    border-radius: 999px;
    color: #2d3748;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.35rem 0.85rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.tg-stream-composer__photo-remove:hover,
.tg-stream-composer__photo-remove:focus {
    background: #e2e8f0;
    color: #1a202c;
}

.tg-stream-composer__controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: flex-end;
}

.tg-stream-composer__visibility select {
    border: 1px solid #cbd5e0;
    border-radius: 0.8rem;
    padding: 0.55rem 1.25rem;
    min-width: 170px;
}

.tg-stream-composer__federate {
    background: #f8fafc;
    border-radius: 0.9rem;
    padding: 0.75rem 1rem;
    max-width: 240px;
}

.tg-stream-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    cursor: pointer;
}

.tg-stream-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.tg-stream-toggle__hint {
    margin: 0.4rem 0 0;
    font-size: 0.85rem;
    color: #475569;
}

.tg-stream-composer__actions {
    margin-left: auto;
    display: flex;
    gap: 0.75rem;
}

.tg-stream-composer__submit {
    background: #2563eb;
    border: none;
    color: #ffffff;
    border-radius: 0.9rem;
    padding: 0.65rem 1.6rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.tg-stream-composer__submit:hover,
.tg-stream-composer__submit:focus {
    background: #1d4ed8;
    outline: none;
}

.tg-stream-composer__cancel {
    background: transparent;
    border: 1px solid #94a3b8;
    color: #475569;
    border-radius: 0.9rem;
    padding: 0.65rem 1.4rem;
    cursor: pointer;
}

.tg-stream-composer__circles {
    display: grid;
    gap: 0.6rem;
}

.tg-stream-composer__circle-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tg-stream-composer__circle-list label {
    background: #e2e8f0;
    border-radius: 999px;
    padding: 0.45rem 1rem;
    font-size: 0.9rem;
}

.tg-stream-composer__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    color: #475569;
    font-size: 0.9rem;
}

/* Feed ------------------------------------------------------------------- */
.tg-stream-feed__filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.tg-stream-feed__metrics {
    color: #4a5568;
    font-size: 0.85rem;
    margin-left: auto;
    padding-left: 1rem;
}

.tg-stream .menu-tabs__item {
    border-radius: 999px;
    padding: 0.55rem 1.4rem;
    border: none;
    background: #e2e8f0;
    color: #334155;
    cursor: pointer;
    font-weight: 600;
}

.tg-stream .menu-tabs__item.is-active {
    background: #0f172a;
    color: #f8fafc;
}

.tg-stream-feed__list {
    display: grid;
    gap: 1.25rem;
}

.tg-stream-post {
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1.25rem;
    background: #ffffff;
    display: grid;
    gap: 0.65rem;
}

.tg-stream-post--longform {
    border-left: 5px solid #1d4ed8;
}

.tg-stream-post--photo {
    border-left: 5px solid #059669;
}

.tg-stream-post__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    font-size: 0.9rem;
    color: #475569;
    align-items: center;
}

.tg-stream-post__author {
    font-weight: 600;
    color: #1f2937;
}

.tg-stream-post__badges {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.tg-stream-badge {
    border-radius: 999px;
    padding: 0.2rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: #e0e7ff;
    color: #3730a3;
}

.tg-stream-badge--local {
    background: #dcfce7;
    color: #166534;
}

.tg-stream-post__body {
    font-size: 1rem;
    color: #1e293b;
    line-height: 1.55;
}

.tg-stream-post__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.tg-stream-post__media {
    margin: 0.75rem 0;
    overflow: hidden;
    border-radius: 1rem;
    background: #000000;
}

.tg-stream-post__media img {
    display: block;
    width: 100%;
    height: auto;
}

.tg-stream-post__delivery {
    border-top: 1px solid #e2e8f0;
    color: #4a5568;
    font-size: 0.85rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
}

.tg-stream-post__delivery[data-status="failed"] {
    color: #c53030;
}

.tg-stream-post__delivery[data-status="retrying"] {
    color: #dd6b20;
}

.tg-stream-post__delivery[data-status="pending"] {
    color: #2b6cb0;
}

.tg-stream-post__actions button {
    background: transparent;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.85rem;
    cursor: pointer;
}

.tg-stream-post__actions button:hover,
.tg-stream-post__actions button:focus {
    background: #f8fafc;
    outline: none;
}

.tg-stream-feed__list > .tg-stream-feed__empty {
    text-align: center;
    color: #475569;
    padding: 1.5rem 0;
    font-size: 0.95rem;
}

/* Mindful break ---------------------------------------------------------- */
.tg-stream-mindful__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tg-stream-mindful__header h2 {
    margin: 0;
    font-size: 1.35rem;
}

.tg-stream-mindful__dismiss {
    border: none;
    background: transparent;
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    color: #475569;
}

.tg-stream-mindful__body {
    display: grid;
    gap: 1rem;
}

.tg-stream-mindful__idea {
    background: #f8fafc;
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid #e2e8f0;
}

.tg-stream-mindful__idea h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    color: #0f172a;
}

.tg-stream-mindful__idea p {
    margin: 0;
    color: #475569;
    font-size: 0.95rem;
}

.tg-stream-mindful__placeholder {
    margin: 0;
    color: #64748b;
}

.tg-stream-feed__pagination {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.tg-stream-feed__page-btn,
.tg-feed-panel__page-btn,
.tg-user-post__page-btn {
    align-items: center;
    background: #edf2f7;
    border: 1px solid #cbd5e0;
    border-radius: 999px;
    color: #2d3748;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.9rem;
    font-weight: 700;
    height: 2.5rem;
    justify-content: center;
    min-width: 2.5rem;
    padding: 0.35rem;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.tg-stream-feed__page-btn:disabled,
.tg-feed-panel__page-btn:disabled,
.tg-user-post__page-btn:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.tg-stream-feed__page-btn:hover:not(:disabled),
.tg-stream-feed__page-btn:focus:not(:disabled),
.tg-feed-panel__page-btn:hover:not(:disabled),
.tg-feed-panel__page-btn:focus:not(:disabled),
.tg-user-post__page-btn:hover:not(:disabled),
.tg-user-post__page-btn:focus:not(:disabled) {
    background: #e2e8f0;
    border-color: #94a3b8;
    color: #1a202c;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.tg-stream-feed__page-info,
.tg-feed-panel__page-info,
.tg-user-post__page-info {
    align-items: center;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 999px;
    color: #4a5568;
    display: inline-flex;
    font-size: 0.9rem;
    gap: 0.45rem;
    padding: 0.4rem 0.85rem;
}

.tg-pagination-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    line-height: 1;
    transform: translateY(-1px);
}

.tg-pagination-page-label {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tg-pagination-page-value {
    color: #1e293b;
    font-size: 1rem;
    font-weight: 700;
}

.tg-pagination-page-total {
    color: #64748b;
    font-weight: 600;
}

.post-item .badge {
    display: inline-block;
    background: #e2e8f0;
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #334155;
}

/* Feed & composer --------------------------------------------------------- */
/* Feed page layout & background ------------------------------------------*/
body.tg-feed {
    background: #F5F2ED;
}

.tg-feed__layout {
    display: grid;
    gap: 1.5rem;
    margin: 2rem auto;
    max-width: 1100px;
    padding: 0 1.25rem;
}

.tg-feed__main {
    background: transparent;
}

/* Remove card styling from feed panel container */
.tg-card.tg-feed-panel {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

/* Composer card styling */
.tg-card.tg-composer {
    position: relative;
    background: #ffffff;
    border: none;
    border-radius: 1.4rem;
    box-shadow: none;
    padding: 1.35rem;
    margin-bottom: 1.25rem;
    z-index: 1850;
}

.edit-indicator {
    display: block;
    min-height: 1.2rem;
    margin-bottom: 0.35rem;
    text-align: right;
    font-size: 0.85rem;
    color: #6a7367;
    font-style: italic;
    position: relative;
    z-index: 1;
}

.tg-composer__form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    position: relative;
    z-index: 1;
}

.tg-composer__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.tg-composer__header h2 {
    margin: 0;
    color: #243426;
}

.tg-composer__header p {
    margin: 0.25rem 0 0;
    color: #778176;
}

.tg-composer__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.tg-composer__tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(84, 106, 80, 0.12);
    border-radius: 999px;
    padding: 0.55rem 0.95rem;
    background: rgba(255, 255, 255, 0.64);
    color: #546650;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.tg-composer__tab:hover,
.tg-composer__tab:focus-visible {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(84, 106, 80, 0.2);
    transform: translateY(-1px);
}

.tg-composer__tab.is-active {
    background: #6c8f65;
    border-color: #587552;
    color: #ffffff;
    box-shadow: 0 10px 18px rgba(84, 106, 80, 0.18);
}

.tg-composer__field {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    min-width: 0;
}

.tg-composer__label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #4e6252;
}

.tg-composer__hint {
    margin: 0.25rem 0 0;
    color: #6a7367;
    font-size: 0.82rem;
}

.tg-composer__form textarea.input-field {
    min-height: 7.25rem;
    resize: vertical;
    margin-bottom: 0;
    padding: 1rem 1.05rem;
    border: 1px solid rgba(84, 106, 80, 0.14);
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 8px 18px rgba(61, 73, 55, 0.04);
    color: #253728;
    line-height: 1.6;
}

.tg-composer__form textarea.input-field:focus,
.tg-composer__visibility .input-field:focus {
    border-color: rgba(84, 106, 80, 0.3);
    box-shadow: 0 0 0 4px rgba(108, 143, 101, 0.12);
    outline: none;
}

.tg-composer__form textarea.input-field::placeholder {
    color: #7d8777;
}

.tg-composer__media-preview {
    margin: 0;
    position: relative;
    z-index: 1;
}

.tg-composer__media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.tg-composer__media-grid img {
    width: 100%;
    border-radius: 0.9rem;
    object-fit: cover;
    aspect-ratio: 4 / 3;
}

.tg-composer__media-clear {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
    font-size: 0.85rem;
}

.tg-composer__media-clear:hover {
    color: #334155;
}

.tg-composer__controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.9rem;
    align-items: stretch;
}

.tg-composer__visibility {
    min-width: 0;
}

.tg-composer__visibility,
.tg-composer__media,
.tg-composer__circles,
.tg-composer__federate,
.tg-selected-circles {
    position: relative;
    z-index: 1;
    padding: 0.85rem 0.95rem;
    border-radius: 1.15rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(84, 106, 80, 0.1);
}

.tg-composer__visibility .input-field {
    margin: 0;
    border-radius: 0.95rem;
    border: 1px solid rgba(84, 106, 80, 0.14);
    background: rgba(255, 255, 255, 0.92);
}

.tg-composer__media {
    display: grid;
    gap: 0.45rem;
}

.tg-composer__media-input {
    position: relative;
    cursor: pointer;
    display: grid;
    gap: 0.35rem;
}

.tg-composer__media-input input[type="file"] {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.tg-composer__media-input span {
    font-weight: 600;
    color: #243426;
}

.tg-composer__media-input small {
    color: #647067;
}

.tg-composer__media-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.85rem;
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tg-composer__media-input:hover .tg-composer__media-label {
    background: #f1f5f9;
    border-color: #cbd5e0;
}

.tg-composer__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    position: relative;
    z-index: 1;
}

.tg-composer__actions .submit-button {
    min-width: 8.5rem;
    border-radius: 999px;
    box-shadow: 0 12px 22px rgba(84, 106, 80, 0.2);
}

.tg-composer__actions .button {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(84, 106, 80, 0.12);
    color: #475748;
}

.tg-composer__toggle,
.tg-composer__federate-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    font-size: 0.85rem;
    color: #475748;
    cursor: pointer;
}

.tg-composer__toggle input[type="checkbox"],
.tg-composer__federate-toggle input[type="checkbox"] {
    cursor: pointer;
    accent-color: #6c8f65;
}

.tg-composer__toggle span,
.tg-composer__federate-toggle span {
    cursor: pointer;
}

/* General card styling for other components */
.tg-card {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 1.25rem;
    padding: 1.5rem;
}

/* Feed layout responsiveness */
.tg-feed__layout.has-sidebar {
    grid-template-columns: minmax(0, 1fr) 320px;
}

@media (max-width: 980px) {
    .tg-feed__layout.has-sidebar {
        grid-template-columns: 1fr;
    }
}

.tg-feed__header {
    margin-bottom: 1.25rem;
}

.tg-feed__header h1 {
    margin-bottom: 0.25rem;
}

.tg-composer__circle-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.tg-feed-panel__filters {
    margin-bottom: 1rem;
    background: #ffffff;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    box-shadow: none;
}

.tg-feed-panel__list {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: transparent;
}

.tg-feed-panel__empty {
    color: #64748b;
    font-style: italic;
    padding: 2rem;
}

.tg-feed-post__meta,
.tg-user-post__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    font-size: 0.9rem;
    color: #475569;
    margin-bottom: 0.75rem;
}

.tg-feed-post__author {
    font-weight: 600;
    color: #1f2937;
}

.tg-feed-post__badges,
.tg-user-post__badges {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tg-feed-badge,
.tg-user-post__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: #f1f5f9;
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
}

.tg-feed-post__body,
.tg-user-post__body {
    margin-bottom: 0.75rem;
    white-space: pre-wrap;
}

.tg-feed-post__media,
.tg-user-post__media {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.tg-feed-post__media.is-grid,
.tg-user-post__media.is-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.tg-feed-post__media img,
.tg-user-post__media img {
    width: 100%;
    border-radius: 0.9rem;
}

.tg-feed-post__media img {
    object-fit: cover;
    aspect-ratio: 4 / 3;
}

.tg-user-post__media img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: min(70vh, 42rem);
    margin: 0 auto;
    object-fit: contain;
}

.tg-feed-post__actions,
.tg-user-post__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tg-feed-panel__pagination,
.tg-user-post__pagination {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    margin-bottom: 0.75rem;
}

.tg-user-post__pagination {
    justify-content: center;
}

@media (max-width: 640px) {
    .tg-feed-panel__pagination,
    .tg-user-post__pagination,
    .tg-stream-feed__pagination {
        gap: 0.55rem;
    }

    .tg-stream-feed__page-btn,
    .tg-feed-panel__page-btn,
    .tg-user-post__page-btn {
        height: 2.3rem;
        min-width: 2.3rem;
    }

    .tg-stream-feed__page-info,
    .tg-feed-panel__page-info,
    .tg-user-post__page-info {
        padding: 0.35rem 0.7rem;
    }
}

.tg-profile-card__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.tg-profile-card__self {
    font-size: 0.9rem;
    color: #64748b;
}

.tg-profile-posts__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.tg-profile-posts--plain {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.tg-profile-circles__detail {
    margin-top: 0.75rem;
}

@media (max-width: 900px) {
    .tg-composer__controls {
        grid-template-columns: 1fr;
    }

    .tg-composer__actions {
        justify-content: flex-start;
    }

    .tg-composer__toggle,
    .tg-composer__federate-toggle {
        margin-left: 0;
    }
}

@media (max-width: 640px) {
    .tg-composer--profile {
        margin-top: 0.15rem;
    }

    .tg-card.tg-composer {
        padding: 1rem;
    }

    .tg-composer--profile .tg-composer__form {
        gap: 0.65rem;
    }

    .tg-composer--profile .edit-indicator {
        min-height: 0;
        margin-bottom: 0;
    }

    .tg-composer--profile .tg-composer__controls,
    .tg-composer--profile .tg-selected-circles,
    .tg-composer--profile .tg-composer__actions,
    .tg-composer--profile .tg-composer__media-preview {
        opacity: 0;
        transform: translateY(-0.45rem);
        max-height: 0;
        overflow: hidden;
        pointer-events: none;
        margin: 0;
        transition: opacity 0.24s ease, transform 0.28s ease, max-height 0.32s ease, margin 0.28s ease, padding 0.28s ease;
    }

    .tg-composer--profile.is-expanded .tg-composer__controls,
    .tg-composer--profile.is-expanded .tg-selected-circles,
    .tg-composer--profile.is-expanded .tg-composer__actions,
    .tg-composer--profile.is-expanded .tg-composer__media-preview {
        opacity: 1;
        transform: translateY(0);
        max-height: 24rem;
        overflow: visible;
        pointer-events: auto;
    }

    .tg-composer__tabs {
        gap: 0.45rem;
    }

    .tg-composer__tab {
        width: 100%;
    }

    .tg-composer__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .tg-composer__actions .submit-button,
    .tg-composer__actions .button {
        width: 100%;
    }
}

/* Visibility pills UI ---------------------------------------------------- */
.tg-visibility-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
}

.tg-visibility-pill,
.tg-circle-pill {
    background: #f1f5f9;
    border: 2px solid transparent;
    border-radius: 999px;
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.tg-visibility-pill:hover,
.tg-circle-pill:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.tg-visibility-pill.is-active,
.tg-circle-pill.is-active {
    background: #6c8f65;
    color: #ffffff;
    border-color: #587552;
    box-shadow: 0 4px 12px rgba(108, 143, 101, 0.3);
}

.tg-visibility-pill:focus,
.tg-circle-pill:focus {
    outline: 2px solid #6c8f65;
    outline-offset: 2px;
}

.tg-circle-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tg-selected-circles {
    margin: 0;
    padding: 0;
    border: none;
}

.tg-selected-circles-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tg-selected-circle-tag {
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    color: #2c5282;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* Note card UI (from weights/run) ---------------------------------------- */
.note-container,
.tg-note-container {
    position: relative;
    padding-top: 1rem;
    padding-bottom: 0.5rem;
    margin-top: 4rem;
}

.note-profile-pic,
.tg-note-profile-pic {
    width: 6rem;
    height: 6rem;
    border-radius: 50%;
    object-fit: cover;
    position: absolute;
    top: calc(-3rem - 3px);
    left: 2rem;
    border: 3px solid white;
    background: #fff;
}

.note-circle-1 {
    --note-visibility-color: var(--forest-green);
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    object-fit: cover;
    position: absolute;
    top: calc(-0.95rem - 3px);
    left: 8.95rem;
    border: 3px solid white;
    background-color: var(--note-visibility-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: help;
}

.note-circle-1--private,
.note-circle-1-info--private {
    --note-visibility-color: var(--terracotta);
}

.note-circle-1--friends,
.note-circle-1-info--friends {
    --note-visibility-color: var(--dusty-blue);
}

.note-circle-1--public,
.note-circle-1-info--public {
    --note-visibility-color: var(--forest-green);
}

.note-circle-1-info {
    z-index: 100;
    min-height: 1.9rem;
    border-radius: 10rem;
    position: absolute;
    top: calc(-0.95rem - 3px);
    left: 9.8rem;
    background-color: var(--note-visibility-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    white-space: nowrap;
    width: 0;
    padding: 0;
    border: 3px solid white;
    box-sizing: border-box;
    transition: width 0.3s ease, padding 0.3s ease, left 0.3s ease;
}

.note-circle-1:hover + .note-circle-1-info,
.note-circle-1:focus + .note-circle-1-info {
    width: min(360px, calc(100vw - 6rem));
    padding: 0.15rem 0.65rem;
    left: 11.1rem;
    border: 3px solid white;
}

.note-circle-1-content {
    color: #fff;
    font-weight: 600;
    font-size: 0.76rem;
    line-height: 1.2;
}

.note-circle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    opacity: 0.9;
}

.note-circle-icon svg,
.note-circle-icon i {
    display: block;
    width: 20px;
    height: 20px;
}

.note-header,
.tg-note-header {
    margin-left: 7rem;
    margin-top: 0.5rem;
}

.note-header strong,
.tg-note-header strong {
    font-weight: bold;
}

.note-header small,
.tg-note-header small {
    opacity: 0.6;
}

.note-content,
.tg-note-content {
    margin-left: 0rem;
    margin-top: 2rem;
}

.note-content p,
.tg-note-content p {
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
}

.note-content small .pill,
.tg-note-badges .pill {
    display: inline-block;
    margin-right: 0rem;
}

.tg-feed-post__menu,
.tg-user-post__menu {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 3;
}

.tg-user-post__menu {
    top: 0.95rem;
}

.tg-feed-post__menu-button,
.tg-user-post__menu-button {
    border: none;
    background: transparent;
    color: #6b7280;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 999px;
    cursor: pointer;
    line-height: 1;
    font-size: 1.15rem;
}

.tg-feed-post__menu-button:hover,
.tg-feed-post__menu-button:focus-visible,
.tg-user-post__menu-button:hover,
.tg-user-post__menu-button:focus-visible {
    background: #f3f4f6;
    color: #111827;
}

.tg-feed-post__menu-list,
.tg-user-post__menu-list {
    position: absolute;
    top: 2rem;
    right: 0;
    min-width: 9rem;
    padding: 0.25rem;
    border-radius: 0.5rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.tg-feed-post__menu-item,
.tg-user-post__menu-item {
    width: 100%;
    border: none;
    border-radius: 0.4rem;
    padding: 0.5rem 0.65rem;
    background: transparent;
    text-align: left;
    font-size: 0.85rem;
    cursor: pointer;
    color: #111827;
}

.tg-feed-post__menu-item:hover,
.tg-feed-post__menu-item:focus-visible,
.tg-user-post__menu-item:hover,
.tg-user-post__menu-item:focus-visible {
    background: #f9fafb;
}

.tg-feed-post__menu-item.is-danger,
.tg-user-post__menu-item.is-danger {
    color: #b91c1c;
}

.tg-post-edit-card {
    background: #ffffff;
    border-radius: 1.5rem;
    box-shadow: 0 28px 64px rgba(15, 23, 42, 0.14);
}

.tg-post-edit-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tg-post-edit-card__header h2 {
    margin: 0;
    color: #243426;
}

.tg-post-edit-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tg-post-edit-status {
    margin: 0;
    min-height: 1.2rem;
    color: #6a7367;
    font-size: 0.9rem;
    text-align: right;
}

.tg-post-edit-media {
    padding: 0.85rem 0.95rem;
    border-radius: 1.15rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(84, 106, 80, 0.1);
}

.tg-post-edit-media .tg-user-post__media {
    margin-bottom: 0;
}

.tg-post-edit-federate,
.tg-post-edit-circles {
    padding: 0.85rem 0.95rem;
    border-radius: 1.15rem;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(84, 106, 80, 0.1);
}

.tg-post-edit-circle-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.75rem;
}

.tg-post-edit-circle-option {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    background: #f8f9fa;
    border: 1px solid #d9e2d1;
    color: #334155;
    cursor: pointer;
}

.tg-post-edit-circle-option input {
    accent-color: #6c8f65;
}

.tg-post-edit-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.tg-post-edit-actions .submit-button,
.tg-post-edit-actions .button {
    border-radius: 999px;
}

.tg-post-edit-delete {
    margin-left: auto;
}

@media (max-width: 640px) {
    .tg-post-edit-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .tg-post-edit-delete {
        margin-left: 0;
    }
}

.tg-note-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tg-note-badges .pill {
    display: inline-block;
    background: #f1f1f1;
    border-radius: 16px;
    padding: 4px 10px;
    font-size: 0.7rem;
    line-height: 1.2;
}

.tg-feed-post__media {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.tg-feed-post__actions {
    margin-top: 0.75rem;
    margin-left: -0.5rem;
}

@media (max-width: 768px) {
    .note-header,
    .tg-note-header {
        margin-left: 8rem;
        margin-top: 0.5rem;
    }
    
    .note-content,
    .tg-note-content {
        margin-left: 0;
        margin-top: 2rem;
    }
    
    .tg-feed-post__actions {
        margin-left: 0.5rem;
    }
}

@media (max-width: 768px) {
    .note-header,
    .tg-note-header {
        margin-left: 8rem;
        margin-top: 0.5rem;
    }
    
    .note-content,
    .tg-note-content {
        margin-left: 0;
        margin-top: 2rem;
    }
}

/* Feed post with note card style ----------------------------------------- */
.tg-feed-post--note {
    position: relative;
    padding-top: 4rem;
    margin-top: 4rem;
}

.tg-feed-post--note .tg-feed-post__meta {
    margin-left: 7rem;
}

.tg-feed-post--note .tg-feed-post__body {
    margin-left: -0.5rem;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .tg-feed-post--note .tg-feed-post__meta {
        margin-left: 8rem;
    }
    
    .tg-feed-post--note .tg-feed-post__body {
        margin-left: 0.5rem;
    }
}
