/*
 * One timeline post's own page (page uri `item`, shown at /post/<token>).
 * Loaded only by gfTliDecorate(). Every rule is scoped to body.bx-page-item.
 *
 * One centred column: the context bar, the post, its comments. The side
 * "Info" card (cell 2) repeated the author and printed another module's
 * field, so it is not drawn; the stock cover is switched off in PHP.
 */
.bx-page-item #bx-page-item {
    max-width: 720px;
    margin: 0 auto;
    padding: 16px 16px 48px;
}

/*
 * Single column. The page's layout (layout_bar_right.html) puts the width on
 * the COLUMNS, not the cells: <main class="bx-layout-col ... md:w-2/3"> and
 * <aside class="bx-layout-col ... md:w-1/3">. So the main column is made full
 * width and the aside (the Info card) is not drawn at all.
 */
.bx-page-item #bx-page-item .bx-layout-row { display: block; }
.bx-page-item #bx-page-item .bx-layout-col { width: 100%; max-width: 100%; padding-left: 0; padding-right: 0; flex: none; }
.bx-page-item #bx-page-item aside.bx-layout-col,
.bx-page-item #bx-page-item #bx-layout-cell-2 { display: none; }

.gftli-bar {
    max-width: 720px;
    margin: 24px auto 0;
    padding: 0 16px;
}
.gftli-bar-in {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e6e8ec;
    border-radius: 14px;
    font-size: 14px;
}
.gftli-ws { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gftli-ws img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; flex: none; }
.gftli-seen { margin-left: auto; }
.dark .gftli-bar-in { background: #171a21; border-color: #262a33; }
.gftli-back {
    color: #1f2937;
    font-weight: 600;
    text-decoration: none;
}
a.gftli-back:hover { text-decoration: underline; }
.gftli-seen {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 12px;
    font-weight: 600;
}
.gftli-seen-public { background: #ecfdf5; color: #065f46; }
.gftli-seen-self { background: #f3f4f6; color: #374151; }

.dark .gftli-back { color: #e5e7eb; }
.dark .gftli-seen { background: rgba(99, 102, 241, .18); color: #c7d2fe; }
.dark .gftli-seen-public { background: rgba(16, 185, 129, .16); color: #a7f3d0; }
.dark .gftli-seen-self { background: rgba(255, 255, 255, .08); color: #d1d5db; }

@media (max-width: 640px) {
    .bx-page-item #bx-page-item { padding: 16px 8px 32px; }
    .gftli-bar { padding: 0 8px; margin-top: 16px; }
}

/*
 * The members-only page (gfTliGateHtml()): drawn in place of "Access denied"
 * for a visitor who may not read the post. One card: where the post lives,
 * placeholder bars (never the post), and the way in.
 */
.gftli-gate {
    --gfg-surface: #ffffff;
    --gfg-fg: #111827;
    --gfg-muted: #6b7280;
    --gfg-line: #e6e8ec;
    --gfg-accent: #f97316;
    --gfg-accent-ink: #ffffff;
    --gfg-skel: #eceef2;
    --gfg-chip: #eef2ff;
    --gfg-chip-ink: #3730a3;
    max-width: 640px;
    margin: 0 auto;
    padding: 40px 16px 56px;
    color: var(--gfg-fg);
}
.dark .gftli-gate {
    --gfg-surface: #171a21;
    --gfg-fg: #f3f4f6;
    --gfg-muted: #9ca3af;
    --gfg-line: #262a33;
    --gfg-accent: #fb8a3c;
    --gfg-accent-ink: #1a0e05;
    --gfg-skel: #232731;
    --gfg-chip: rgba(99, 102, 241, .18);
    --gfg-chip-ink: #c7d2fe;
}
.gftli-g-card {
    background: var(--gfg-surface);
    border: 1px solid var(--gfg-line);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 12px 32px rgba(17, 24, 39, .06);
}
.gftli-g-ws { display: flex; align-items: center; gap: 12px; }
.gftli-g-mark { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; }
.gftli-g-letter { display: grid; place-items: center; background: var(--gfg-fg); color: var(--gfg-surface); font-weight: 700; font-size: 18px; }
.gftli-g-locked { background: var(--gfg-skel); color: var(--gfg-muted); }
.gftli-g-wsn { min-width: 0; }
.gftli-g-name { font-weight: 700; font-size: 15px; }
.gftli-g-name a { color: inherit; text-decoration: none; }
.gftli-g-name a:hover { text-decoration: underline; }
.gftli-g-sub { font-size: 13px; color: var(--gfg-muted); }
.gftli-g-chip { margin-left: auto; font-size: 12px; font-weight: 600; background: var(--gfg-chip); color: var(--gfg-chip-ink);
    border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.gftli-g-hr { height: 1px; background: var(--gfg-line); margin: 22px 0; }
.gftli-g-by { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--gfg-muted); margin-bottom: 18px; }
.gftli-g-by b { color: var(--gfg-fg); font-weight: 600; }
.gftli-g-av { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--gfg-skel); flex: none; display: inline-block; }
.gftli-g-skel { position: relative; display: grid; gap: 10px; padding: 18px; border: 1px dashed var(--gfg-line); border-radius: 12px; }
.gftli-g-skel i { display: block; height: 10px; border-radius: 6px; background: var(--gfg-skel); }
.gftli-g-skel i:nth-child(1) { width: 92%; }
.gftli-g-skel i:nth-child(2) { width: 78%; }
.gftli-g-skel i:nth-child(3) { width: 55%; }
.gftli-g-tile { display: block; height: 72px; border-radius: 10px; background: var(--gfg-skel); margin-top: 4px; }
.gftli-g-badge { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 8px;
    background: var(--gfg-surface); border: 1px solid var(--gfg-line); border-radius: 999px; padding: 8px 14px;
    font-size: 13px; font-weight: 600; white-space: nowrap; box-shadow: 0 4px 14px rgba(17, 24, 39, .08); }
.gftli-gate h1.gftli-g-h { font-size: 24px; line-height: 1.25; font-weight: 700; margin: 26px 0 8px; text-wrap: balance; color: var(--gfg-fg); }
.gftli-g-lead { color: var(--gfg-muted); margin: 0 0 22px; font-size: 15px; line-height: 1.55; }
.gftli-g-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.gftli-g-btn { display: inline-flex; align-items: center; font-weight: 600; font-size: 14px; border-radius: 10px; padding: 11px 18px;
    text-decoration: none; border: 1px solid transparent; }
.gftli-g-p { background: var(--gfg-accent); color: var(--gfg-accent-ink); }
.gftli-g-s { background: var(--gfg-surface); color: var(--gfg-fg); border-color: var(--gfg-line); }
.gftli-g-btn:hover { filter: brightness(.97); }
.gftli-g-btn:focus-visible { outline: 2px solid var(--gfg-accent); outline-offset: 2px; }
.gftli-g-fine { margin: 16px 0 0; font-size: 13px; color: var(--gfg-muted); }
.gftli-g-fine a { color: inherit; text-decoration: underline; }
@media (max-width: 480px) {
    .gftli-gate { padding: 20px 8px 32px; }
    .gftli-g-card { padding: 22px; }
}
