/* ── Footer player ── */
#klof-footer-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: #f2f2f2;
    border-top: 1px solid #ddd;
    transform: translateY(100%);
    transition: transform 0.25s ease;
    height: 130px;
}
#klof-footer-player.is-open { transform: translateY(0); }
#klof-footer-player-inner {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 12px;
    gap: 10px;
}
#klof-footer-iframe-wrap {
    flex: 1;
    height: 120px;
    overflow: hidden;
}
#klof-footer-iframe-wrap iframe { display: block; border: none; }
#klof-footer-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #666;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 6px 8px;
    line-height: 1;
}
#klof-footer-close:hover { color: #333; }

/* ── Overlay ── */
#klof-panel-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0,0,0,0.55);
    opacity: 0;
    transition: opacity 0.25s ease;
}
#klof-panel-overlay.is-open { display: block; opacity: 1; }

/* ── Slide-in panel ── */
#klof-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(560px, 100vw);
    z-index: 9999;
    background: #fff;
    box-shadow: -4px 0 24px rgba(0,0,0,0.18);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 140px;
}
#klof-panel.is-open { transform: translateX(0); }
#klof-panel-header {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #eee;
}
#klof-panel-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
#klof-panel-play {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 2px;
    font-size: 0.75rem;
    font-family: inherit;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: background 0.15s;
}
#klof-panel-play:hover { background: #333; }
#klof-panel-play svg { fill: currentColor; }
#klof-panel-close {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: #666;
    padding: 4px 8px;
    line-height: 1;
}
#klof-panel-close:hover { color: #000; }
#klof-panel-permalink {
    font-size: 0.8rem;
    color: #555;
    text-decoration: none;
    font-family: inherit;
}
#klof-panel-permalink:hover { color: #000; text-decoration: underline; }
#klof-panel-body { padding: 24px 24px 40px; }
#klof-panel-loading { color: #999; font-size: 0.9rem; padding: 20px 0; }
.klof-panel-title {
    font-size: 1.35rem;
    line-height: 1.25;
    margin: 0 0 6px;
    font-weight: 700;
}
.klof-panel-date { font-size: 0.8rem; color: #999; margin: 0 0 20px; }
.klof-panel-post-content { font-size: 0.95rem; line-height: 1.65; }
.klof-panel-post-content img { max-width: 100%; height: auto; }
.klof-panel-post-content iframe { max-width: 100%; }

/* ── Play + Info buttons ── */
.klof-play-wrap { margin-top: 0.75em; display: flex; gap: 8px; flex-wrap: wrap; }
body .klof-play-btn,
body .klof-play-btn:visited,
body .klof-info-btn,
body .klof-info-btn:visited {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 7px 14px !important;
    background: #ffffff !important;
    color: #111111 !important;
    border: 1px solid #111111 !important;
    border-radius: 2px !important;
    font-size: 0.8rem !important;
    font-family: inherit !important;
    letter-spacing: 0.03em !important;
    cursor: pointer !important;
    transition: background 0.15s, color 0.15s !important;
    text-decoration: none !important;
    box-shadow: none !important;
}
body .klof-play-btn:hover,
body .klof-play-btn:focus,
body .klof-info-btn:hover,
body .klof-info-btn:focus {
    background: #111111 !important;
    color: #ffffff !important;
    outline: none !important;
}
body .klof-play-btn svg,
body .klof-info-btn svg { flex-shrink: 0 !important; fill: currentColor !important; }
