body.page-home {
    --page: var(--rw-bg-accent);
    --card: var(--rw-card);
    --soft: var(--rw-soft);
    --text: var(--rw-ink);
    --muted: var(--rw-muted);
    --line: var(--rw-line);
    --accent: var(--rw-orange);
    --accent-dark: var(--rw-orange-deep);
    --pale: var(--rw-orange-soft);
    --header: var(--rw-top);
    --code: var(--rw-soft);
    --shadow: var(--rw-shadow);
    --pw-header: 68px;
    background: var(--page);
    background-image: repeating-linear-gradient(0deg, transparent, transparent 31px, color-mix(in srgb, var(--muted) 10%, transparent) 32px);
    color: var(--text);
}
body.page-home.is-sheet-open,
body.page-home.is-story-open { overflow: hidden; }
body.page-home .page-wrapper { max-width: none; padding: 0 0 28px; background: transparent; }
body.page-home .rw-footer {
    max-width: 1180px;
    margin: 8px auto 0;
    padding: 8px 22px 24px;
    border: 0;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
    font-size: 11px;
}
body.page-home svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

body.page-home .feed-controls {
    position: sticky;
    top: var(--pw-header);
    z-index: 40;
    background: var(--page);
    border-bottom: 1px solid var(--line);
    padding: 16px 0 8px;
}
body.page-home .feed-controls__bar,
body.page-home .filter-summary {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 8px;
}
body.page-home .filter-tabs,
body.page-home .type-pills {
    display: flex;
    gap: 4px;
    align-items: center;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
body.page-home .filter-tabs::-webkit-scrollbar,
body.page-home .type-pills::-webkit-scrollbar { display: none; }
body.page-home .type-pills { flex: 1; }
body.page-home .filter-tab {
    position: relative;
    border-radius: 8px;
    padding: 7px 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
body.page-home .filter-tab input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
body.page-home .filter-tab:has(input:checked) { background: var(--pale); color: var(--accent-dark); }
body.page-home .filter-tab:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
body.page-home .type-check {
    position: relative;
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 10px;
    background: var(--card);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}
body.page-home .type-check input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
body.page-home .type-check:has(input:checked) { background: var(--pale); color: var(--accent-dark); border-color: transparent; }
body.page-home .type-check:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
body.page-home .filters-open { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
body.page-home .filters-open.has-filters { background: var(--pale); color: var(--accent-dark); border-color: transparent; }
body.page-home .filter-summary { flex-wrap: wrap; margin-top: 8px; }
body.page-home .filter-summary[hidden] { display: none; }
body.page-home .summary-chip,
body.page-home .summary-reset {
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--text);
    border-radius: 999px;
    padding: 4px 10px;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
body.page-home .summary-reset { color: var(--accent-dark); background: transparent; }

body.page-home .home {
    max-width: 1180px;
    margin: 16px auto 0;
    padding: 0 22px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 20px;
    align-items: start;
}
body.page-home .main { min-width: 0; display: flex; flex-direction: column; gap: 0; }
body.page-home .right { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
body.page-home .compose {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0 0 14px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--card);
    box-shadow: var(--shadow);
    color: var(--text);
    text-align: left;
    cursor: pointer;
    font: inherit;
}
body.page-home .compose:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
body.page-home .compose:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.page-home .compose__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: var(--accent);
    color: #fff;
}
body.page-home .compose__icon svg { width: 20px; height: 20px; }
body.page-home .compose__copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
body.page-home .compose__title { font-size: 15px; font-weight: 800; letter-spacing: -.02em; }
body.page-home .compose__hint { font-size: 12px; color: var(--muted); font-weight: 600; }

body.page-home .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
body.page-home .section-heading h2 { font-size: 16px; letter-spacing: -.02em; margin: 0; font-weight: 750; }
body.page-home .section-heading__actions { display: flex; align-items: center; gap: 10px; }
body.page-home .quiet-count { font-size: 12px; color: var(--muted); font-weight: 500; }
body.page-home .subtle-link, body.page-home .text-btn { color: var(--muted); font-size: 12px; font-weight: 700; background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; }
body.page-home .subtle-link:hover, body.page-home .text-btn:hover { color: var(--accent-dark); }
body.page-home .stories-block { margin-bottom: 14px; min-width: 0; }
body.page-home .stories-block.is-collapsed .thoughts-card { display: none; }
body.page-home .thoughts-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 8px 8px; box-shadow: var(--shadow); }
body.page-home .thoughts-card::before,
body.page-home .thoughts-card::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 28px;
    z-index: 1;
    pointer-events: none;
}
body.page-home .thoughts-card::before { left: 0; border-radius: 12px 0 0 12px; background: linear-gradient(90deg, var(--card), transparent); }
body.page-home .thoughts-card::after { right: 0; border-radius: 0 12px 12px 0; background: linear-gradient(270deg, var(--card), transparent); }
body.page-home .thought-row { display: flex; gap: 8px; min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; padding: 1px 8px 4px; align-items: flex-start; scroll-snap-type: x proximity; }
body.page-home .thought-row::-webkit-scrollbar { display: none; }
body.page-home .story { flex: 0 0 72px; width: 72px; min-width: 72px; margin: 0; border: 0; background: transparent; padding: 0; text-align: center; color: var(--text); font: inherit; cursor: pointer; display: block; scroll-snap-align: start; }
body.page-home a.story { display: block; text-decoration: none; }
body.page-home .story:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
body.page-home .story .ring { width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 6px; display: grid; place-items: center; border: 2px solid var(--accent); padding: 2px; box-sizing: border-box; }
body.page-home .story.is-seen .ring, body.page-home .story.read .ring { border-color: color-mix(in srgb, var(--muted) 55%, var(--card)); }
body.page-home .story .initials { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; position: relative; font-size: 13px; font-weight: 800; color: #49311e; background: #f4d4b0; }
body.page-home .story .face { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; position: relative; overflow: hidden; color: #49311e; font-size: 13px; font-weight: 800; }
body.page-home .story .face img, body.page-home .story .initials img { position: absolute; inset: 0; width: 44px; height: 44px; max-width: none; object-fit: cover; border-radius: 50%; }
body.page-home .story .name { display: block; font-size: 11px; font-weight: 750; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.page-home .story.add .ring { border: 1px dashed var(--line); }
body.page-home .story.add .initials { background: var(--soft); color: var(--accent-dark); font-size: 22px; font-weight: 400; }

body.page-home .feed { display: flex; flex-direction: column; gap: 12px; }
body.page-home .post {
    --type: var(--accent-dark);
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    position: relative;
    background: var(--card);
    border: 1px solid var(--line);
    border-left: 3px solid var(--type);
    border-radius: 12px;
    padding: 14px 16px 12px;
    box-shadow: var(--shadow);
    min-width: 0;
    color: var(--text);
}
body.page-home .post--article { --type: #c56a08; }
body.page-home .post--code { --type: #2f6b45; }
body.page-home .post--file { --type: #8a5a2b; }
body.page-home .post--news { --type: #b45309; }
body.page-home .post--forum { --type: #9a3412; }
body.page-home .post--thought { --type: #a16207; }
body.page-home .post:hover { border-color: color-mix(in srgb, var(--type) 45%, var(--line)); }
body.page-home .post-hit { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
body.page-home .post-rail {
    position: relative;
    z-index: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--type) 16%, var(--card));
    color: var(--type);
}
body.page-home .post-rail svg { width: 20px; height: 20px; }
body.page-home .post-main { min-width: 0; }
body.page-home .post-top, body.page-home .post-tag, body.page-home .author, body.page-home .code-sample, body.page-home .file-line { position: relative; z-index: 2; }
body.page-home .post-top { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; flex-wrap: wrap; }
body.page-home .type-badge { font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; border-radius: 5px; padding: 4px 7px; background: color-mix(in srgb, var(--type) 16%, var(--card)); color: var(--type); }
body.page-home .post-tag { font-size: 11px; color: var(--muted); font-weight: 700; }
body.page-home .post h3 { font-size: 18px; line-height: 1.25; letter-spacing: -.25px; margin: 0 0 6px; font-weight: 750; color: var(--text); }
body.page-home .post-excerpt { font-size: 13px; color: var(--muted); line-height: 1.45; margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
body.page-home .post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; color: var(--muted); font-size: 11px; }
body.page-home .author { color: var(--text); font-weight: 700; }
body.page-home .dot { color: color-mix(in srgb, var(--muted) 70%, var(--card)); }
body.page-home .stats { margin-left: auto; display: flex; align-items: center; gap: 11px; white-space: nowrap; }
body.page-home .stat { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
body.page-home .stat svg { width: 14px; height: 14px; }
body.page-home .avatar { position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #f8dfc1; color: #7d4c20; font-weight: 750; font-size: 11px; overflow: hidden; flex-shrink: 0; }
body.page-home .avatar .face { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; position: relative; overflow: hidden; }
body.page-home .avatar img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; border-radius: 50%; }
body.page-home .mini-avatar { width: 25px; height: 25px; font-size: 9px; }
body.page-home .code-sample { background: var(--code); border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px; margin: 0 0 10px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
body.page-home .code-sample code { min-width: 0; font: 11px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
body.page-home .language { font: 10px ui-monospace, monospace; color: var(--muted); flex-shrink: 0; padding-top: 2px; }
body.page-home .file-line { display: flex; align-items: center; gap: 10px; margin: 0 0 11px; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; }
body.page-home .file-icon { display: grid; place-items: center; background: var(--pale); color: var(--accent-dark); width: 34px; height: 34px; border-radius: 7px; }
body.page-home .file-line > div { min-width: 0; }
body.page-home .file-name { font-size: 12px; font-weight: 750; color: var(--text); overflow-wrap: anywhere; }
body.page-home .file-details, body.page-home .file-download { font-size: 11px; color: var(--muted); }
body.page-home .file-download { margin-left: auto; white-space: nowrap; font-weight: 750; }
body.page-home .pw-empty, body.page-home .feed-error {
    background: var(--card);
    border: 1px dashed var(--line);
    border-radius: 12px;
    padding: 28px 16px;
    text-align: center;
    color: var(--muted);
}
body.page-home .pw-empty__title { margin: 0 0 6px; color: var(--text); font-size: 16px; font-weight: 800; }
body.page-home .pw-empty p { margin: 0; }
body.page-home .feed-error { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 12px; }
body.page-home .feed-error[hidden] { display: none; }
body.page-home .feed-error p { margin: 0; }
body.page-home .more { display: block; margin: 14px auto 0; width: max-content; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 8px; padding: 8px 14px; font-size: 13px; font-weight: 750; }
body.page-home .more[hidden] { display: none; }
body.page-home .skeleton { height: 132px; border-radius: 12px; background: linear-gradient(90deg, var(--soft), var(--card), var(--soft)); background-size: 200% 100%; animation: home-shimmer 1.1s linear infinite; }
body.page-home .skeletons { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
body.page-home .skeletons[hidden] { display: none; }
body.page-home .skeletons.is-append .skeleton:nth-child(n+2) { display: none; }
body.page-home .skeletons.is-append .skeleton { height: 72px; }
@keyframes home-shimmer { to { background-position: -200% 0; } }

body.page-home .side-card, body.page-home .ad { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); }
body.page-home .side-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
body.page-home .side-card__head h3 { margin: 0; font-size: 14px; font-weight: 800; }
body.page-home .side-card__meta { font-size: 12px; font-weight: 800; color: var(--accent-dark); background: var(--pale); border-radius: 999px; padding: 2px 8px; }
body.page-home .btn:focus-visible, body.page-home .summary-chip:focus-visible, body.page-home .summary-reset:focus-visible, body.page-home .create-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.page-home .quiet { color: var(--muted); font-weight: 500; font-size: 13px; margin: 0; }
body.page-home .online-list { display: flex; gap: 10px; flex-wrap: wrap; }
body.page-home .online-person { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 58px; color: var(--text); font-size: 11px; font-weight: 700; text-align: center; }
body.page-home .online-person .avatar { width: 40px; height: 40px; position: relative; }
body.page-home .online-person .avatar:after { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #3f6b4a; border: 2px solid var(--card); right: -1px; bottom: 1px; }
body.page-home .online-person span:last-child { max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.page-home .rank-list { counter-reset: rank; display: flex; flex-direction: column; gap: 4px; }
body.page-home .rank-row { counter-increment: rank; display: flex; align-items: center; gap: 8px; margin: 0; padding: 6px; border-radius: 10px; font-size: 13px; color: var(--text); }
body.page-home .rank-row:hover { background: var(--soft); }
body.page-home .rank-num { font-size: 11px; font-weight: 800; color: var(--accent-dark); width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: var(--pale); }
body.page-home .rank-num:before { content: counter(rank); }
body.page-home .rank-row .avatar { width: 28px; height: 28px; }
body.page-home .rank-name { min-width: 0; flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.page-home .rank-score { font-size: 12px; font-weight: 800; color: #2f6b45; white-space: nowrap; }
body.page-home .discussion-list { display: flex; flex-direction: column; gap: 4px; }
body.page-home .discussion-row { display: block; padding: 8px; border-radius: 10px; font-size: 13px; line-height: 1.35; font-weight: 700; color: var(--text); }
body.page-home .discussion-row:hover { background: var(--soft); }
body.page-home .right-topics, body.page-home .topics { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
body.page-home .topic { font-size: 11px; border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; background: var(--card); color: var(--muted); font-weight: 700; }
body.page-home .topic.active, body.page-home .topic:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
body.page-home .ad { padding: 12px; border-style: dashed; color: var(--muted); font-size: 12px; }
body.page-home .ad-label { text-transform: uppercase; letter-spacing: .1em; font-size: 9px; margin-bottom: 6px; font-weight: 800; }
body.page-home .ad-body { color: var(--text); }

body.page-home #pw-filters-sheet .pw-sheet__panel { gap: 12px; max-height: min(86vh, 720px); overflow: auto; }
body.page-home .sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
body.page-home .sheet-head h2 { margin: 0; font-size: 18px; }
body.page-home .sheet-field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 750; color: var(--muted); }
body.page-home .sheet-field select { width: 100%; max-width: none; background: var(--soft); border: 1px solid var(--line); color: var(--text); font-size: 14px; border-radius: 8px; padding: 8px 10px; }
body.page-home .check-line { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 650; color: var(--text); }
body.page-home .check-line input { accent-color: var(--accent); }
body.page-home .sync-note { margin: 0; color: var(--muted); font-size: 12px; }
body.page-home .sync-note a { color: var(--accent-dark); font-weight: 800; }
body.page-home .sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; }

body.page-home .btn { border: 1px solid var(--line); background: var(--soft); border-radius: 8px; padding: 8px 12px; font-size: 13px; font-weight: 750; color: var(--text); cursor: pointer; font-family: inherit; }
body.page-home .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
body.page-home .modal-backdrop { position: fixed; inset: 0; background: rgba(33, 23, 15, .5); z-index: 400; display: flex; align-items: center; justify-content: center; padding: 20px; }
body.page-home .modal-backdrop[hidden] { display: none; }
body.page-home .modal { position: relative; width: min(520px, 100%); max-height: min(86vh, 760px); overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; box-shadow: 0 18px 60px rgba(0, 0, 0, .12); color: var(--text); }
body.page-home #pw-viewer { background: rgba(33, 23, 15, .48); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
body.page-home .story-frame { width: min(560px, 100%); height: min(820px, calc(100vh - 48px)); height: min(820px, calc(100dvh - 48px)); }
body.page-home .story-viewer { position: relative; display: flex; flex-direction: column; height: 100%; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 30px 80px rgba(33, 23, 15, .28); overflow: hidden; }
body.page-home .story-progress { display: flex; gap: 3px; height: auto; margin: 0; padding: 12px 14px 0; background: transparent; }
body.page-home .story-progress > span { flex: 1; display: block; height: 3px; width: auto; border-radius: 99px; background: var(--line); }
body.page-home .story-progress > span.is-done,
body.page-home .story-progress > span.is-current { background: var(--accent); }
body.page-home .story-head { display: flex; align-items: center; gap: 6px; padding: 10px 10px 8px; }
body.page-home .story-nav,
body.page-home .story-icon { border: 0; background: transparent; color: var(--text); cursor: pointer; font: inherit; display: inline-flex; align-items: center; justify-content: center; gap: 4px; border-radius: 999px; padding: 6px; flex-shrink: 0; }
body.page-home .story-nav { width: 32px; height: 32px; background: var(--soft); }
body.page-home .story-nav[hidden] { display: none; }
body.page-home .story-icon:hover,
body.page-home .story-nav:hover { background: var(--pale); color: var(--accent-dark); }
body.page-home .story-icon.is-on { color: #d12b4a; }
body.page-home .story-icon.is-on svg { fill: currentColor; stroke: currentColor; }
body.page-home .story-icon span { font-size: 13px; font-weight: 800; }
body.page-home .story-tools { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
body.page-home .story-author { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; color: var(--text); }
body.page-home .story-author__meta { min-width: 0; }
body.page-home .story-author__name { display: block; font-weight: 800; font-size: 15px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.page-home .story-author__sub { display: flex; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 650; }
body.page-home .story-avatar,
body.page-home .story-comment__face { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; position: relative; overflow: hidden; flex-shrink: 0; background: #f4d4b0; color: #49311e; font-size: 13px; font-weight: 800; box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent); }
body.page-home .story-comment__face { width: 32px; height: 32px; font-size: 11px; box-shadow: none; }
body.page-home .story-avatar img,
body.page-home .story-comment__face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
body.page-home .story-avatar img[hidden] { display: none; }
body.page-home .story-stage { position: relative; flex: 0 1 auto; max-height: 34%; overflow: auto; padding: 4px 18px 12px; }
body.page-home .story-stage.is-open { max-height: 58%; }
body.page-home .story-stage.is-clipped:not(.is-open)::after { content: ""; position: sticky; bottom: 0; display: block; height: 28px; margin-top: -28px; background: linear-gradient(transparent, var(--card)); pointer-events: none; }
body.page-home .story-text { margin: 0; font-size: 17px; line-height: 1.55; font-weight: 500; letter-spacing: -.015em; overflow-wrap: anywhere; }
body.page-home .story-text p,
body.page-home .story-comment__text p { margin: 0 0 8px; }
body.page-home .story-text a,
body.page-home .story-comment__text a { color: var(--accent-dark); font-weight: 750; }
body.page-home .story-text img { max-width: 100%; height: auto; border-radius: 12px; }
body.page-home .story-text .cit,
body.page-home .story-comment__text .cit { margin: 8px 0; padding: 8px 10px; border-left: 3px solid var(--accent); background: var(--soft); border-radius: 8px; color: var(--muted); font-size: 14px; }
body.page-home #pw-view-image { display: block; width: 100%; max-height: 200px; object-fit: cover; border-radius: 16px; margin: 12px 0 0; }
body.page-home .story-expand { display: block; margin: 0 auto 8px; border: 0; background: var(--pale); color: var(--accent-dark); font: inherit; font-size: 12px; font-weight: 800; border-radius: 999px; padding: 5px 12px; cursor: pointer; }
body.page-home .story-react { position: relative; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 4px 16px 10px; }
body.page-home .story-react__row { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
body.page-home .story-react__chip,
body.page-home .story-react__pick,
body.page-home .story-react__add { border: 1px solid var(--line); background: var(--soft); color: var(--text); cursor: pointer; font: inherit; }
body.page-home .story-react__chip { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 8px; border-radius: 999px; }
body.page-home .story-react__chip.is-on,
body.page-home .story-react__chip:hover,
body.page-home .story-react__pick:hover { background: var(--pale); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
body.page-home .story-react__chip img,
body.page-home .story-react__pick img { width: 18px; height: 18px; object-fit: contain; }
body.page-home .story-react__chip span { font-size: 12px; font-weight: 800; color: var(--muted); line-height: 1; }
body.page-home .story-react__chip.is-on span { color: var(--accent-dark); }
body.page-home .story-react__add { width: 32px; height: 32px; border-radius: 999px; border-style: dashed; display: grid; place-items: center; color: var(--muted); flex-shrink: 0; }
body.page-home .story-react__add:hover { color: var(--accent-dark); border-style: solid; background: var(--pale); }
body.page-home .story-react__add svg { width: 16px; height: 16px; }
body.page-home .story-react__picker { position: absolute; left: 16px; top: calc(100% - 4px); z-index: 6; display: flex; flex-wrap: wrap; gap: 4px; width: min(280px, calc(100% - 32px)); padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(33, 23, 15, .16); }
body.page-home .story-react__pick { width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; display: grid; place-items: center; padding: 0; }
body.page-home .story-react__pick img { width: 22px; height: 22px; }
body.page-home .story-react__add[hidden],
body.page-home .story-react__picker[hidden] { display: none !important; }
body.page-home .story-talk { flex: 1; min-height: 0; display: flex; flex-direction: column; background: color-mix(in srgb, var(--soft) 72%, var(--card)); border-top: 1px solid var(--line); }
body.page-home .story-talk__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px 6px; }
body.page-home .story-talk__head h2 { margin: 0; font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
body.page-home .story-talk__head h2 span { background: var(--pale); color: var(--accent-dark); border-radius: 999px; min-width: 1.4em; padding: 1px 8px; font-size: 12px; text-align: center; }
body.page-home .story-talk__head a { color: var(--accent-dark); font-size: 13px; font-weight: 800; }
body.page-home .story-talk__list { flex: 1; min-height: 0; overflow: auto; padding: 2px 16px 8px; }
body.page-home .story-talk__list:has(.story-empty) { display: flex; flex-direction: column; align-items: center; justify-content: center; }
body.page-home .story-comment { display: grid; grid-template-columns: 22px 32px minmax(0, 1fr); gap: 8px; padding: 10px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 85%, transparent); }
body.page-home .story-rate { display: flex; flex-direction: column; align-items: center; gap: 0; padding-top: 2px; }
body.page-home .story-rate__btn { border: 0; background: transparent; color: var(--muted); padding: 0; width: 22px; height: 16px; display: grid; place-items: center; cursor: pointer; }
body.page-home .story-rate__btn svg { width: 14px; height: 14px; }
body.page-home .story-rate__btn.is-up.is-on,
body.page-home .story-rate__count.is-up { color: #2f6b45; }
body.page-home .story-rate__btn.is-down.is-on,
body.page-home .story-rate__count.is-down { color: #c2410c; }
body.page-home .story-rate__btn:disabled { opacity: .4; cursor: default; }
body.page-home .story-rate__count { font-size: 11px; font-weight: 800; line-height: 1; color: var(--muted); }
body.page-home .story-comment:last-of-type { border-bottom: 0; }
body.page-home .story-comment__top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
body.page-home .story-comment__name { font-weight: 800; font-size: 13px; color: var(--text); }
body.page-home .story-comment__time { color: var(--muted); font-size: 11px; font-weight: 650; white-space: nowrap; }
body.page-home .story-comment__rating { margin-left: auto; font-size: 11px; font-weight: 800; }
body.page-home .story-comment__rating.is-up { color: #2f6b45; }
body.page-home .story-comment__rating.is-down { color: #c2410c; }
body.page-home .story-comment__text { margin-top: 2px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
body.page-home .story-comment__text p:last-child { margin-bottom: 0; }
body.page-home .story-comment__text img { max-height: 84px; width: auto; border-radius: 8px; }
body.page-home .story-more { display: block; text-align: center; padding: 8px 0 4px; font-size: 13px; font-weight: 800; color: var(--accent-dark); }
body.page-home .story-empty { margin: 0; padding: 22px 8px; text-align: center; color: var(--muted); font-size: 14px; font-weight: 650; }
body.page-home .story-empty .btn { display: block; margin: 10px auto 0; }
body.page-home .story-skel { height: 52px; border-radius: 12px; margin: 8px 0; background: linear-gradient(90deg, var(--soft), var(--card), var(--soft)); background-size: 200% 100%; animation: home-shimmer 1.1s linear infinite; }
body.page-home .story-reply { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--card); }
body.page-home .story-reply textarea { flex: 1; min-width: 0; width: auto; min-height: 40px; max-height: 96px; border: 1px solid var(--line); background: var(--soft); color: var(--text); border-radius: 20px; padding: 10px 14px; font: inherit; font-size: 14px; line-height: 1.35; resize: none; }
body.page-home .story-send { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
body.page-home .story-send:disabled { opacity: .45; cursor: default; }
body.page-home .story-send svg { width: 18px; height: 18px; }
body.page-home .story-reply-guest { margin: 0; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--card); font-size: 13px; color: var(--muted); font-weight: 650; }
body.page-home .story-reply-guest a { color: var(--accent-dark); font-weight: 800; }
body.page-home .story-toast { position: absolute; left: 50%; bottom: 78px; transform: translateX(-50%); background: #2a2118; color: #fff; border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 700; z-index: 5; pointer-events: none; white-space: nowrap; }
body.page-home .story-reply[hidden],
body.page-home .story-reply-guest[hidden],
body.page-home .story-expand[hidden],
body.page-home .story-toast[hidden],
body.page-home #pw-view-image[hidden] { display: none !important; }
body.page-home .story-icon:focus-visible,
body.page-home .story-nav:focus-visible,
body.page-home .story-send:focus-visible,
body.page-home .story-expand:focus-visible,
body.page-home .story-reply textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.page-home .modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
body.page-home .modal-head h2 { font-size: 18px; margin: 0; color: var(--text); }
body.page-home .modal-close { border: 0; background: var(--soft); border-radius: 7px; padding: 5px; display: grid; place-items: center; color: var(--text); cursor: pointer; }
body.page-home .modal-user { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
body.page-home .modal-user img,
body.page-home .modal-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
body.page-home .modal-avatar { display: grid; place-items: center; background: #f4d4b0; color: #49311e; font-weight: 800; font-size: 14px; }
body.page-home .modal-avatar[hidden], body.page-home .modal-user img[hidden] { display: none; }
body.page-home .modal-user a { font-weight: 800; color: var(--text); display: block; }
body.page-home .modal-user time, body.page-home .count-line { color: var(--muted); font-size: 13px; }
body.page-home .modal-text { font-size: 15px; line-height: 1.65; margin: 0 0 14px; }
body.page-home #pw-view-image { max-width: 100%; border-radius: 12px; margin-bottom: 14px; }
body.page-home .modal-actions { display: flex; flex-wrap: wrap; gap: 8px; position: relative; z-index: 3; }
body.page-home .modal textarea, body.page-home .file-pick input { width: 100%; border: 1px solid var(--line); background: var(--soft); color: var(--text); border-radius: 10px; padding: 8px 10px; font: inherit; }
body.page-home .modal textarea { min-height: 120px; resize: vertical; }
body.page-home .file-pick { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 12px; font-size: 12px; font-weight: 750; color: var(--muted); }
body.page-home .create-modal { width: min(460px, 100%); }
body.page-home .create-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
body.page-home .create-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--soft);
    color: var(--text);
}
body.page-home .create-card:hover { border-color: var(--accent); background: var(--card); }
body.page-home .create-card--wide { grid-column: 1 / -1; }
body.page-home .create-card__icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--pale); color: var(--accent-dark); }
body.page-home .create-card__icon--code { background: color-mix(in srgb, #2f6b45 16%, var(--card)); color: #2f6b45; }
body.page-home .create-card__icon--file { background: color-mix(in srgb, #8a5a2b 16%, var(--card)); color: #8a5a2b; }
body.page-home .create-card__icon--topic { background: color-mix(in srgb, #9a3412 14%, var(--card)); color: #9a3412; }
body.page-home .create-card__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
body.page-home .create-card__text strong { font-size: 14px; }
body.page-home .create-card__text small { font-size: 12px; color: var(--muted); font-weight: 600; }

html[data-theme="dark"] body.page-home .post--article { --type: #ffb347; }
html[data-theme="dark"] body.page-home .post--code { --type: #8dcea3; }
html[data-theme="dark"] body.page-home .post--file { --type: #e0b48a; }
html[data-theme="dark"] body.page-home .post--news { --type: #ffb347; }
html[data-theme="dark"] body.page-home .post--forum { --type: #f0a08a; }
html[data-theme="dark"] body.page-home .post--thought { --type: #f0c27a; }
html[data-theme="dark"] body.page-home .story .initials,
html[data-theme="dark"] body.page-home .story .face,
html[data-theme="dark"] body.page-home .modal-avatar,
html[data-theme="dark"] body.page-home .story-avatar,
html[data-theme="dark"] body.page-home .story-comment__face { color: #fff0df; background: #4a3322; }
html[data-theme="dark"] body.page-home .story-comment__rating.is-up,
html[data-theme="dark"] body.page-home .story-rate__btn.is-up.is-on,
html[data-theme="dark"] body.page-home .story-rate__count.is-up { color: #8dcea3; }
html[data-theme="dark"] body.page-home .story-toast { background: #fff0df; color: #2a2118; }
html[data-theme="dark"] body.page-home .avatar { background: #4a3322; color: #ffe0ba; }
html[data-theme="dark"] body.page-home .topic.active,
html[data-theme="dark"] body.page-home .topic:hover { color: #1a120c; }
html[data-theme="dark"] body.page-home .rank-score { color: #8dcea3; }
html[data-theme="dark"] body.page-home .create-card__icon--code { color: #8dcea3; }

@media (min-width: 861px) {
    body.page-home #pw-filters-sheet .pw-sheet__panel {
        top: 50%;
        bottom: auto;
        left: 50%;
        right: auto;
        width: min(480px, calc(100% - 32px));
        transform: translate(-50%, -50%);
        border-radius: 16px;
    }
}
@media (max-width: 1100px) {
    body.page-home .home { display: flex; flex-direction: column; align-items: stretch; gap: 14px; width: 100%; }
    body.page-home .main { order: 1; width: 100%; max-width: 100%; }
    body.page-home .right { order: 2; width: 100%; max-width: 100%; }
}
@media (max-width: 860px) {
    body.page-home { --pw-header: 94px; }
    body.page-home .feed-controls__bar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }
    body.page-home .filter-tabs { grid-column: 1; grid-row: 1; max-width: 100%; }
    body.page-home .filters-open { grid-column: 2; grid-row: 1; }
    body.page-home .type-pills { grid-column: 1 / -1; grid-row: 2; max-width: 100%; }
    body.page-home .home, body.page-home .feed-controls__bar, body.page-home .filter-summary { padding-left: 12px; padding-right: 12px; }
    body.page-home .rw-footer { display: none; }
    body.page-home .post h3 { font-size: 17px; }
    body.page-home .post { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 12px; }
    body.page-home .post-rail { width: 36px; height: 36px; }
    body.page-home #pw-composer .modal { width: 100%; max-height: 100%; height: 100%; border-radius: 0; }
    body.page-home #pw-viewer,
    body.page-home #pw-composer { padding: 0; }
    body.page-home #pw-viewer { align-items: stretch; }
    body.page-home .story-frame { width: 100%; height: 100%; }
    body.page-home .story-viewer { border: 0; border-radius: 0; box-shadow: none; }
    body.page-home .story-stage { max-height: 32%; }
    body.page-home .story-head { padding: 8px 6px 6px; gap: 4px; }
    body.page-home .story-avatar { width: 36px; height: 36px; }
    body.page-home .story-author { gap: 8px; }
    body.page-home #pw-create-modal { align-items: flex-end; padding: 0; }
    body.page-home .create-modal { width: 100%; height: auto; max-height: min(88vh, 640px); border-radius: 18px 18px 0 0; }
}
