:root {
    --ink: #101014;
    --paper: #F3EFE7;
    --amber: var(--ghost-accent-color, #E8A93B);
    --scrim: rgba(8, 8, 10, 0.86);
    --gh-font-heading: var(--display, Fraunces, serif);
    --gh-font-body: var(--utility, Archivo, sans-serif);

    /* ---- bottom nav size control: ubah angka ini saja untuk resize semuanya ---- */
    --nav-item-size: 40px;
    --nav-clearance: calc(var(--nav-item-size) + 56px);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--gh-font-body);
    -webkit-tap-highlight-color: transparent;
}

/* Ghost Portal & Search inject margin-right on body to compensate scrollbar removal */
body {
    margin-right: 0 !important;
}

html {
    scroll-behavior: auto; /* our JS drives the animated transitions directly */
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: #c9c9c9 transparent; /* Firefox: thumb / track */
    scrollbar-gutter: stable;
}
html::-webkit-scrollbar { width: 8px; }
html::-webkit-scrollbar-track { background: transparent; }
html::-webkit-scrollbar-thumb { background: #c9c9c9; border-radius: 4px; }

/* ---------- frame: constrains layout to a phone-width column on desktop ---------- */
.frame {
    position: relative;
    width: 100%;
    margin: 0 auto;
}
@media (min-width: 661px) {
    body { background: #08080a; }
    .frame { max-width: 580px; }
}

/* ---------- top bar ---------- */
.site-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 30;
    display: flex;
    align-items: baseline;
    justify-content: center;
    padding: 14px 18px;
    pointer-events: none;
}
@media (min-width: 661px) {
    .site-bar { left: 50%; right: auto; width: 100%; max-width: 580px; transform: translateX(-50%); }
}
.site-bar__mark {
    color: var(--paper);
    text-decoration: none;
    font-family: var(--gh-font-heading);
    font-weight: 600;
    font-size: 18px;
    pointer-events: auto;
    text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}
/* ---------- feed: vertical snap (snapping happens on the page, not an inner scrollbox) ---------- */
.feed {
    position: relative;
}

.feed-item {
    position: relative;
    height: 100dvh;
    width: 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.feed-item__link {
    display: block;
    position: relative;
    height: 100%;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

.feed-item__media {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #1a1a1e;
}
.feed-item__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.feed-item__media--fallback {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--gh-font-heading);
    font-size: 32px;
    color: rgba(243,239,231,0.25);
}
.feed-item__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8,8,10,0.05) 0%, rgba(8,8,10,0.15) 45%, var(--scrim) 100%);
}

.feed-item__body {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 0 20px var(--nav-clearance);
    z-index: 2;
}
.feed-item__eyebrow {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 10px;
}
.feed-item__title {
    font-family: var(--gh-font-heading);
    font-weight: 700;
    font-size: clamp(26px, 7vw, 40px);
    line-height: 1.08;
    margin: 0 0 10px;
    text-wrap: balance;
}
.feed-item__excerpt {
    font-size: 14.5px;
    line-height: 1.5;
    color: rgba(243,239,231,0.82);
    margin: 0 0 14px;
    max-width: 46ch;
}
.feed-item__meta {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: rgba(243,239,231,0.6);
}
.feed-item__meta span:not(:last-child)::after {
    content: "·";
    margin-left: 14px;
    opacity: 0.6;
}

/* ---------- signature: reel rail ---------- */
.reel-rail {
    position: fixed;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 25;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}
@media (min-width: 661px) {
    .reel-rail { right: calc(50vw - 278px); }
}
.reel-rail__fill {
    width: 2px;
    height: 90px;
    background: rgba(243,239,231,0.2);
    position: relative;
    border-radius: 2px;
    overflow: hidden;
}
.reel-rail__fill::after {
    content: "";
    position: absolute;
    left: 0; top: 0; width: 100%;
    height: 0%;
    background: var(--amber);
    transition: height 0.25s ease;
}
.reel-rail__count {
    font-family: var(--gh-font-body);
    font-variant-numeric: tabular-nums;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: rgba(243,239,231,0.75);
    writing-mode: vertical-rl;
}

/* ---------- single post ---------- */
.post { background: var(--ink); min-height: 100dvh; }
.post__hero {
    position: relative;
    height: 72dvh;
    min-height: 420px;
    overflow: hidden;
}
.post__hero-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post__hero-scrim {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(8,8,10,0.1) 0%, rgba(8,8,10,0.2) 50%, var(--ink) 100%);
}
.post__hero-body {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 0 20px var(--nav-clearance);
}
.post__title {
    font-family: var(--gh-font-heading);
    font-weight: 700;
    font-size: clamp(28px, 6vw, 48px);
    line-height: 1.08;
    margin: 0 0 12px;
}
.post__content {
    max-width: 68ch;
    margin: 0 auto;
    padding: 40px 20px 60px;
    font-size: 17px;
    line-height: 1.7;
    color: rgba(243,239,231,0.92);
}
.post__content img { max-width: 100%; border-radius: 4px; }
.post__content a { color: var(--amber); }
.post__content .kg-width-wide {
    width: 100%;
    max-width: calc(68ch + 200px);
    margin-left: 50%;
    transform: translateX(-50%);
}
.post__content .kg-width-full {
    width: 100vw;
    max-width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
}
.post__content .kg-width-full img { border-radius: 0; }

/* ---------- mobile menu trigger (adapted from People theme) ---------- */
[data-people-menu-trigger].is-open,
[data-nav-panel-trigger].is-open {
    background: var(--amber);
    color: var(--on-accent, var(--paper));
}

.people-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 3999998;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.people-mobile-overlay.is-visible { display: block; opacity: 1; }

.people-mobile-menu {
    position: fixed;
    top: 0; left: 0; right: 0;
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
    max-height: 80dvh;
    overflow-y: auto;
    background: var(--ink);
    z-index: 3999999;
    display: flex;
    flex-direction: column;
    transform: translateY(-110%);
    visibility: hidden;
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1), visibility 0s linear 0.28s;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}
.people-mobile-menu.is-open {
    transform: translateY(0);
    visibility: visible;
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1), visibility 0s linear 0s;
}
.people-mobile-menu.is-closing {
    transform: translateY(-110%);
    visibility: hidden;
}
.people-mobile-menu__nav { padding: 76px 0 20px; }
.people-mobile-menu__footer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px 28px;
}
.people-mobile-menu__footer .gh-head-button,
.people-mobile-menu__footer .gh-head-link {
    font-family: var(--gh-font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--paper);
    text-decoration: none;
}
.people-mobile-menu__footer .gh-head-button {
    padding: 8px 16px;
    background: var(--amber);
    color: var(--ink);
    border-radius: 999px;
}
.people-mobile-nav-list { list-style: none; margin: 0; padding: 0; }
.people-mobile-nav-link {
    display: block;
    padding: 14px 24px;
    font-family: var(--gh-font-heading);
    font-size: 20px;
    font-weight: 600;
    color: var(--paper);
    text-decoration: none;
    transition: opacity 0.15s;
}
.people-mobile-nav-link:hover { opacity: 0.75; color: var(--amber); }

.people-mobile-has-sub { position: relative; }
.people-mobile-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--gh-font-heading);
    font-size: 20px;
    font-weight: 600;
    color: var(--paper);
    text-align: left;
}
.people-mobile-nav-toggle__label,
.people-mobile-nav-toggle__link {
    font-family: var(--gh-font-heading);
    font-size: 20px;
    font-weight: 600;
    color: var(--paper);
    text-decoration: none;
}
.people-mobile-chevron {
    color: var(--paper);
    opacity: 0.6;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: 12px;
}
.people-mobile-nav-item.is-open > .people-mobile-nav-toggle .people-mobile-chevron {
    transform: rotate(90deg);
}
.people-mobile-submenu { list-style: none; margin: 0; padding: 0; }
.people-mobile-submenu-item { }
.people-mobile-submenu-link {
    display: block;
    padding: 10px 24px 10px 40px;
    font-family: var(--gh-font-body);
    font-size: 15px;
    font-weight: 500;
    color: var(--paper);
    opacity: 0.8;
    text-decoration: none;
    transition: opacity 0.15s, color 0.15s;
}
.people-mobile-submenu-link:hover { opacity: 1; color: var(--amber); }

html.people-menu-open { overflow: hidden; }
.people-nav-open .site-bar { z-index: 4000000; }
.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ---------- bottom nav (floating) ---------- */
.bottom-nav-wrap {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 35;
    display: flex;
    align-items: center;
    gap: 10px;
}
.bottom-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: calc(var(--nav-item-size) * 0.15);
    background: var(--paper);
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.bottom-nav__item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--nav-item-size);
    height: var(--nav-item-size);
    border-radius: 50%;
    background: transparent;
    border: 0;
    padding: 0;
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.bottom-nav__item .icon {
    width: calc(var(--nav-item-size) * 0.5);
    height: calc(var(--nav-item-size) * 0.5);
}
.bottom-nav-count {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(var(--nav-item-size) + 12px);
    height: calc(var(--nav-item-size) + 12px);
    border-radius: 50%;
    background: var(--paper);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.bottom-nav-count__ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.bottom-nav-count__track {
    fill: none;
    stroke: rgba(8,8,10,0.12);
    stroke-width: 3;
}
.bottom-nav-count__progress {
    fill: none;
    stroke: var(--amber);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.25s ease;
}
.bottom-nav-count__text {
    position: relative;
    font-family: var(--gh-font-body);
    font-variant-numeric: tabular-nums;
    font-size: calc(var(--nav-item-size) * 0.25);
    font-weight: 600;
    color: var(--ink);
    text-align: center;
    line-height: 1.2;
}
.bottom-nav-count .icon {
    position: relative;
    width: 20px;
    height: 20px;
    color: var(--ink);
}
/* ---------- nav panel (opens above bottom nav) ---------- */
.nav-panel {
    position: fixed;
    left: 50%;
    bottom: 84px;
    transform: translateX(-50%) translateY(12px);
    z-index: 34;
    width: min(88vw, 360px);
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    background: var(--paper);
    color: var(--ink);
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    overflow: hidden;
}
.nav-panel.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.nav-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 8px;
    flex-shrink: 0;
}
.nav-panel__title {
    font-family: var(--gh-font-heading);
    font-weight: 700;
    font-size: 18px;
}
.nav-panel__close {
    background: transparent;
    border: 0;
    padding: 4px;
    color: var(--ink);
    cursor: pointer;
    display: flex;
}
.nav-panel__list {
    display: flex;
    flex-direction: column;
    padding: 4px 18px 12px;
    overflow-y: auto;
}
.nav-panel__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    color: var(--ink);
    text-decoration: none;
    font-family: var(--gh-font-body);
    font-size: 14px;
    font-weight: 600;
    background: transparent;
    border: 0;
    text-align: left;
    cursor: pointer;
    width: 100%;
}
.nav-panel__row--toggle {
    width: 100%;
}
.nav-panel__chevron {
    transition: transform 0.2s ease;
    flex-shrink: 0;
    color: rgba(8,8,10,0.5);
}
.nav-panel__group.is-open .nav-panel__chevron {
    transform: rotate(180deg);
}
.nav-panel__children {
    display: flex;
    flex-direction: column;
    height: 0;
    overflow: hidden;
}
.nav-panel__row--sub {
    padding: 8px 0 8px 16px;
    font-weight: 400;
    font-size: 13px;
    color: rgba(8,8,10,0.6);
}
.nav-panel__footer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    border-top: 1px solid rgba(8,8,10,0.1);
    flex-shrink: 0;
}
.nav-panel__subscribe {
    background: var(--amber);
    color: var(--on-accent, var(--ink));
    border: 0;
    border-radius: 999px;
    padding: 10px 20px;
    font-family: var(--gh-font-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.nav-panel__signin {
    background: transparent;
    border: 0;
    color: var(--ink);
    font-family: var(--gh-font-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

/* ---------- share toast ---------- */
.share-toast {
    position: fixed;
    left: 50%;
    bottom: 150px;
    transform: translateX(-50%) translateY(8px);
    z-index: 40;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--gh-font-body);
    font-size: 13px;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}
.share-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}