/* Prompt show page — ps-* scope */
.ps-page-wrap { padding: 0 !important; }
.ps-page { max-width: 1200px; margin: 0 auto; padding: 20px 24px 88px; }

.ps-topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    flex-wrap: wrap; margin-bottom: 20px;
}
.ps-breadcrumb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--ink3); }
.ps-breadcrumb a { color: var(--ink2); text-decoration: none; font-weight: 600; }
.ps-breadcrumb a:hover { color: var(--ink); }
.ps-breadcrumb .sep { opacity: .45; }
.ps-top-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ps-icon-btn {
    width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
    background: var(--surface); color: var(--ink2); cursor: pointer; font-size: 14px;
    display: inline-flex; align-items: center; justify-content: center; transition: all .15s;
}
.ps-icon-btn:hover { border-color: var(--lime); color: var(--ink); }
.ps-icon-btn.active { border-color: var(--coral); color: var(--coral); background: rgba(239,68,68,.08); }

.ps-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }

.ps-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
    overflow: hidden; box-shadow: 0 2px 12px rgba(13,13,18,.03);
}
.ps-card-accent { height: 6px; }
.ps-card-accent.claude { background: var(--violet); }
.ps-card-accent.chatgpt { background: #10b981; }
.ps-card-accent.midjourney { background: var(--coral); }
.ps-card-accent.gemini { background: var(--sky); }

.ps-card-body { padding: 24px; }

.ps-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.ps-title { font-size: clamp(1.35rem, 2.8vw, 1.75rem); font-weight: 800; color: var(--ink); line-height: 1.3; margin: 0 0 10px; }
.ps-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.ps-badge {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px;
    border-radius: 999px; font-size: 11px; font-weight: 700; border: 1px solid var(--border);
    background: var(--paper2); color: var(--ink);
}
.ps-badge.lime { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.ps-badge.ok { background: rgba(16,185,129,.12); color: #059669; border-color: rgba(16,185,129,.25); }
.ps-badge.warn { background: rgba(245,158,11,.12); color: #d97706; border-color: rgba(245,158,11,.25); }
.ps-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 12px; color: var(--ink3); }
.ps-meta a { color: var(--ink2); text-decoration: none; font-weight: 600; }
.ps-meta a:hover { color: var(--ink); }

.ps-media { padding: 20px 20px 0; }
.ps-media-frame {
    position: relative; width: 100%; aspect-ratio: 16/9; border: 2px solid var(--border);
    border-radius: 12px; background: #0d0d12; overflow: hidden;
    box-shadow: 0 8px 28px rgba(0,0,0,.08);
}
.ps-media-frame iframe { width: 100% !important; height: 100% !important; border: none; }
.ps-media-video-fallback {
    width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center;
    justify-content: center; color: #fff; padding: 20px; text-align: center; gap: 12px;
}
.ps-media-video-fallback i { color: var(--lime); }
.ps-media-video-fallback a { color: var(--lime); font-weight: 700; text-decoration: none; }

/* ── Advanced image gallery ── */
.ps-gallery { display: flex; flex-direction: column; gap: 12px; }
.ps-gallery-stage {
    position: relative; width: 100%; aspect-ratio: 16/10; border: 2px solid var(--border);
    border-radius: 14px; background: linear-gradient(145deg, #0d0d12 0%, #16161f 100%);
    overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,.12); cursor: zoom-in;
    user-select: none;
}
.ps-gallery-main-img {
    width: 100%; height: 100%; display: block; transition: opacity .25s ease, transform .35s ease;
    pointer-events: none;
}
.ps-gallery-main-img.fit-contain { object-fit: contain; }
.ps-gallery-main-img.fit-cover { object-fit: cover; }
.ps-gallery-main-img.is-loading { opacity: 0; }
.ps-gallery-loader {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    background: rgba(13,13,18,.55); z-index: 2; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.ps-gallery-loader.active { opacity: 1; pointer-events: auto; }
.ps-gallery-spinner {
    width: 36px; height: 36px; border: 3px solid rgba(255,255,255,.15);
    border-top-color: var(--lime); border-radius: 50%; animation: psGallerySpin .7s linear infinite;
}
@keyframes psGallerySpin { to { transform: rotate(360deg); } }

.ps-gallery-overlay {
    position: absolute; inset: 0; z-index: 3; pointer-events: none;
    background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, transparent 28%, transparent 72%, rgba(0,0,0,.4) 100%);
    opacity: 0; transition: opacity .2s ease;
}
.ps-gallery-stage:hover .ps-gallery-overlay,
.ps-gallery-stage:focus-within .ps-gallery-overlay { opacity: 1; }

.ps-gallery-badge {
    position: absolute; top: 14px; left: 14px; display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 12px; border-radius: 999px; background: rgba(0,0,0,.55); backdrop-filter: blur(8px);
    color: #fff; font-size: 12px; font-weight: 700; border: 1px solid rgba(255,255,255,.12);
}
.ps-gallery-badge i { color: var(--lime); font-size: 11px; }

.ps-gallery-stage-actions {
    position: absolute; top: 14px; right: 14px; display: flex; gap: 8px; pointer-events: auto;
}
.ps-gallery-tool {
    width: 36px; height: 36px; border-radius: 10px; border: 1px solid rgba(255,255,255,.18);
    background: rgba(0,0,0,.45); backdrop-filter: blur(8px); color: #fff; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; font-size: 14px;
    transition: all .15s ease;
}
.ps-gallery-tool:hover { background: var(--lime); color: #000; border-color: var(--lime); }

.ps-gallery-nav {
    position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px;
    border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.5);
    backdrop-filter: blur(8px); color: #fff; cursor: pointer; pointer-events: auto;
    display: inline-flex; align-items: center; justify-content: center; font-size: 15px;
    transition: all .15s ease; opacity: 0;
}
.ps-gallery-stage:hover .ps-gallery-nav { opacity: 1; }
.ps-gallery-nav:hover { background: var(--lime); color: #000; border-color: var(--lime); }
.ps-gallery-nav.prev { left: 14px; }
.ps-gallery-nav.next { right: 14px; }

.ps-gallery-thumbs-wrap { overflow: hidden; border-radius: 12px; }
.ps-gallery-thumbs {
    display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; scroll-behavior: smooth;
    scrollbar-width: thin; scrollbar-color: var(--border) transparent;
}
.ps-gallery-thumbs::-webkit-scrollbar { height: 6px; }
.ps-gallery-thumbs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
.ps-gallery-thumb {
    flex: 0 0 auto; width: 76px; height: 54px; padding: 0; border-radius: 8px; overflow: hidden;
    border: 2px solid var(--border); background: #0d0d12; cursor: pointer; opacity: .72;
    transition: all .15s ease; position: relative;
}
.ps-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.ps-gallery-thumb:hover { opacity: 1; border-color: var(--ink3); }
.ps-gallery-thumb.active {
    opacity: 1; border-color: var(--lime); box-shadow: 0 0 0 2px rgba(200,245,60,.25);
}
.ps-gallery-thumb.active::after {
    content: ''; position: absolute; inset: 0; border: 2px solid var(--lime); border-radius: 6px; pointer-events: none;
}

.ps-label {
    font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
    color: var(--ink4); margin-bottom: 8px;
}
.ps-desc { margin-bottom: 22px; }
.ps-desc-plain {
    font-size: 14px; color: var(--ink2); line-height: 1.75;
    background: var(--paper2); border: 1px solid var(--border);
    border-left: 4px solid var(--lime); border-radius: 4px;
    padding: 16px 20px; box-shadow: 3px 3px 0 var(--border);
}
.ps-desc-plain p { margin: 0; }
.ps-desc-empty {
    font-size: 14px; color: var(--ink3); font-style: italic;
    padding: 16px 18px; background: var(--paper2); border-radius: 4px; border: 1px dashed var(--border);
}

/* Structured description card */
.ps-desc-card {
    display: flex; flex-direction: column; gap: 14px;
    background: var(--paper2);
    border: 1px solid var(--border); border-left: 4px solid var(--border); border-radius: 4px; padding: 18px;
    box-shadow: 3px 3px 0 var(--border);
}
.ps-desc-lead {
    font-size: 14px; color: var(--ink2); line-height: 1.75; margin: 0;
    padding-bottom: 4px;
}
.ps-desc-section {
    background: var(--surface); border: 1px solid var(--border); border-radius: 4px;
    padding: 14px 16px; border-left: 4px solid var(--border);
}
.ps-desc-tone-lime { border-left-color: var(--lime); }
.ps-desc-tone-amber { border-left-color: #f59e0b; }
.ps-desc-tone-violet { border-left-color: var(--violet, #8b5cf6); }
.ps-desc-tone-sky { border-left-color: var(--sky, #5bc8fa); }
.ps-desc-tone-muted { border-left-color: var(--ink4); }

.ps-desc-section-head {
    display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px;
}
.ps-desc-emoji {
    flex-shrink: 0; width: 32px; height: 32px; border-radius: 4px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 16px; background: var(--surface); border: 1px solid var(--border);
}
.ps-desc-tone-lime .ps-desc-emoji { background: rgba(200, 245, 60, .12); border-color: rgba(200, 245, 60, .35); }
.ps-desc-tone-amber .ps-desc-emoji { background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .3); }
.ps-desc-tone-violet .ps-desc-emoji { background: rgba(139, 92, 246, .1); border-color: rgba(139, 92, 246, .25); }
.ps-desc-tone-sky .ps-desc-emoji { background: rgba(91, 200, 250, .12); border-color: rgba(91, 200, 250, .3); }

.ps-desc-section-title {
    font-size: 13px; font-weight: 800; color: var(--ink); line-height: 1.45;
    margin: 0; letter-spacing: -.01em;
}
.ps-desc-body {
    font-size: 13px; color: var(--ink2); line-height: 1.7; margin: 0 0 8px;
}
.ps-desc-body:last-child { margin-bottom: 0; }

.ps-desc-list {
    list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px;
}
.ps-desc-list-item {
    display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start;
    padding: 10px 12px; background: var(--surface); border: 1px solid var(--border);
    border-radius: 4px; box-shadow: 2px 2px 0 var(--border);
}
.ps-desc-list-item-plain { grid-template-columns: 1fr; font-size: 13px; color: var(--ink2); line-height: 1.6; }
.ps-desc-var {
    font-family: var(--mono); font-size: 11px; font-weight: 800; color: var(--ink);
    background: rgba(200, 245, 60, .18); border: 1px solid rgba(200, 245, 60, .45);
    padding: 4px 8px; border-radius: 6px; white-space: nowrap; line-height: 1.3;
}
.ps-desc-list-text { font-size: 13px; color: var(--ink2); line-height: 1.6; }
.ps-desc-tag {
    font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--ink);
    background: rgba(200, 245, 60, .14); border: 1px dashed rgba(200, 245, 60, .45);
    padding: 1px 6px; border-radius: 5px;
}
.ps-desc-hint {
    display: inline; font-size: 12px; color: var(--ink3); font-style: italic;
}

.ps-vars {
    display: none; margin-bottom: 22px;
    background: linear-gradient(145deg, var(--surface), var(--paper));
    border: 1px solid var(--border); border-left: 3px solid var(--lime);
    border-radius: 14px; padding: 18px; box-shadow: 0 8px 24px rgba(0, 0, 0, .04);
}
.ps-vars-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 14px; flex-wrap: wrap; margin-bottom: 16px;
    padding-bottom: 14px; border-bottom: 1px dashed var(--border);
}
.ps-vars-head-left { display: flex; align-items: flex-start; gap: 12px; flex: 1; min-width: 0; }
.ps-vars-icon {
    flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px;
    background: rgba(200, 245, 60, .15); border: 1px solid rgba(200, 245, 60, .35);
    color: var(--ink); display: inline-flex; align-items: center; justify-content: center; font-size: 15px;
}
.ps-vars-title {
    font-size: 13px; font-weight: 800; color: var(--ink); margin: 0 0 4px;
    letter-spacing: -.01em;
}
.ps-vars-sub { font-size: 12px; color: var(--ink3); line-height: 1.5; margin: 0; }
.ps-vars-sub strong { color: var(--ink2); font-family: var(--mono); font-size: 11px; }
.ps-vars-toggle { flex-shrink: 0; }
.ps-vars-toggle .form-switch { margin: 0; padding-left: 3.2em; }
.ps-vars-toggle .form-check-label {
    font-size: 12px; font-weight: 700; color: var(--ink); cursor: pointer; user-select: none; white-space: nowrap;
}
.ps-vars-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }

.ps-var-field { display: flex; flex-direction: column; gap: 6px; }
.ps-var-label {
    font-size: 11px; font-weight: 800; color: var(--ink2); text-transform: uppercase;
    letter-spacing: .4px; display: flex; align-items: center; gap: 1px;
}
.ps-var-hash { color: var(--lime-dark, #84cc16); font-family: var(--mono); }
.ps-var-input {
    width: 100%; padding: 11px 12px; background: var(--surface);
    border: 2px solid var(--border); border-radius: 10px;
    font-family: inherit; font-size: 13px; color: var(--ink);
    transition: border-color .15s, box-shadow .15s;
}
.ps-var-input::placeholder { color: var(--ink4); }
.ps-var-input:focus {
    outline: none; border-color: var(--lime);
    box-shadow: 0 0 0 3px rgba(200, 245, 60, .15);
}

.ps-prompt-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.ps-prompt-head .ps-label { margin-bottom: 0; }

.ps-code-wrap {
    background: var(--ink); border-radius: 12px; padding: 18px; margin-bottom: 22px;
}
.ps-code {
    font-family: var(--mono); font-size: 13px; color: var(--lime); line-height: 1.75;
    white-space: pre-wrap; word-break: break-word; max-height: 420px; overflow: auto;
}
.ps-code-copy {
    flex-shrink: 0;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    border: none;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .15s;
}
.ps-code-copy:hover { background: var(--lime); color: var(--ink); }

.ps-lock {
    text-align: center;
    padding: 48px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.ps-lock > div > i {
    font-size: 2rem;
    color: var(--lime) !important;
    background: rgba(200, 245, 60, 0.12);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border: 1px solid rgba(200, 245, 60, 0.35);
    animation: lock-pulse 2s infinite alternate;
}
@keyframes lock-pulse {
    0% { transform: scale(1); box-shadow: 0 0 4px rgba(200, 245, 60, 0.15); }
    100% { transform: scale(1.04); box-shadow: 0 0 16px rgba(200, 245, 60, 0.4); }
}
.ps-lock h3 {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff !important;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}
.ps-lock p {
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.75) !important;
    margin-bottom: 20px;
    max-width: 320px;
    line-height: 1.5;
}

.ps-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.ps-tags .tag { padding: 4px 10px; background: var(--paper2); border-radius: 20px; font-size: 11px; font-weight: 600; color: var(--ink2); }

.ps-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.ps-stat {
    background: var(--paper); border: 1px solid var(--border); border-radius: 12px;
    padding: 14px 10px; text-align: center;
}
.ps-stat-val { font-size: 20px; font-weight: 800; color: var(--ink); line-height: 1; margin-bottom: 4px; }
.ps-stat-lbl { font-size: 10px; font-weight: 700; color: var(--ink3); text-transform: uppercase; letter-spacing: .4px; }

.ps-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.ps-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 16px; border-radius: 10px; font-size: 13px; font-weight: 700;
    border: 1.5px solid var(--border); background: var(--surface); color: var(--ink);
    cursor: pointer; text-decoration: none; font-family: 'DM Sans', sans-serif; transition: all .15s;
    min-height: 46px; text-align: center;
}
.ps-btn:hover { border-color: var(--ink); color: var(--ink); }
.ps-btn-primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.ps-btn-primary:hover { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.ps-btn-lime { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.ps-btn-lime:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.ps-btn-dark { background: var(--ink); color: #fff; border-color: var(--ink); align-self: flex-start; }
.ps-btn-dark:hover { background: var(--lime); color: var(--ink); border-color: var(--lime); }
.ps-btn:disabled { opacity: .65; cursor: not-allowed; }

.ps-alert {
    margin-top: 18px; padding: 14px 16px; background: rgba(245,158,11,.08);
    border: 1px solid rgba(245,158,11,.25); border-radius: 10px; font-size: 13px; color: var(--ink2);
}

/* Sidebar */
.ps-sidebar { display: flex; flex-direction: column; gap: 18px; }
.ps-side-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px;
    display: flex; flex-direction: column; gap: 14px;
}
.ps-side-title { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--ink4); margin: 0; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.ps-side-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ps-side-meta { font-size: 11px; color: var(--ink3); text-transform: none; letter-spacing: 0; }
.ps-side-kicker { font-size: 10px; font-weight: 700; color: var(--ink3); text-transform: uppercase; margin-bottom: 6px; }

.ps-author-head { display: flex; align-items: center; gap: 14px; }
.ps-author-avatar {
    width: 52px; height: 52px; border-radius: 50%; background: var(--violet); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 800; overflow: hidden; flex-shrink: 0;
    border: 2px solid var(--border);
}
.ps-author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ps-author-name { font-size: 15px; font-weight: 800; color: var(--ink); }
.ps-author-handle { font-size: 12px; color: var(--ink3); margin-top: 2px; }

.ps-author-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 10px 0; }
.ps-author-stat { text-align: center; }
.ps-author-stat-val { font-size: 15px; font-weight: 800; color: var(--ink); }
.ps-author-stat-lbl { font-size: 9px; font-weight: 700; color: var(--ink3); text-transform: uppercase; }

.ps-followers-avatars { display: flex; align-items: center; flex-wrap: wrap; padding-left: 2px; }
.ps-follower-mini {
    width: 28px; height: 28px; border-radius: 50%; background: var(--paper3); border: 2px solid var(--surface);
    display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700;
    color: var(--ink2); text-decoration: none; overflow: hidden; margin-right: -8px; position: relative;
}
.ps-follower-mini img { width: 100%; height: 100%; object-fit: cover; }
.ps-followers-more { font-size: 11px; font-weight: 700; color: var(--ink3); margin-left: 14px; }

.ps-side-btn {
    display: block; width: 100%; padding: 11px; border-radius: 10px; font-size: 13px; font-weight: 700;
    text-align: center; text-decoration: none; border: none; cursor: pointer; font-family: inherit; transition: all .15s;
}
.ps-side-btn-primary { background: var(--ink); color: #fff; }
.ps-side-btn-primary:hover { background: var(--lime); color: var(--ink); }
.ps-side-btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.ps-side-btn-outline:hover { background: rgba(0,0,0,.04); }

.ps-parent-prompt { padding: 10px 12px; background: var(--paper2); border: 1px solid var(--border); border-radius: 8px; font-size: 12px; }
.ps-parent-prompt a { color: var(--violet); font-weight: 700; text-decoration: none; }

.ps-version-timeline { position: relative; padding-left: 16px; border-left: 2px solid var(--border); margin-left: 4px; }
.ps-version-item { position: relative; margin-bottom: 16px; }
.ps-version-dot { position: absolute; left: -21px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--border); border: 2px solid var(--surface); }
.ps-version-dot.tagged { background: var(--lime); }
.ps-version-head { display: flex; justify-content: space-between; gap: 8px; }
.ps-version-num { font-size: 13px; font-weight: 800; color: var(--ink); }
.ps-version-tag { display: inline-block; margin-top: 4px; padding: 2px 6px; background: var(--lime); color: #0d0d12; border-radius: 6px; font-size: 10px; font-weight: 800; }
.ps-version-date { font-size: 10px; color: var(--ink4); white-space: nowrap; }
.ps-version-msg { margin-top: 6px; font-size: 12px; color: var(--ink2); line-height: 1.45; }
.ps-version-author { font-size: 10px; color: var(--ink3); margin-top: 4px; }

.ps-rating-head { display: flex; align-items: center; gap: 14px; }
.ps-rating-avg { font-size: 34px; font-weight: 800; color: var(--ink); line-height: 1; }
.ps-stars { display: flex; gap: 3px; color: #f5c842; font-size: 13px; }
.ps-stars-sm { font-size: 11px; margin-top: 4px; }
.ps-rating-count { font-size: 12px; color: var(--ink3); margin-top: 4px; }
.ps-rating-bars { display: flex; flex-direction: column; gap: 8px; }
.ps-rating-row { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--ink2); }
.ps-rating-row > span:first-child { width: 52px; }
.ps-rating-track { flex: 1; height: 7px; background: var(--paper2); border-radius: 4px; overflow: hidden; }
.ps-rating-fill { height: 100%; background: #f5c842; border-radius: 4px; }
.ps-rating-pct { width: 30px; text-align: right; color: var(--ink3); }

/* Comments */
.ps-comments {
    margin-top: 24px; background: var(--surface); border: 1px solid var(--border);
    border-radius: 16px; padding: 24px;
}
.ps-comments-title { font-size: 17px; font-weight: 800; color: var(--ink); margin: 0 0 20px; padding-bottom: 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.ps-comment-form { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; padding-bottom: 22px; border-bottom: 1px dashed var(--border); }
.ps-star-select { display: flex; gap: 8px; font-size: 22px; color: var(--border); cursor: pointer; }
.ps-star-select i.active, .ps-star-select i.hover { color: #f5c842; }
.ps-comment-input {
    width: 100%; min-height: 88px; padding: 12px 14px; border: 1.5px solid var(--border);
    border-radius: 10px; background: var(--paper); font-family: inherit; font-size: 13px; resize: vertical;
}
.ps-comment-input:focus { outline: none; border-color: var(--lime); box-shadow: 0 0 0 3px rgba(200,245,60,.15); }
.ps-comment-version label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.ps-select {
    width: 100%; max-width: 280px; padding: 9px 12px; border: 1.5px solid var(--border);
    border-radius: 8px; background: var(--paper); font-size: 12px; font-family: inherit;
}
.ps-guest-comment { text-align: center; padding: 20px; background: var(--paper2); border-radius: 10px; margin-bottom: 22px; }
.ps-guest-comment p { font-size: 13px; color: var(--ink2); margin-bottom: 12px; }

.ps-comment-item { display: flex; gap: 14px; padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.ps-comment-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.ps-comment-avatar {
    width: 40px; height: 40px; border-radius: 50%; background: var(--paper2); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center; font-weight: 700; overflow: hidden; flex-shrink: 0;
}
.ps-comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ps-comment-body { flex: 1; min-width: 0; }
.ps-comment-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.ps-comment-author { font-size: 14px; font-weight: 800; color: var(--ink); text-decoration: none; }
.ps-comment-version-badge { font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 4px; background: var(--paper2); border: 1px solid var(--border); margin-left: 6px; }
.ps-comment-date { font-size: 11px; color: var(--ink4); }
.ps-comment-text { font-size: 13px; color: var(--ink2); line-height: 1.6; word-break: break-word; }
.ps-empty-mini { font-size: 12px; color: var(--ink3); }
.ps-empty-center { text-align: center; padding: 24px; }

/* Mobile strip + sticky CTA */
.ps-mobile-strip {
    display: none; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 16px; background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; margin-bottom: 16px;
}
.ps-mobile-strip-author { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ps-mobile-strip-author .ps-author-avatar { width: 40px; height: 40px; font-size: 14px; }
.ps-mobile-strip-name { font-size: 13px; font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-mobile-strip-sub { font-size: 11px; color: var(--ink3); }

.ps-sticky-cta {
    display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 500;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
    border-top: 1px solid var(--border); box-shadow: 0 -8px 24px rgba(13,13,18,.08);
}
.ps-sticky-cta-inner { max-width: 1200px; margin: 0 auto; display: flex; gap: 10px; }
.ps-sticky-cta .ps-btn { flex: 1; padding: 12px; }

/* Advanced lightbox */
.ps-lightbox {
    display: none; position: fixed; inset: 0; z-index: 99999; opacity: 0;
    transition: opacity .28s ease;
}
.ps-lightbox.open { display: block; opacity: 1; }
.ps-lightbox-backdrop {
    position: absolute; inset: 0; background: rgba(0,0,0,.94);
    backdrop-filter: blur(6px);
}
.ps-lightbox-shell {
    position: relative; z-index: 1; width: 100%; height: 100%;
    display: flex; flex-direction: column; padding: 12px 16px 16px;
}
.ps-lightbox-toolbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    flex-shrink: 0; padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.ps-lightbox-toolbar-left {
    display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1;
}
.ps-lightbox-title {
    font-size: 13px; font-weight: 700; color: rgba(255,255,255,.85);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px;
}
.ps-lightbox-counter {
    font-size: 12px; font-weight: 700; color: var(--lime); white-space: nowrap;
    padding: 4px 10px; border-radius: 999px; background: rgba(200,245,60,.12);
    border: 1px solid rgba(200,245,60,.25);
}
.ps-lightbox-toolbar-center {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center;
}
.ps-lb-btn {
    width: 36px; height: 36px; border-radius: 10px; border: 1px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.08); color: #fff; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; font-size: 14px;
    transition: all .15s ease;
}
.ps-lb-btn:hover { background: var(--lime); color: #000; border-color: var(--lime); }
.ps-lb-btn.ps-lb-close { flex-shrink: 0; }
.ps-lb-zoom-val {
    min-width: 48px; text-align: center; font-size: 12px; font-weight: 700;
    color: rgba(255,255,255,.75);
}
.ps-lb-divider {
    width: 1px; height: 22px; background: rgba(255,255,255,.15); margin: 0 4px;
}

.ps-lightbox-stage {
    flex: 1; position: relative; display: flex; align-items: center; justify-content: center;
    min-height: 0; margin: 8px 0;
}
.ps-lightbox-viewport {
    position: relative; width: 100%; height: 100%; overflow: hidden;
    display: flex; align-items: center; justify-content: center; cursor: grab;
    touch-action: none;
}
.ps-lightbox-viewport.is-dragging { cursor: grabbing; }
.ps-lightbox-viewport img {
    max-width: 100%; max-height: 100%; object-fit: contain; display: block;
    transition: opacity .2s ease; will-change: transform;
    user-select: none; -webkit-user-drag: none;
}
.ps-lightbox-viewport img.fit-cover { object-fit: cover; width: 100%; height: 100%; max-width: none; max-height: none; }
.ps-lightbox-viewport img.is-loading { opacity: 0; }
.ps-lightbox-loader {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity .2s;
}
.ps-lightbox-loader.active { opacity: 1; }

.ps-lightbox-nav {
    position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px;
    border-radius: 50%; border: none; background: rgba(255,255,255,.12); color: #fff;
    font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    z-index: 5; transition: all .15s ease;
}
.ps-lightbox-nav:hover { background: var(--lime); color: #000; }
.ps-lightbox-nav.prev { left: 8px; }
.ps-lightbox-nav.next { right: 8px; }
.ps-lightbox-nav.hidden { display: none !important; }

.ps-lightbox-filmstrip {
    display: flex; gap: 8px; overflow-x: auto; padding: 8px 4px 4px;
    flex-shrink: 0; justify-content: center; scroll-behavior: smooth;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent;
}
.ps-lightbox-filmstrip:empty { display: none; }
.ps-lightbox-filmstrip::-webkit-scrollbar { height: 5px; }
.ps-lightbox-filmstrip::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 999px; }
.ps-lb-film-thumb {
    flex: 0 0 auto; width: 64px; height: 46px; padding: 0; border-radius: 6px; overflow: hidden;
    border: 2px solid rgba(255,255,255,.15); background: #111; cursor: pointer; opacity: .65;
    transition: all .15s ease;
}
.ps-lb-film-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.ps-lb-film-thumb:hover { opacity: 1; }
.ps-lb-film-thumb.active { opacity: 1; border-color: var(--lime); box-shadow: 0 0 0 2px rgba(200,245,60,.3); }

.ps-lightbox-hint {
    display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; padding-top: 8px;
    font-size: 11px; color: rgba(255,255,255,.45); flex-shrink: 0;
}
.ps-lightbox-hint kbd {
    display: inline-block; padding: 2px 6px; border-radius: 4px; background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15); font-family: inherit; font-size: 10px; color: rgba(255,255,255,.7);
}

/* Variable highlights */
.var-hl { background: rgba(239,68,68,.1); color: #ef4444; padding: 2px 6px; border-radius: 4px; font-weight: 700; border: 1px dashed rgba(239,68,68,.3); margin: 0 2px; display: inline-block; }
.var-filled { background: rgba(16,185,129,.1); color: #10b981; padding: 2px 6px; border-radius: 4px; font-weight: 700; border: 1px solid rgba(16,185,129,.3); margin: 0 2px; display: inline-block; }
.param-input-group { display: flex; flex-direction: column; gap: 6px; }
.param-input-group label { font-size: 11px; font-weight: 700; color: var(--ink3); text-transform: uppercase; }
.param-input { width: 100%; padding: 10px 12px; background: var(--paper); border: 2px solid var(--border); border-radius: 8px; font-family: inherit; font-size: 13px; }
.param-input:focus { outline: none; border-color: var(--lime); box-shadow: 0 0 0 3px rgba(200,245,60,.15); }

.ai-pill { padding: 4px 12px; border-radius: 20px; font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; }
.ai-claude { background: #ede9ff; color: #6d28d9; }
.ai-chatgpt { background: #d1fae5; color: #065f46; }
.ai-midjourney { background: #ffe4e0; color: #9f1239; }
.ai-gemini { background: #e0f2fe; color: #0c4a6e; }

/* Responsive */
@media (max-width: 992px) {
    .ps-layout { grid-template-columns: 1fr; }
    .ps-mobile-strip { display: flex; }
    .ps-sticky-cta { display: block; }
    .ps-page { padding-bottom: 100px; }
    .ps-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .ps-page { padding: 14px 14px 100px; }
    .ps-card-body, .ps-comments { padding: 16px; }
    .ps-desc-card { padding: 14px; }
    .ps-desc-list-item { grid-template-columns: 1fr; gap: 6px; }
    .ps-vars { padding: 14px; }
    .ps-vars-head { flex-direction: column; align-items: stretch; }
    .ps-vars-toggle { align-self: flex-start; }
    .ps-vars-grid { grid-template-columns: 1fr; }
    .ps-media { padding: 14px 14px 0; }
    .ps-head { flex-direction: column; }
    .ps-actions { grid-template-columns: 1fr; }
    .ps-code { font-size: 12px; max-height: 280px; }
    .ps-gallery-stage { aspect-ratio: 4/3; border-radius: 12px; }
    .ps-gallery-nav { opacity: 1; width: 36px; height: 36px; font-size: 13px; }
    .ps-gallery-overlay { opacity: 1; background: linear-gradient(180deg, rgba(0,0,0,.3) 0%, transparent 22%, transparent 78%, rgba(0,0,0,.35) 100%); }
    .ps-gallery-thumb { width: 64px; height: 46px; }
    .ps-lightbox-shell { padding: 8px 10px 12px; }
    .ps-lightbox-toolbar { flex-wrap: wrap; }
    .ps-lightbox-title { max-width: 160px; }
    .ps-lightbox-toolbar-center { order: 3; width: 100%; justify-content: flex-start; }
    .ps-lightbox-nav { width: 38px; height: 38px; font-size: 14px; }
    .ps-lightbox-hint { display: none; }
}
@media (max-width: 400px) {
    .ps-stats { grid-template-columns: 1fr 1fr; }
}
