/* 条目独立页样式：复用 tokens.css 的色板与字体，只放这一页需要的东西 */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background: var(--ground);
    color: var(--body);
    min-height: 100vh;
    line-height: 1.75;
    font-size: 15px;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--trail-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

:focus-visible { outline: 2px solid var(--trail); outline-offset: 3px; border-radius: 4px; }

/* ── 顶部细栏 ─────────────────────────────────── */
.topbar {
    display: flex;
    align-items: center;
    max-width: 820px;
    width: 100%;
    margin: 0 auto;
    padding: 14px 24px 6px;
}

/* 只留一个返回箭头，点一下回上一级 */
.topbar .back-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px 6px 11px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--body);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.topbar .back-arrow .arrow {
    font-size: 15px;
    line-height: 1;
    transition: transform 0.2s var(--ease);
}

.topbar .back-arrow:hover .arrow { transform: translateX(-2px); }

.topbar .back-arrow:hover {
    text-decoration: none;
    color: var(--trail-ink);
    border-color: var(--trail);
}

/* ── 主体 ────────────────────────────────────── */
.sheet {
    flex: 1;
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: 8px 24px 48px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px 30px 26px;
}

.head { display: flex; align-items: center; gap: 16px; }

.mark {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 16px;
    border: 1px solid var(--line-strong);
    background: var(--ground);
    display: grid;
    place-items: center;
    overflow: hidden;
}

.mark img { width: 100%; height: 100%; object-fit: cover; display: block; }

.mark-letter {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--trail);
}

.head-text { min-width: 0; }

h1 {
    font-family: var(--font-display);
    font-size: clamp(24px, 4vw, 32px);
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.kind {
    margin-top: 4px;
    font-size: 12.5px;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 18px;
}

.tag {
    font-size: 11.5px;
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 1px 8px;
}

.desc {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    font-size: 16px;
    line-height: 1.85;
    color: var(--body);
    white-space: pre-wrap;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 26px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 260px;
    padding: 12px 30px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong);
    background: transparent;
    color: var(--trail-ink);
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease);
}

.btn:hover { text-decoration: none; border-color: var(--trail); }

.btn-solid {
    background: var(--btn-bg);
    border-color: var(--btn-bg);
    color: var(--btn-ink);
}

.btn-solid:hover { background: var(--accent-ink); border-color: var(--accent-ink); }

.none { color: var(--muted); font-size: 14px; }

/* ── 404 ─────────────────────────────────────── */
.missing {
    background: var(--surface);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-lg);
    padding: 48px 30px;
    text-align: center;
}

.missing h1 {
    font-size: 22px;
    margin-bottom: 8px;
}

.missing p { color: var(--muted); font-size: 14px; margin-bottom: 20px; }

/* ── 页脚 ────────────────────────────────────── */
.foot {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 20px 24px 32px;
    font-size: 12.5px;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

.foot .dot { color: var(--line-strong); }

@media (max-width: 560px) {
    .actions .btn { min-width: 0; flex: 1 1 100%; }
    .card { padding: 22px 20px; }
    .head { gap: 13px; }
    .mark { width: 48px; height: 48px; border-radius: 13px; }
    .desc { font-size: 15px; }
}