/* Thought-style post cards, recording overlay, and review overlay.
   Layout matches the Thoughts project; colors follow Persona gold/black. */

.tp-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    max-width: none;
}
.tp-group {
    width: 100%;
    min-width: 0;
    display: flex;
    justify-content: center;
}
.tp-group-inner {
    width: 100%;
    max-width: 40rem;
    min-width: 0;
}
.tp-group-scroll {
    display: flex;
    align-items: flex-start;
    justify-content: safe center;
    gap: 0.75rem;
    max-width: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.2rem;
}
.tp-group-scroll > .tp-card-wrap {
    flex: 0 0 min(86%, 24rem);
    align-self: flex-start;
    max-width: 24rem;
    scroll-snap-align: start;
}
.tp-card-wrap {
    min-width: 0;
    width: 100%;
    max-width: 40rem;
    margin-inline: auto;
}
.tp-card {
    position: relative;
    background: var(--black-2, #111);
    border: 1px solid var(--border, rgba(201, 168, 76, 0.18));
    border-radius: 1rem;
    padding: 1rem;
    color: var(--white, #f5f0e8);
    max-height: 320px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.tp-card-inactive {
    opacity: 0.62;
}
.tp-chip-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.55rem;
    flex-shrink: 0;
}
.tp-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.2;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    border: 1px solid;
    background: transparent;
}
.tp-chip-gold {
    background: rgba(201, 168, 76, 0.16);
    color: var(--gold-light, #e8c97a);
    border-color: rgba(201, 168, 76, 0.35);
}
.tp-chip-warn {
    background: rgba(201, 168, 76, 0.2);
    color: var(--gold-light, #e8c97a);
    border-color: rgba(201, 168, 76, 0.45);
}
.tp-chip-muted {
    background: rgba(136, 136, 136, 0.12);
    color: var(--gray, #888);
    border-color: rgba(136, 136, 136, 0.28);
}
.tp-body {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}
.tp-cover {
    flex-shrink: 0;
    width: 6rem;
    min-height: 0;
    max-height: 100%;
    border-radius: 0.75rem;
    overflow: hidden;
    background: var(--black-4, #242424);
    padding: 0;
    border: 0;
    align-self: stretch;
}
.tp-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.tp-main {
    min-width: 0;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.tp-thumbs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    flex-shrink: 0;
}
.tp-thumbs::-webkit-scrollbar {
    display: none;
}
.tp-thumb {
    width: 2rem;
    height: 2rem;
    border-radius: 0.25rem;
    overflow: hidden;
    background: var(--black-4, #242424);
    flex-shrink: 0;
    padding: 0;
    border: 0;
}
.tp-thumb img {
    width: 2rem;
    height: 2rem;
    object-fit: cover;
    display: block;
}
.tp-text,
.thought-md {
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--white, #f5f0e8);
    margin-bottom: 0.45rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.tp-card .tp-text {
    overflow: hidden;
    min-height: 0;
    flex: 1 1 auto;
    max-height: 320px;
}
.tp-text > *:first-child,
.thought-md > *:first-child { margin-top: 0; }
.tp-text > *:last-child,
.thought-md > *:last-child { margin-bottom: 0; }
.tp-text p,
.thought-md p {
    margin: 0 0 0.7em;
}
.tp-text p:last-child,
.thought-md p:last-child {
    margin-bottom: 0;
}
.tp-text h1, .thought-md h1,
.tp-text h2, .thought-md h2,
.tp-text h3, .thought-md h3,
.tp-text h4, .thought-md h4,
.tp-text h5, .thought-md h5,
.tp-text h6, .thought-md h6 {
    color: var(--white, #f5f0e8);
    font-weight: 600;
    line-height: 1.3;
    margin: 0.7em 0 0.35em;
}
.tp-text h1, .thought-md h1 { font-size: 1.15rem; }
.tp-text h2, .thought-md h2 { font-size: 1.05rem; }
.tp-text h3, .thought-md h3 { font-size: 1rem; }
.tp-text h4, .thought-md h4,
.tp-text h5, .thought-md h5,
.tp-text h6, .thought-md h6 { font-size: 0.95rem; }
.tp-text ul, .thought-md ul,
.tp-text ol, .thought-md ol {
    margin: 0.35em 0 0.55em;
    padding-left: 1.2em;
}
.tp-text ul, .thought-md ul { list-style: disc; }
.tp-text ol, .thought-md ol { list-style: decimal; }
.tp-text li, .thought-md li { margin: 0.15em 0; }
.tp-text blockquote, .thought-md blockquote {
    margin: 0.4em 0;
    padding: 0.15em 0 0.15em 0.75em;
    border-left: 2px solid var(--gold, #c9a84c);
    color: var(--gray-light, #bbb);
}
.tp-text code, .thought-md code {
    font-size: 0.85em;
    background: var(--black-3, #1a1a1a);
    border: 1px solid var(--black-4, #242424);
    border-radius: 0.3rem;
    padding: 0.05em 0.35em;
}
.tp-text pre, .thought-md pre {
    margin: 0.45em 0;
    padding: 0.65em 0.75em;
    background: var(--black, #080808);
    border: 1px solid var(--black-4, #242424);
    border-radius: 0.6rem;
    overflow-x: auto;
    font-size: 0.8rem;
}
.tp-text pre code, .thought-md pre code {
    background: transparent;
    border: 0;
    padding: 0;
}
.tp-text a:not(.thought-link), .thought-md a:not(.thought-link) {
    color: var(--gold, #c9a84c);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.tp-text img, .thought-md img { max-width: 100%; height: auto; border-radius: 0.5rem; margin: 0.4em 0; }
.tp-text hr, .thought-md hr { border: 0; border-top: 1px solid var(--black-4, #242424); margin: 0.7em 0; }
.tp-text table, .thought-md table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.7em 0;
    font-size: 0.88em;
}
.tp-text th, .thought-md th,
.tp-text td, .thought-md td {
    border: 1px solid var(--border, rgba(201, 168, 76, 0.18));
    padding: 0.4em 0.6em;
    text-align: left;
    vertical-align: top;
}
.tp-text th, .thought-md th {
    background: var(--black-3, #1a1a1a);
    color: var(--gold-light, #e8c97a);
    font-weight: 600;
}
.tp-text .tp-table-wrap, .thought-md .tp-table-wrap {
    overflow-x: auto;
    margin: 0.7em 0;
    -webkit-overflow-scrolling: touch;
}
.tp-text .tp-table-wrap table, .thought-md .tp-table-wrap table {
    margin: 0;
}

.thought-link {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    max-width: 100%;
    height: 1.15em;
    vertical-align: -0.12em;
    margin: 0 0.12em;
    padding: 0 0.28em 0 0.12em;
    border-radius: 0.25rem;
    background: var(--black-3, #1a1a1a);
    border: 1px solid var(--black-4, #242424);
    color: var(--gold, #c9a84c) !important;
    text-decoration: none !important;
    font-size: 0.9em;
    line-height: 1;
    cursor: pointer;
}
.thought-link-icon {
    width: 0.85em;
    height: 0.85em;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--black, #080808);
}
.thought-link-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 16rem;
}

.link-preview {
    position: fixed;
    z-index: 10030;
    width: min(22rem, calc(100vw - 1rem));
    background: var(--black, #080808);
    border: 1px solid var(--black-4, #242424);
    border-radius: 1rem;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    display: none;
    flex-direction: column;
    max-height: min(28rem, calc(100vh - 1rem));
}
.link-preview.open {
    display: flex;
}
.link-preview.zen {
    inset: 0.5rem !important;
    width: auto;
    max-height: none;
    height: auto;
    border-radius: 0.75rem;
    left: 0.5rem !important;
    top: 0.5rem !important;
    right: 0.5rem;
    bottom: 0.5rem;
}
.link-preview-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--black-4, #242424);
    background: var(--black-2, #111);
    flex-shrink: 0;
    cursor: grab;
    touch-action: none;
}
.link-preview-bar:active {
    cursor: grabbing;
}
.link-preview-favicon {
    width: 1rem;
    height: 1rem;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
    display: none;
}
.link-preview-favicon.show {
    display: block;
}
.link-preview-title {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.75rem;
    color: var(--gray-light, #bbb);
}
.link-preview-bar button {
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray, #888);
    flex-shrink: 0;
}
.link-preview-bar button:hover {
    background: var(--black-3, #1a1a1a);
    color: var(--white, #f5f0e8);
}
.link-preview-frame {
    width: 100%;
    flex: 1;
    min-height: 12rem;
    border: 0;
    background: #000;
}
.link-preview.zen .link-preview-frame {
    min-height: 0;
}

.tp-post-preview {
    margin-top: 0.75rem;
    padding: 0.85rem;
    background: var(--black-3, #1a1a1a);
    border: 1px solid var(--border, rgba(201, 168, 76, 0.18));
    border-radius: 0.75rem;
    max-height: 22rem;
    overflow: auto;
}
.tp-text.has-audio {
    cursor: pointer;
}
.tp-read-more {
    flex-shrink: 0;
    align-self: flex-start;
    background: none;
    border: 0;
    color: var(--gold, #c9a84c);
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    padding: 0.15rem 0 0.2rem;
    margin: 0 0 0.2rem;
    font-family: inherit;
}
.tp-read-more:hover {
    color: var(--gold-light, #e8c97a);
}
.tp-audio-hint {
    color: var(--gray, #888);
    font-style: italic;
    font-size: 0.85rem;
    margin-bottom: 0.45rem;
    flex-shrink: 0;
}
.tp-progress {
    display: none;
    align-items: center;
    gap: 0.5rem;
    background: var(--black-3, #1a1a1a);
    border-radius: 0.5rem;
    padding: 0.45rem 0.55rem;
    margin-bottom: 0.55rem;
    flex-shrink: 0;
}
.tp-card.is-playing .tp-progress {
    display: flex;
}
.tp-progress-bar {
    flex: 1;
    height: 4px;
    background: var(--black-4, #242424);
    border-radius: 999px;
    overflow: hidden;
}
.tp-progress-fill {
    height: 100%;
    width: 0;
    background: var(--gold, #c9a84c);
    transition: width 0.2s linear;
}
.tp-progress iconify-icon {
    color: var(--gold, #c9a84c);
}
.tp-meta {
    font-size: 0.72rem;
    color: var(--gray, #888);
    margin-top: 0.65rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.tp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.5rem;
    flex-shrink: 0;
}
.tp-tag {
    font-size: 0.72rem;
    background: var(--black-4, #242424);
    color: var(--gray-light, #bbb);
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}
.tp-depends {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.5rem;
    font-size: 0.72rem;
    color: var(--gray, #888);
    flex-shrink: 0;
}
.tp-depends-name {
    color: var(--gray-light, #bbb);
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tp-actions {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.55rem;
    padding-top: 0;
    border-top: 0;
    flex-shrink: 0;
}
.tp-bookmark {
    position: static;
    display: inline-flex;
    vertical-align: -0.22em;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    margin: 0 0.4em 0 0;
    padding: 0;
    border: 0;
    border-radius: 0.3rem;
    background: transparent;
    color: var(--gray, #888);
    cursor: pointer;
    flex-shrink: 0;
    user-select: none;
    white-space: nowrap;
}
.tp-bookmark iconify-icon {
    font-size: 1.15rem;
    display: block;
    line-height: 1;
}
.tp-bookmark:hover {
    color: var(--gold-light, #e8c97a);
    background: rgba(201, 168, 76, 0.12);
}
.tp-bookmark.is-on {
    color: #e8c97a;
    background: rgba(201, 168, 76, 0.16);
}
.tp-bookmark.is-on iconify-icon {
    color: #e8c97a;
}

.tp-world {
    margin-top: 1.25rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--border, rgba(201, 168, 76, 0.18));
}
.tp-text h3.tp-world-title,
.thought-md h3.tp-world-title {
    font-size: 0.65rem !important;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gray, #888);
    font-weight: 600;
    line-height: 1.3;
    margin: 0.9em 0 0.45em !important;
}
.tp-world > h3.tp-world-title:first-child {
    margin-top: 0 !important;
}
.tp-world-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin: 0 0 0.85rem;
}
.tp-world-stat {
    background: var(--black-3, #1a1a1a);
    border: 1px solid var(--black-4, #242424);
    border-radius: 0.75rem;
    padding: 0.7rem 0.75rem;
}
.tp-world-stat.span-2 {
    grid-column: 1 / -1;
}
.tp-world-label {
    font-size: 0.65rem;
    color: var(--gray, #888);
    margin-bottom: 0.2rem;
}
.tp-world-value {
    font-size: 0.875rem;
    color: var(--white, #f5f0e8);
    line-height: 1.3;
}
.tp-actions-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-width: 0;
}
.tp-act {
    height: 2rem;
    min-width: 2rem;
    padding: 0 0.4rem;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    color: var(--gray, #888);
    background: transparent;
    border: 0;
    font-size: 0.75rem;
    font-family: inherit;
}
.tp-act:hover {
    background: var(--black-3, #1a1a1a);
    color: var(--white, #f5f0e8);
}
.tp-act-side {
    justify-self: start;
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
    color: var(--gray-light, #bbb);
}
.tp-act-side.after {
    justify-self: end;
}
.tp-act-count {
    font-size: 0.62rem;
    font-variant-numeric: tabular-nums;
}
.tp-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray, #888);
}
.tp-empty-icon {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 999px;
    background: var(--black-3, #1a1a1a);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.8rem;
    color: var(--gold-dim, #7a6228);
}

/* Recording / review overlays */
.tp-overlay {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: none;
    flex-direction: column;
    background: #000;
    color: var(--white, #f5f0e8);
    overscroll-behavior: none;
}
.tp-overlay.open {
    display: flex;
}
.tp-rec-bg {
    background: radial-gradient(circle at center, #141414 0%, #000 70%);
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1.5rem 5rem;
}
.tp-rec-close {
    position: absolute;
    top: max(1rem, env(safe-area-inset-top, 0px));
    left: max(1rem, env(safe-area-inset-left, 0px));
    right: auto;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    background: rgba(26, 26, 26, 0.85);
    color: var(--gray-light, #bbb);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    z-index: 2;
}
.tp-rec-close:hover {
    color: var(--white, #f5f0e8);
    background: rgba(36, 36, 36, 0.95);
}
.tp-rec-context {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(1em + env(safe-area-inset-bottom, 0px));
    z-index: 2;
    display: none;
}
.tp-rec-context.show {
    display: block;
}
.tp-rec-context span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.75rem;
    background: rgba(26, 26, 26, 0.85);
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    color: var(--gold, #c9a84c);
    border: 1px solid rgba(201, 168, 76, 0.3);
}
.tp-audio-bubble {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(201, 168, 76, 0.85), rgba(201, 168, 76, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    margin-bottom: 2rem;
}
.tp-audio-bubble:active {
    transform: scale(0.95);
}
.tp-audio-bubble iconify-icon {
    font-size: 3.2rem;
    color: #000;
    z-index: 2;
}
.tp-ripple {
    position: absolute;
    inset: -20px;
    border: 2px solid rgba(201, 168, 76, 0.55);
    border-radius: 50%;
    pointer-events: none;
    display: none;
}
.tp-recording .tp-ripple {
    display: block;
    animation: tp-pulse-ring 2s ease-out infinite;
}
@keyframes tp-pulse-ring {
    0% { transform: scale(0.85); opacity: 0.7; }
    100% { transform: scale(1.15); opacity: 0; }
}
.tp-spin {
    animation: tp-spin 1s linear infinite;
}
@keyframes tp-spin {
    to { transform: rotate(360deg); }
}
.tp-rec-status {
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--gray-light, #bbb);
    font-size: 0.9rem;
    text-align: center;
}
.tp-wave {
    display: none;
    align-items: center;
    justify-content: center;
    height: 3rem;
}
.tp-recording .tp-wave {
    display: flex;
}
.tp-recording .tp-status-idle,
.tp-paused .tp-status-idle,
.tp-transcribing .tp-status-idle {
    display: none;
}
.tp-wave-bar {
    display: inline-block;
    width: 4px;
    background: var(--gold, #c9a84c);
    margin: 0 2px;
    border-radius: 2px;
    animation: tp-wave 1.2s ease-in-out infinite;
    height: 20%;
}
.tp-wave-bar:nth-child(1) { animation-delay: 0s; }
.tp-wave-bar:nth-child(2) { animation-delay: 0.1s; }
.tp-wave-bar:nth-child(3) { animation-delay: 0.2s; }
.tp-wave-bar:nth-child(4) { animation-delay: 0.3s; }
.tp-wave-bar:nth-child(5) { animation-delay: 0.4s; }
.tp-wave-bar:nth-child(6) { animation-delay: 0.5s; }
.tp-wave-bar:nth-child(7) { animation-delay: 0.6s; }
.tp-wave-bar:nth-child(8) { animation-delay: 0.7s; }
@keyframes tp-wave {
    0%, 100% { height: 10%; }
    50% { height: 80%; }
}
.tp-rec-transcript {
    width: 100%;
    max-width: 28rem;
    background: rgba(17, 17, 17, 0.7);
    border: 1px solid var(--black-4, #242424);
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: none;
}
.tp-rec-transcript.show {
    display: block;
}
.tp-rec-transcript-label {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gray, #888);
    margin-bottom: 0.4rem;
}
.tp-rec-transcript-text {
    line-height: 1.55;
    color: var(--white, #f5f0e8);
}
.tp-rec-interim {
    color: var(--gray, #888);
    font-style: italic;
}
.tp-rec-btns {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.tp-rec-btn {
    width: 4rem;
    height: 4rem;
    border-radius: 999px;
    border: 1px solid var(--black-4, #242424);
    background: var(--black-3, #1a1a1a);
    color: var(--white, #f5f0e8);
    display: flex;
    align-items: center;
    justify-content: center;
}
.tp-rec-btn iconify-icon {
    font-size: 1.35rem;
}
.tp-rec-btn.gold {
    background: var(--gold, #c9a84c);
    color: #000;
    border-color: var(--gold, #c9a84c);
}
.tp-rec-btn.stop {
    background: #e05555;
    color: #fff;
    border-color: #e05555;
}
.tp-rec-duration {
    margin-top: 1.25rem;
    color: var(--gray, #888);
    font-family: ui-monospace, monospace;
    font-size: 0.85rem;
    display: none;
}
.tp-recording .tp-rec-duration,
.tp-paused .tp-rec-duration {
    display: block;
}

/* Review */
.tp-review-head,
.tp-review-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--black-4, #242424);
    flex-shrink: 0;
}
.tp-review-foot {
    border-bottom: 0;
    border-top: 1px solid var(--black-4, #242424);
}
.tp-review-head h2 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}
.tp-review-body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1rem;
}
.tp-review-inner {
    max-width: 32rem;
    margin: 0 auto;
}
.tp-field {
    margin-bottom: 1rem;
}
.tp-field label {
    display: block;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gray, #888);
    margin-bottom: 0.45rem;
}
.tp-field input[type="text"],
.tp-field textarea,
.tp-field input[type="date"] {
    width: 100%;
    background: var(--black-3, #1a1a1a);
    border: 1px solid var(--black-4, #242424);
    border-radius: 0.75rem;
    padding: 0.7rem 0.85rem;
    color: var(--white, #f5f0e8);
    font-family: inherit;
    font-size: 0.92rem;
    outline: none;
}
.tp-field textarea {
    min-height: 8rem;
    resize: vertical;
    line-height: 1.5;
}
.tp-field input:focus,
.tp-field textarea:focus {
    border-color: var(--gold, #c9a84c);
}
.tp-review-audio {
    display: none;
    align-items: center;
    gap: 0.75rem;
    background: var(--black-3, #1a1a1a);
    border-radius: 0.75rem;
    padding: 0.7rem;
    margin-bottom: 1rem;
}
.tp-review-audio.show {
    display: flex;
}
.tp-review-audio button {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    background: var(--gold, #c9a84c);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
}
.tp-drop {
    border: 1px dashed var(--border, rgba(201, 168, 76, 0.18));
    border-radius: 0.75rem;
    padding: 1.1rem;
    text-align: center;
    color: var(--gray, #888);
    cursor: pointer;
    font-size: 0.85rem;
}
.tp-drop:hover,
.tp-drop.drag {
    border-color: var(--gold, #c9a84c);
    color: var(--gold-light, #e8c97a);
}
.tp-att-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
    gap: 0.5rem;
    margin-top: 0.6rem;
}
.tp-att-card {
    position: relative;
    border-radius: 0.6rem;
    overflow: hidden;
    background: var(--black-3, #1a1a1a);
    border: 1px solid var(--black-4, #242424);
}
.tp-att-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}
.tp-att-card-file {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold, #c9a84c);
    font-size: 1.4rem;
}
.tp-att-name {
    font-size: 0.65rem;
    padding: 0.3rem 0.4rem;
    color: var(--gray-light, #bbb);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tp-att-remove {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tp-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}
.tp-tag-add {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.5rem;
}
.tp-tag-add input {
    flex: 1;
}
.tp-tag-add button,
.tp-btn {
    border: 0;
    border-radius: 0.6rem;
    padding: 0.55rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.04em;
    cursor: pointer;
}
.tp-btn-ghost {
    background: var(--black-3, #1a1a1a);
    color: var(--gray-light, #bbb);
    flex: 1;
}
.tp-btn-gold {
    background: linear-gradient(90deg, #e8c97a, #c9a84c);
    color: #000;
    flex: 2;
}
.tp-toggle-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.tp-icon-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    border: 0;
    background: transparent;
    color: var(--gray-light, #bbb);
    display: flex;
    align-items: center;
    justify-content: center;
}
.tp-icon-btn:hover {
    background: var(--black-3, #1a1a1a);
    color: var(--white, #f5f0e8);
}

html.tp-lock,
html.tp-lock body,
html.tp-lock #main,
html.tp-lock #sidebar,
#main.tp-lock {
    overflow: hidden !important;
    overscroll-behavior: none;
}
body.tp-lock {
    position: fixed;
    width: 100%;
    left: 0;
    right: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

.tp-cam-wrap {
    position: relative;
    display: inline-flex;
}
.tp-cam-bubble {
    position: absolute;
    left: 50%;
    top: calc(100% + 0.5rem);
    transform: translateX(-50%);
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    z-index: 20;
}
.tp-cam-bubble.open,
.tp-cam-bubble:not([hidden]) {
    display: flex;
}
.tp-cam-bubble[hidden] {
    display: none;
}
.tp-cam-bubble-btn {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 0;
    padding: 3px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
}
.tp-cam-bubble-btn.clipboard {
    background: #d4d4d4;
    color: #0a0a0a;
}
.tp-cam-bubble-btn.capture {
    background: var(--black-3, #1a1a1a);
    color: var(--gold, #c9a84c);
    border: 1px solid var(--border, rgba(201, 168, 76, 0.18));
    padding: 0;
}
.tp-cam-bubble-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 999px;
}
.tp-cam-bubble-btn iconify-icon {
    font-size: 1.2rem;
}
.tp-cam-bubble-btn:hover {
    filter: brightness(1.08);
}
.tp-cam-overlay {
    background: #000;
}
.tp-cam-stage {
    flex: 1;
    min-height: 0;
    position: relative;
    background: #000;
}
.tp-cam-stage video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}
.tp-cam-foot {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
    background: #000;
}
.tp-cam-shutter {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 999px;
    background: #fff;
    border: 4px solid #737373;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    position: relative;
}
.tp-cam-shutter:hover {
    transform: scale(1.04);
}
.tp-cam-shutter:disabled {
    opacity: 0.6;
    pointer-events: none;
}
.tp-cam-shutter-ring {
    width: 3.15rem;
    height: 3.15rem;
    aspect-ratio: 1;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #d4d4d4;
    flex-shrink: 0;
}
.tp-cam-shutter-spin {
    display: none !important;
    font-size: 1.6rem;
    color: #1a1a1a;
    line-height: 1;
}
.tp-cam-shutter.capturing .tp-cam-shutter-ring {
    display: none !important;
}
.tp-cam-shutter.capturing .tp-cam-shutter-spin {
    display: flex !important;
}

@media (max-width: 720px) {
    .tp-list {
        max-width: none;
    }
    .tp-group-inner {
        max-width: none;
    }
    .tp-card-wrap {
        max-width: none;
    }
    .tp-group-scroll > .tp-card-wrap {
        flex-basis: 88%;
        max-width: none;
    }
}
