/* Kuchikomi Wall — Floating popup template */

.tmnl-floating-widget {
    --tmnl-bg:     #ffffff;
    --tmnl-text:   #334155;
    --tmnl-border: #e2e8f0;
    --tmnl-muted:  #94a3b8;
    --tmnl-star:   #f5a623;
    --tmnl-shadow: 0 8px 24px rgba(0,0,0,.14);

    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9999;
    width: 300px;
    background: var(--tmnl-bg);
    border: 1px solid var(--tmnl-border);
    border-radius: 12px;
    box-shadow: var(--tmnl-shadow);
    padding: 16px;
    font-family: inherit;
    font-size: 13px;
    color: var(--tmnl-text);
    transition: opacity .3s, transform .3s;
}

.tmnl-floating-widget.tmnl-float-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
}

/* Close button */
.tmnl-floating-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    color: var(--tmnl-muted);
    cursor: pointer;
    line-height: 1;
    padding: 2px 4px;
}
.tmnl-floating-close:hover { color: var(--tmnl-text); }

/* Author row */
.tmnl-floating-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.tmnl-floating-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.tmnl-floating-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.tmnl-floating-name {
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tmnl-floating-meta .tmnl-stars {
    color: var(--tmnl-star);
    font-size: 13px;
}

/* Text */
.tmnl-floating-text {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.65;
    color: var(--tmnl-text);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tmnl-floating-date {
    display: block;
    font-size: 11px;
    color: var(--tmnl-muted);
    margin-bottom: 10px;
}

/* Navigation */
.tmnl-floating-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--tmnl-border);
    padding-top: 10px;
    margin-top: 4px;
}

.tmnl-floating-counter {
    font-size: 11px;
    color: var(--tmnl-muted);
}

.tmnl-floating-nav-btns {
    display: flex;
    gap: 4px;
}

.tmnl-float-prev,
.tmnl-float-next {
    background: none;
    border: 1px solid var(--tmnl-border);
    border-radius: 4px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--tmnl-text);
    transition: background .15s;
}
.tmnl-float-prev:hover,
.tmnl-float-next:hover { background: var(--tmnl-border); }

/* Dark */
.tmnl-floating-widget.tmnl-color-dark {
    --tmnl-bg:     #1e293b;
    --tmnl-text:   #e2e8f0;
    --tmnl-border: #334155;
    --tmnl-muted:  #64748b;
    --tmnl-shadow: 0 8px 24px rgba(0,0,0,.4);
}

/* Auto */
@media (prefers-color-scheme: dark) {
    .tmnl-floating-widget.tmnl-color-auto {
        --tmnl-bg:     #1e293b;
        --tmnl-text:   #e2e8f0;
        --tmnl-border: #334155;
        --tmnl-muted:  #64748b;
        --tmnl-shadow: 0 8px 24px rgba(0,0,0,.4);
    }
}

/* Responsive: move to right on large screens */
@media (min-width: 768px) {
    .tmnl-floating-widget {
        left: auto;
        right: 24px;
    }
}
