/* ==========================================================================
   Mango · a clean photo-journal theme for Inklog
   Original layout and CSS; no external framework.
   ========================================================================== */

:root {
    --m-accent: #2f6fed;
    --m-accent-soft: rgba(47, 111, 237, .10);
    --m-bg: #f4f6fa;
    --m-card: #ffffff;
    --m-text: #18202c;
    --m-soft: #5e6a7a;
    --m-muted: #8b95a5;
    --m-line: #e7ecf4;
    --m-line-strong: #d9e1ed;
    --m-dark: #111820;
    --m-radius: 18px;
    --m-shadow: 0 24px 60px -38px rgba(23, 38, 65, .34);
    --m-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
    --m-serif: "Songti SC", "Noto Serif SC", Georgia, serif;
}

[data-theme="dark"] {
    --m-bg: #141a22;
    --m-card: #1c242e;
    --m-text: #e8edf5;
    --m-soft: #aeb8c7;
    --m-muted: #7f8b9b;
    --m-line: #2a3440;
    --m-line-strong: #364251;
    --m-accent-soft: rgba(91, 145, 255, .14);
    --m-shadow: 0 24px 60px -32px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--m-text);
    background:
        radial-gradient(1000px 480px at 8% -10%, rgba(47, 111, 237, .08), transparent 60%),
        radial-gradient(900px 440px at 100% 0%, rgba(83, 194, 174, .07), transparent 55%),
        var(--m-bg);
    font-family: var(--m-sans);
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
body.mango { min-height: 100vh; }
body.drawer-open, body.search-open { overflow: hidden; }
img { max-width: 100%; height: auto; border: 0; }
a { color: var(--m-text); text-decoration: none; transition: color .2s; }
a:hover { color: var(--m-accent); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
::selection { background: var(--m-accent); color: #fff; }
.m-container { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.m-main { min-height: 56vh; padding-bottom: 72px; }
.m-sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.m-dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .45; display: inline-block; vertical-align: middle; }

/* ---------- header ---------- */
.m-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .9);
    background: color-mix(in srgb, var(--m-card) 86%, transparent);
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: border-color .25s, box-shadow .25s, background .25s;
}
[data-theme="dark"] .m-header { background: rgba(24, 31, 40, .9); }
.m-header.is-scrolled { border-bottom-color: var(--m-line); box-shadow: 0 8px 30px -24px rgba(20, 35, 60, .4); }
.m-header-inner { min-height: 76px; display: flex; align-items: center; gap: 26px; }
.m-brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; color: var(--m-text); }
.m-brand:hover { color: var(--m-text); }
.m-brand-mark { display: block; width: 34px; height: 34px; flex: 0 0 34px; }
.m-brand-mark svg, .m-brand-mark img { width: 100%; height: 100%; display: block; }
.m-brand-mark .mark-on-dark { display: none; }
[data-theme="dark"] .m-brand-mark .mark-on-light { display: none; }
[data-theme="dark"] .m-brand-mark .mark-on-dark { display: block; }
.m-brand-logo { display: block; height: 36px; width: auto; max-width: 190px; object-fit: contain; }
.m-brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.m-brand-text b { font-family: var(--m-serif); font-size: 20px; letter-spacing: 1.5px; white-space: nowrap; }
.m-brand-text i { font-style: normal; font-size: 10px; color: var(--m-muted); letter-spacing: .6px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-nav { display: flex; align-items: center; gap: 30px; margin-left: 10px; flex: 1 1 auto; }
.m-nav a { font-size: 14.5px; color: var(--m-soft); letter-spacing: .6px; white-space: nowrap; position: relative; padding: 9px 0; }
.m-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 2px; height: 2px; border-radius: 2px; background: var(--m-accent); transition: right .25s; }
.m-nav a:hover, .m-nav a.is-active { color: var(--m-text); }
.m-nav a:hover::after, .m-nav a.is-active::after { right: 0; }
.m-tools { margin-left: auto; display: flex; align-items: center; height: 34px; gap: 8px; }
.m-tools > .ink-widget { position: relative; width: 34px; min-width: 34px; height: 34px; padding: 0; line-height: 0; }
.m-tools > .ink-widget svg { position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; }
.m-tools > .ink-weather.is-full { width: auto; min-width: 0; height: 34px; padding: 0 8px 0 7px; display: inline-flex; align-items: center; justify-content: center; gap: 3px; border: 1px solid var(--m-line); border-radius: 999px; line-height: 1; }
.m-tools > .ink-weather.is-full svg { position: static; flex: 0 0 15px; width: 15px; height: 15px; }
.m-tools > .ink-weather.is-full .ink-weather-temp { color: var(--m-soft); font-family: var(--m-sans); font-size: 12px; font-weight: 500; letter-spacing: .2px; font-variant-numeric: tabular-nums; }
.m-header-login { color: var(--m-soft); font-size: 12px; padding: 0 3px; white-space: nowrap; }
.m-header-login:hover { color: var(--m-accent); }
.m-icon-btn { width: 34px; height: 34px; border: 1px solid var(--m-line); background: var(--m-card); border-radius: 50%; display: inline-grid; place-items: center; cursor: pointer; padding: 0; color: var(--m-soft); transition: border-color .2s, color .2s, background .2s; }
.m-icon-btn:hover { color: var(--m-accent); border-color: var(--m-accent); }
.m-menu-open { display: none; border: 0; background: transparent; width: 28px; height: 34px; }
.m-menu-open span { display: block; width: 18px; height: 1.5px; background: currentColor; margin: 4px auto; transition: transform .2s; }
.m-sun { display: block; }
.m-moon { display: none; }
[data-theme="dark"] .m-sun { display: none; }
[data-theme="dark"] .m-moon { display: block; }

/* ---------- mobile drawer / search ---------- */
.m-drawer { position: fixed; inset: 0; z-index: 90; visibility: hidden; pointer-events: none; }
.m-drawer.is-open { visibility: visible; pointer-events: auto; }
.m-drawer-mask { position: absolute; inset: 0; background: rgba(13, 22, 36, .46); opacity: 0; transition: opacity .25s; }
.m-drawer.is-open .m-drawer-mask { opacity: 1; }
.m-drawer-panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(84vw, 340px); background: var(--m-card); display: flex; flex-direction: column; padding: 20px 22px 26px; transform: translateX(-102%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); box-shadow: 30px 0 60px -30px rgba(0, 0, 0, .35); }
.m-drawer.is-open .m-drawer-panel { transform: translateX(0); }
.m-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--m-line); }
.m-drawer-nav { display: flex; flex-direction: column; padding: 12px 0; overflow-y: auto; }
.m-drawer-nav a { padding: 13px 4px; border-bottom: 1px solid var(--m-line); font-size: 15px; color: var(--m-soft); }
.m-drawer-nav a.is-active { color: var(--m-accent); font-weight: 600; }
.m-drawer-nav a.is-sub { padding-left: 22px; font-size: 13.5px; }
.m-archive-desc-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.m-archive-desc-row.has-count { width: calc(100% - 344px); }
.m-archive-total { flex: 0 0 auto; color: var(--m-muted); font-size: 12px; letter-spacing: .3px; white-space: nowrap; }
.m-subcats { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.m-subcats a { display: inline-flex; align-items: center; border: 1px solid var(--m-line); background: var(--m-card); border-radius: 999px; padding: 4px 11px; color: var(--m-soft); font-size: 11.5px; }
.m-subcats a:hover { color: var(--m-accent); border-color: var(--m-accent); }
.m-drawer-foot { margin-top: auto; padding-top: 18px; display: flex; flex-wrap: wrap; gap: 14px; border-top: 1px solid var(--m-line); font-size: 12px; color: var(--m-muted); }
.m-drawer-foot a { color: var(--m-soft); }
.m-search-layer { position: fixed; inset: 0; z-index: 100; background: rgba(10, 18, 30, .38); backdrop-filter: blur(8px); display: grid; place-items: start center; padding-top: 14vh; }
.m-search-box { width: min(680px, calc(100% - 40px)); background: var(--m-card); border-radius: 14px; padding: 10px; box-shadow: var(--m-shadow); position: relative; }
.m-search-box form { display: flex; gap: 8px; }
.m-search-box input { flex: 1; min-width: 0; border: 0; background: var(--m-bg); padding: 14px 16px; border-radius: 9px; color: var(--m-text); outline: none; }
.m-search-box button[type="submit"] { border: 0; background: var(--m-accent); color: #fff; padding: 0 22px; border-radius: 9px; cursor: pointer; }
.m-search-close { position: absolute; right: -14px; top: -14px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--m-card); box-shadow: 0 5px 20px rgba(0, 0, 0, .16); cursor: pointer; font-size: 20px; line-height: 1; }
.m-flashes { position: fixed; left: 50%; top: 88px; z-index: 80; transform: translateX(-50%); width: min(560px, calc(100% - 32px)); display: grid; gap: 8px; transition: opacity .24s ease, transform .24s ease; }
.m-flashes.is-hiding { opacity: 0; transform: translate(-50%, -7px); pointer-events: none; }
.m-flash { background: var(--m-card); border: 1px solid var(--m-line); border-left: 3px solid var(--m-accent); padding: 11px 14px; border-radius: 8px; box-shadow: 0 10px 30px -20px rgba(0, 0, 0, .3); font-size: 13px; }
.m-flash-error { border-left-color: #d95757; }

/* ---------- carousel ---------- */
.m-hero { padding-top: 26px; }
.m-carousel { position: relative; overflow: hidden; border-radius: 22px; aspect-ratio: 900 / 350; background: #172132; box-shadow: var(--m-shadow); }
.m-slides, .m-slide { position: absolute; inset: 0; }
.m-slide { display: block; opacity: 0; visibility: hidden; transition: opacity .55s ease, visibility .55s; }
.m-slide.is-active { opacity: 1; visibility: visible; z-index: 2; }
.m-slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.015); transition: transform 7s ease; }
.m-slide.is-active img { transform: scale(1); }
.m-slide-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 16, 28, .04) 28%, rgba(8, 16, 28, .76) 100%); }
.m-slide-copy { position: absolute; left: clamp(24px, 4vw, 48px); right: 24%; bottom: clamp(24px, 4vw, 42px); color: #fff; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.m-slide-label { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; letter-spacing: 2px; font-weight: 600; color: #fff; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .18); padding: 4px 10px; border-radius: 999px; backdrop-filter: blur(4px); }
.m-slide-copy strong { font-size: clamp(22px, 3.2vw, 36px); line-height: 1.35; font-weight: 650; letter-spacing: .4px; text-shadow: 0 2px 24px rgba(0, 0, 0, .25); }
.m-slide-copy em { font-style: normal; font-size: 13px; line-height: 1.8; color: rgba(255, 255, 255, .78); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 660px; }
.m-car-arrow { position: absolute; top: 50%; z-index: 4; width: 40px; height: 40px; margin-top: -20px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%; background: rgba(9, 18, 30, .32); color: #fff; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(8px); transition: background .2s, border-color .2s; }
.m-car-arrow:hover { background: rgba(9, 18, 30, .58); border-color: rgba(255, 255, 255, .45); }
.m-car-prev { left: 18px; }
.m-car-next { right: 18px; }
.m-car-dots { position: absolute; right: 26px; bottom: 24px; z-index: 4; display: flex; gap: 7px; }
.m-car-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .42); cursor: pointer; transition: width .25s, background .25s; }
.m-car-dots button.is-active { width: 22px; background: #fff; }
.m-hero-empty { min-height: 300px; border-radius: 22px; background: linear-gradient(135deg, #19304f, #2f6fed 52%, #56b6a6); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; }
.m-hero-empty h1 { margin: 0; font-family: var(--m-serif); font-size: clamp(30px, 4vw, 48px); letter-spacing: 2px; }
.m-hero-empty p { margin: 0; color: rgba(255, 255, 255, .78); }

/* ---------- layout / feed ---------- */
.m-layout { display: grid; grid-template-columns: minmax(0, 1fr) 318px; gap: 26px; padding-top: 34px; align-items: start; }
.m-feed { min-width: 0; }
.m-section-kicker { display: block; color: var(--m-accent); font-size: 10px; letter-spacing: 2.4px; font-weight: 700; margin-bottom: 4px; }
.m-feed-list { display: flex; flex-direction: column; gap: 18px; }
.m-card { background: var(--m-card); border: 1px solid var(--m-line); border-radius: var(--m-radius); overflow: hidden; box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset; transition: transform .25s, border-color .25s, box-shadow .25s; }
.m-card:hover { transform: translateY(-2px); border-color: var(--m-line-strong); box-shadow: var(--m-shadow); }
.m-card-author { display: flex; align-items: center; gap: 9px; padding: 15px 22px 12px; }
.m-card-avatar { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; background: var(--m-accent-soft); color: var(--m-accent); display: grid; place-items: center; font-size: 12px; font-weight: 700; overflow: hidden; }
.m-card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.m-card-author-copy { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.m-card-author-copy b { font-size: 11.5px; font-weight: 600; color: var(--m-soft); white-space: nowrap; }
.m-card-author-copy em { font-style: normal; font-size: 10px; color: var(--m-muted); }
.m-card-category { margin-left: auto; font-size: 10px; color: var(--m-accent); background: var(--m-accent-soft); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.m-card-category:hover { color: #fff; background: var(--m-accent); }
.m-card-cover { display: block; aspect-ratio: 2.5 / 1; overflow: hidden; background: #dfe7f2; position: relative; }
.m-card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.m-card:hover .m-card-cover img { transform: scale(1.035); }
.m-lock { position: absolute; top: 13px; right: 13px; color: #fff; background: rgba(12, 20, 32, .6); padding: 4px 9px; border-radius: 999px; font-size: 10px; letter-spacing: 1px; backdrop-filter: blur(5px); }
.m-card-body { padding: 20px 22px 18px; }
.m-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--m-muted); font-size: 11.5px; }
.m-card-meta a { color: var(--m-accent); }
.m-card-title { margin: 9px 0 8px; font-size: clamp(20px, 2.2vw, 25px); line-height: 1.45; font-weight: 650; letter-spacing: .2px; }
.m-card-title a { color: var(--m-text); }
.m-card-title a:hover { color: var(--m-accent); }
.m-card-excerpt { margin: 0 0 12px; color: var(--m-soft); font-size: 13px; line-height: 1.9; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.m-moment-card { cursor: default; }
.m-moment-card:hover { transform: none; border-color: var(--m-line); box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset; }
.m-moment-cover { cursor: default; }
.m-moment-card:hover .m-card-cover img { transform: none; }
.m-moment-body { padding-top: 18px; }
.m-moment-text { margin: 0; color: var(--m-text); font-size: clamp(20px, 2.2vw, 25px); line-height: 1.45; font-weight: 650; letter-spacing: .2px; word-break: break-word; }
.m-moment-foot { margin-top: 14px; }
.m-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.m-card-tags a { font-size: 10.5px; color: var(--m-soft); background: var(--m-bg); border: 1px solid var(--m-line); border-radius: 999px; padding: 3px 9px; }
.m-card-tags a:hover { color: var(--m-accent); border-color: var(--m-accent); }
.m-card-foot { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--m-line); color: var(--m-muted); font-size: 11px; }
.m-card-foot a { color: var(--m-muted); }
.m-card-foot a:hover { color: var(--m-accent); }
.m-read { margin-left: auto; color: var(--m-accent) !important; font-weight: 600; }
.m-read span { display: inline-block; transition: transform .2s; }
.m-read:hover span { transform: translateX(3px); }

/* ---------- sidebar ---------- */
.m-sidebar { position: sticky; top: 94px; align-self: start; display: flex; flex-direction: column; gap: 16px; }
.m-widget { background: var(--m-card); border: 1px solid var(--m-line); border-radius: var(--m-radius); padding: 20px; }
.m-profile { padding: 27px 20px 20px; text-align: center; }
.m-profile-avatar { width: 78px; height: 78px; margin: 0 auto 13px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: linear-gradient(145deg, var(--m-accent-soft), var(--m-bg)); border: 4px solid var(--m-card); box-shadow: 0 8px 24px -13px rgba(23, 38, 65, .4); }
.m-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.m-profile-avatar span { font-family: var(--m-serif); font-size: 29px; color: var(--m-accent); }
.m-profile-avatar .m-brand-mark { width: 46px; height: 46px; }
.m-profile-name { margin: 0 0 7px; font-family: var(--m-serif); font-size: 21px; font-weight: 600; letter-spacing: .3px; }
.m-profile-bio { max-width: 236px; margin: 0 auto 17px; color: var(--m-muted); font-size: 12px; line-height: 1.8; }
.m-profile-stats { display: flex; align-items: center; justify-content: center; gap: 22px; padding-top: 14px; border-top: 1px solid var(--m-line); }
.m-profile-stats a, .m-profile-stat { display: inline-flex; align-items: center; gap: 5px; color: var(--m-muted); font-size: 11px; }
.m-profile-stats a:hover { color: var(--m-accent); }
.m-profile-stats svg { flex: 0 0 auto; }
.m-profile-stats b { color: var(--m-text); font-size: 12.5px; font-weight: 600; margin-left: 1px; }
.m-widget-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.m-widget-head h3 { margin: 0; font-size: 15px; font-weight: 650; }
.m-widget-head span { font-size: 9px; letter-spacing: 1.4px; color: var(--m-muted); }
.m-hot-list { display: flex; flex-direction: column; gap: 11px; }
.m-hot-item { display: grid; grid-template-columns: 18px 56px minmax(0, 1fr); align-items: center; gap: 9px; color: var(--m-text); }
.m-hot-num { font-family: var(--m-serif); color: var(--m-muted); font-size: 11px; }
.m-hot-item img { width: 56px; height: 45px; border-radius: 8px; object-fit: cover; }
.m-hot-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.m-hot-copy b { font-size: 12px; font-weight: 500; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.m-hot-copy em { color: var(--m-muted); font-style: normal; font-size: 10px; }
.m-cat-list { display: flex; flex-direction: column; }
.m-cat-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--m-line); color: var(--m-soft); font-size: 13px; transition: color .18s, padding-left .18s; }
.m-cat-list a:last-child { border-bottom: 0; padding-bottom: 0; }
.m-cat-list a:hover { color: var(--m-accent); padding-left: 3px; }
.m-cat-list em { color: var(--m-muted); font-family: var(--m-sans); font-size: 10.5px; font-style: normal; }
.m-tag-cloud { display: flex; flex-wrap: wrap; gap: 7px; }
.m-tag-cloud a { display: inline-flex; align-items: center; gap: 5px; background: var(--m-bg); border: 1px solid var(--m-line); border-radius: 999px; padding: 5px 10px; font-size: 11px; color: var(--m-soft); }
.m-tag-cloud a:hover { color: var(--m-accent); border-color: var(--m-accent); }
.m-tag-cloud em { font-style: normal; font-size: 9px; color: var(--m-muted); }
.m-comment-list { display: flex; flex-direction: column; gap: 12px; }
.m-comment-item { display: flex; gap: 9px; align-items: flex-start; }
.m-initial { flex: 0 0 28px; width: 28px; height: 28px; display: grid; place-items: center; background: var(--m-accent-soft); color: var(--m-accent); border-radius: 50%; font-size: 12px; font-weight: 700; }
.m-comment-item > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.m-comment-item b { font-size: 11px; color: var(--m-soft); font-weight: 600; }
.m-comment-item em { color: var(--m-muted); font-style: normal; font-size: 10.5px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- empty / archive / pager ---------- */
.m-empty { background: var(--m-card); border: 1px solid var(--m-line); border-radius: var(--m-radius); padding: 52px 24px; text-align: center; }
.m-empty strong { display: block; font-family: var(--m-serif); font-size: 23px; margin-bottom: 7px; }
.m-empty p { margin: 0 0 18px; color: var(--m-muted); font-size: 13px; }
.m-btn { display: inline-flex; align-items: center; justify-content: center; background: var(--m-accent); color: #fff !important; border-radius: 9px; padding: 10px 18px; font-size: 13px; font-weight: 600; border: 0; cursor: pointer; }
.m-btn:hover { filter: brightness(.94); }
.m-archive-head { padding: 48px 0 14px; }
.m-archive-head h1 { margin: 0 0 6px; font-family: var(--m-serif); font-size: clamp(28px, 4vw, 42px); letter-spacing: 1px; }
.m-archive-head p { margin: 0; color: var(--m-muted); font-size: 13px; }
.m-inline-search { display: flex; gap: 8px; margin-top: 20px; max-width: 520px; }
.m-inline-search input { flex: 1; border: 1px solid var(--m-line); border-radius: 9px; background: var(--m-card); padding: 11px 13px; color: var(--m-text); outline: none; }
.m-inline-search button { border: 0; border-radius: 9px; background: var(--m-accent); color: #fff; padding: 0 18px; cursor: pointer; }
.m-timeline { display: flex; flex-direction: column; gap: 26px; }
.m-year h2 { display: flex; align-items: baseline; gap: 12px; margin: 0 0 8px; font-family: var(--m-serif); font-size: 27px; }
.m-year h2 span { font-family: var(--m-sans); font-size: 10px; color: var(--m-muted); font-weight: 400; letter-spacing: 1px; }
.m-timeline-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) 18px; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--m-line); align-items: center; color: var(--m-soft); }
.m-timeline-row time { color: var(--m-muted); font-size: 11px; }
.m-timeline-row i { font-style: normal; color: var(--m-muted); text-align: right; transition: transform .2s; }
.m-timeline-row:hover { color: var(--m-accent); }
.m-timeline-row:hover i { transform: translateX(3px); }
.m-feed-end { margin: 28px auto 0; padding: 0; display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.m-has-feed-end .m-main { padding-bottom: 0; }
.m-has-feed-end .m-footer { padding-top: 42px; }
.m-feed-end-label { color: var(--m-muted); font-size: 12px; letter-spacing: .3px; }
.m-feed-end-top { color: var(--m-accent); font-size: 12px; }
.m-feed-end .m-pager { margin: 0; }
.m-pager { display: flex; align-items: center; justify-content: center; gap: 6px; }
.m-pager a, .m-pager span { min-width: 31px; height: 31px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 8px; font-size: 12px; color: var(--m-soft); background: var(--m-card); border: 1px solid var(--m-line); }
.m-pager a:hover, .m-pager .is-current { background: var(--m-accent); border-color: var(--m-accent); color: #fff; }
.m-pager .is-disabled { opacity: .4; }
.m-pager-gap { border: 0 !important; background: transparent !important; }

/* ---------- article / prose ---------- */
.m-layout-post { align-items: start; }
.m-article { background: var(--m-card); border: 1px solid var(--m-line); border-radius: var(--m-radius); padding: clamp(22px, 4vw, 48px); min-width: 0; }
.m-article-page { max-width: 900px; margin: 0 auto; }
.m-page { padding-top: 34px; }
.m-article-head { margin-bottom: 24px; }
.m-article-head h1 { margin: 10px 0 12px; font-family: var(--m-serif); font-size: clamp(30px, 4.4vw, 46px); line-height: 1.3; letter-spacing: .6px; }
.m-moment-head { margin-bottom: 18px; padding-bottom: 15px; border-bottom: 1px solid var(--m-line); }
.m-moment-head .m-card-meta { font-size: 11.5px; }
.m-article-moment .m-prose { margin-top: 0; }
.m-article-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--m-muted); font-size: 11.5px; }
.m-article-meta a { color: var(--m-muted); }
.m-article-cover { margin: 0 0 28px; border-radius: 13px; overflow: hidden; background: var(--m-bg); }
.m-article-cover img { display: block; width: 100%; max-height: 560px; object-fit: cover; }
.m-notice { background: var(--m-accent-soft); color: var(--m-accent); padding: 10px 13px; border-radius: 8px; font-size: 12px; margin-bottom: 18px; }
.m-prose { color: var(--m-text); font-size: 16px; line-height: 1.95; overflow-wrap: anywhere; }
.m-prose > *:first-child { margin-top: 0; }
.m-prose p { margin: 0 0 1.15em; }
.m-prose h1, .m-prose h2, .m-prose h3, .m-prose h4 { font-family: var(--m-serif); line-height: 1.45; margin: 1.45em 0 .6em; letter-spacing: .3px; }
.m-prose h1 { font-size: 1.7em; }
.m-prose h2 { font-size: 1.45em; padding-left: 12px; border-left: 3px solid var(--m-accent); }
.m-prose h3 { font-size: 1.22em; }
.m-prose h4 { font-size: 1.08em; }
.m-prose a { color: var(--m-accent); text-decoration: underline; text-underline-offset: 3px; }
.m-prose strong { font-weight: 650; }
.m-prose blockquote { margin: 1.4em 0; padding: 15px 20px; border-left: 3px solid var(--m-accent); background: var(--m-accent-soft); border-radius: 0 8px 8px 0; color: var(--m-soft); }
.m-prose blockquote p:last-child { margin-bottom: 0; }
.m-prose ul, .m-prose ol { padding-left: 1.4em; margin: .9em 0 1.2em; }
.m-prose li { margin: .3em 0; }
.m-prose code { background: var(--m-bg); border: 1px solid var(--m-line); border-radius: 4px; padding: 2px 5px; font-size: .88em; font-family: "SFMono-Regular", Consolas, monospace; }
.m-prose pre { background: #151c26; color: #dbe7f5; border-radius: 10px; padding: 16px 18px; overflow: auto; line-height: 1.65; font-size: 13px; }
.m-prose pre code { background: none; border: 0; color: inherit; padding: 0; }
.m-prose img { border-radius: 10px; display: block; margin: 1.2em auto; }
.m-prose hr { border: 0; border-top: 1px solid var(--m-line); margin: 2em 0; }
.m-prose table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 1.2em 0; }
.m-prose th, .m-prose td { border: 1px solid var(--m-line); padding: 8px 10px; text-align: left; }
.m-prose th { background: var(--m-bg); }
.m-prose audio, .m-prose video { max-width: 100%; width: 100%; }
.m-prose figure { margin: 1.3em 0; }
.m-prose figcaption { text-align: center; color: var(--m-muted); font-size: 11.5px; margin-top: 7px; }
.m-article-foot { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--m-line); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.m-end-mark { display: inline-grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: var(--m-bg); border: 1px solid var(--m-line); color: var(--m-muted); font-size: 11px; margin-left: auto; }
.m-adjacent { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.m-adjacent a, .m-adjacent-empty { display: flex; flex-direction: column; gap: 4px; padding: 13px 14px; border: 1px solid var(--m-line); border-radius: 10px; background: var(--m-bg); min-width: 0; }
.m-adjacent a span, .m-adjacent-empty { color: var(--m-muted); font-size: 10px; }
.m-adjacent a b { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-adjacent .is-next { text-align: right; align-items: flex-end; }
.m-adjacent-empty { display: flex; justify-content: center; color: var(--m-muted); font-size: 11px; min-height: 62px; }
.m-locked-box { background: var(--m-bg); border: 1px dashed var(--m-line-strong); border-radius: 13px; padding: 34px 22px; text-align: center; }
.m-lock-big { display: inline-block; color: var(--m-accent); font-size: 10px; letter-spacing: 3px; font-weight: 700; margin-bottom: 8px; }
.m-locked-box h2 { margin: 0 0 7px; font-family: var(--m-serif); font-size: 24px; }
.m-locked-box p { margin: 0 0 16px; color: var(--m-muted); font-size: 12.5px; }
.m-locked-box form { display: flex; gap: 8px; max-width: 360px; margin: 0 auto; }
.m-locked-box input { flex: 1; min-width: 0; border: 1px solid var(--m-line); border-radius: 8px; padding: 10px 12px; background: var(--m-card); color: var(--m-text); outline: none; }
.m-locked-box button { border: 0; border-radius: 8px; background: var(--m-accent); color: #fff; padding: 0 16px; cursor: pointer; }
.m-form-error { color: #d95757 !important; font-size: 12px; }
.m-404 { text-align: center; padding: 110px 24px 80px; }
.m-404 > span { color: var(--m-accent); font-family: var(--m-serif); font-size: clamp(70px, 15vw, 150px); line-height: 1; letter-spacing: 8px; opacity: .2; }
.m-404 h1 { margin: -22px 0 8px; font-family: var(--m-serif); font-size: 32px; }
.m-404 p { margin: 0 0 20px; color: var(--m-muted); }

/* ---------- account ---------- */
.m-account-wrap { position: relative; isolation: isolate; padding: clamp(48px, 7vw, 76px) 0; }
.m-account-wrap::before, .m-account-wrap::after { content: ""; position: absolute; z-index: -1; width: 520px; height: 520px; border-radius: 50%; pointer-events: none; }
.m-account-wrap::before { top: -150px; left: 4%; background: radial-gradient(circle, rgba(47, 111, 237, .11), transparent 68%); }
.m-account-wrap::after { right: 2%; bottom: -190px; background: radial-gradient(circle, rgba(83, 194, 174, .09), transparent 68%); }
.m-account-card { position: relative; width: min(470px, 100%); margin: 0 auto; background: var(--m-card); border: 1px solid var(--m-line); border-radius: 20px; padding: 38px 36px 32px; box-shadow: 0 30px 80px -42px rgba(23, 38, 65, .35); overflow: hidden; }
.m-account-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--m-accent), #76d3c7 72%, transparent); opacity: .8; }
.m-account-home { position: absolute; top: 14px; right: 17px; z-index: 2; color: var(--m-muted); font-size: 10.5px; letter-spacing: .3px; }
.m-account-home:hover { color: var(--m-accent); }
.m-account-badge { display: grid; place-items: center; width: 58px; height: 58px; flex: 0 0 58px; margin: 0 auto 17px; padding: 10px; background: var(--m-bg); border: 1px solid var(--m-line); border-radius: 17px; }
.m-account-badge img, .m-account-badge svg { width: 100% !important; height: 100% !important; object-fit: contain; }
.m-account-card .m-section-kicker { text-align: center; margin-bottom: 7px; }
.m-account-card h1 { margin: 0 0 5px; font-family: var(--m-serif); font-size: 31px; text-align: center; }
.m-account-card > p { margin: 0 0 22px; color: var(--m-muted); font-size: 12.5px; text-align: center; }
.m-account-card .m-field { margin-bottom: 14px; }
.m-account-card .m-field input { background: var(--m-bg); }
.m-field input:-webkit-autofill,
.m-field input:-webkit-autofill:hover,
.m-field input:-webkit-autofill:focus { -webkit-text-fill-color: var(--m-text); -webkit-box-shadow: 0 0 0 1000px var(--m-bg) inset; transition: background-color 9999s ease-out; }
.m-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 13px; }
.m-field span { color: var(--m-soft); font-size: 11.5px; }
.m-field input { border: 1px solid var(--m-line); background: var(--m-bg); color: var(--m-text); border-radius: 8px; padding: 10px 12px; outline: none; }
.m-field input:focus { border-color: var(--m-accent); box-shadow: 0 0 0 3px var(--m-accent-soft); }
.m-btn-block { width: 100%; margin-top: 4px; }
.m-account-alt { text-align: center; color: var(--m-muted); font-size: 12px; margin: 16px 0 0 !important; }
.m-account-alt a { color: var(--m-accent); }

/* ---------- member dashboard ---------- */
.m-member { padding: 34px 0 10px; }
.m-member-hero { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; padding: 24px 28px; background: linear-gradient(135deg, var(--m-card), var(--m-bg)); border: 1px solid var(--m-line); border-radius: 20px; box-shadow: var(--m-shadow); }
.m-member-id { display: flex; align-items: center; gap: 15px; min-width: 0; }
.m-member-avatar { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 19px; display: grid; place-items: center; background: var(--m-accent-soft); color: var(--m-accent); font-family: var(--m-serif); font-size: 26px; overflow: hidden; border: 1px solid var(--m-line); }
.m-member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.m-member-copy { min-width: 0; }
.m-member-copy .m-section-kicker { margin-bottom: 2px; }
.m-member-copy h1 { margin: 0; font-family: var(--m-serif); font-size: clamp(23px, 2.5vw, 30px); line-height: 1.3; }
.m-member-copy p { margin: 3px 0 0; color: var(--m-muted); font-size: 11.5px; display: flex; align-items: center; gap: 7px; }
.m-member-copy .m-member-bio { display: block; max-width: 420px; margin-top: 5px; line-height: 1.7; }
.m-member-stats { display: flex; align-items: center; gap: 22px; margin-left: 10px; }
.m-member-stats > div { display: flex; flex-direction: column; gap: 1px; min-width: 45px; }
.m-member-stats b { font-family: var(--m-serif); font-size: 23px; font-weight: 600; line-height: 1.2; }
.m-member-stats span { color: var(--m-muted); font-size: 10px; letter-spacing: 1px; }
.m-member-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.m-btn-soft { background: var(--m-accent-soft); color: var(--m-accent) !important; }
.m-btn-soft:hover { background: var(--m-accent); color: #fff !important; }
.m-btn-soft:disabled { opacity: .6; cursor: default; background: var(--m-accent-soft); color: var(--m-accent) !important; }
.m-btn-ghost { background: transparent; color: var(--m-soft) !important; border: 1px solid var(--m-line); }
.m-btn-ghost:hover { border-color: var(--m-accent); color: var(--m-accent) !important; }
.m-member-form { margin-top: 20px; }
.m-member-grid { display: grid; grid-template-columns: minmax(0, 1fr) 322px; gap: 20px; align-items: stretch; }
.m-member-main { min-width: 0; display: flex; flex-direction: column; }
.m-member-main > .m-panel { flex: 1 1 auto; display: flex; flex-direction: column; }
.m-member-main .m-editor { flex: 1 1 auto; display: flex; flex-direction: column; }
.m-member-main .m-editor-area { flex: 1 1 auto; display: flex; flex-direction: column; }
.m-member-main .m-editor-area textarea { flex: 1 1 auto; }
.m-editor-heading { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.m-panel-sub { color: var(--m-muted); font-size: 10.5px; font-weight: 400; letter-spacing: 0; }
.m-panel { background: var(--m-card); border: 1px solid var(--m-line); border-radius: 18px; overflow: hidden; }
.m-panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; padding: 18px 22px 14px; border-bottom: 1px solid var(--m-line); }
.m-panel-head h2, .m-panel-head h3 { margin: 0; font-family: var(--m-serif); font-size: 20px; line-height: 1.35; }
.m-panel-head h3 { font-size: 15px; }
.m-panel-head .m-section-kicker { margin-bottom: 3px; }
.m-panel-note { color: var(--m-muted); font-size: 10px; letter-spacing: .7px; white-space: nowrap; }
.m-editor { padding: 20px 22px 18px; }
.m-editor-title { width: 100%; border: 0; border-bottom: 1px solid var(--m-line); background: transparent; color: var(--m-text); font-family: var(--m-serif); font-size: clamp(22px, 2.5vw, 28px); line-height: 1.45; padding: 2px 0 11px; outline: none; }
.m-editor-title::placeholder { color: var(--m-muted); }
.m-editor-title:focus { border-bottom-color: var(--m-accent); }
.m-editor-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; margin: 12px 0 9px; padding: 5px; background: var(--m-bg); border: 1px solid var(--m-line); border-radius: 9px; }
.m-editor-toolbar button { min-width: 28px; height: 27px; border: 0; border-radius: 5px; background: transparent; color: var(--m-soft); font-size: 12px; cursor: pointer; padding: 0 7px; }
.m-editor-toolbar button:hover { background: var(--m-card); color: var(--m-accent); }
.m-editor-toolbar .m-preview-btn { margin-left: auto; border: 1px solid var(--m-line); background: var(--m-card); font-size: 11px; padding: 0 11px; }
.m-editor-toolbar .m-preview-btn.is-on { background: var(--m-accent); border-color: var(--m-accent); color: #fff; }
.m-tool-sep { width: 1px; height: 17px; background: var(--m-line-strong); margin: 0 3px; }
.m-editor-area { border: 1px solid var(--m-line); border-radius: 10px; overflow: hidden; background: var(--m-card); }
.m-editor-area textarea { display: block; width: 100%; min-height: 360px; border: 0; outline: none; resize: vertical; padding: 16px 17px; background: transparent; color: var(--m-text); font-family: var(--m-sans); font-size: 14px; line-height: 1.9; }
.m-editor-preview { min-height: 360px; padding: 16px 19px; overflow-wrap: anywhere; }
.m-editor-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 9px; color: var(--m-muted); font-size: 10.5px; }
.m-editor-foot b { color: var(--m-soft); font-weight: 600; }
.m-member-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 98px; }
.m-side-box .m-panel-head { padding: 14px 17px 11px; }
.m-side-body { padding: 14px 17px 16px; }
.m-side-box .m-field { margin-bottom: 11px; }
.m-side-box .m-field:last-child { margin-bottom: 0; }
.m-field select, .m-side-textarea { width: 100%; border: 1px solid var(--m-line); background: var(--m-bg); color: var(--m-text); border-radius: 8px; padding: 9px 11px; outline: none; font-size: 12.5px; }
.m-field select:focus, .m-side-textarea:focus { border-color: var(--m-accent); }
.m-side-textarea { resize: vertical; min-height: 84px; line-height: 1.7; }
.m-cover-preview { width: 100%; aspect-ratio: 16 / 9; border: 1px dashed var(--m-line-strong); border-radius: 9px; background: var(--m-bg); display: grid; place-items: center; overflow: hidden; color: var(--m-muted); font-size: 11px; }
.m-cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.m-cover-preview.is-empty { background: repeating-linear-gradient(-45deg, var(--m-bg), var(--m-bg) 7px, var(--m-card) 7px, var(--m-card) 14px); }
.m-cover-actions { display: flex; align-items: center; gap: 7px; margin-top: 8px; }
.m-upload, .m-cover-actions button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--m-line); background: var(--m-card); border-radius: 7px; padding: 6px 10px; color: var(--m-soft); font-size: 11px; cursor: pointer; }
.m-upload:hover, .m-cover-actions button:hover { border-color: var(--m-accent); color: var(--m-accent); }
.m-music-upload { margin-bottom: 10px; }
.m-side-hint { margin: 8px 0 0; color: var(--m-muted); font-size: 10px; line-height: 1.7; }
.m-inline-check { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--m-muted); cursor: pointer; }
.m-inline-check input { width: auto; margin: 0; accent-color: var(--m-accent); }
.m-check { display: flex; align-items: center; gap: 6px; margin-top: 9px; color: var(--m-muted); font-size: 11px; cursor: pointer; }
.m-cover-actions { flex-wrap: wrap; }
.m-cover-actions .m-check { margin-top: 0; }
.m-check input { width: auto; margin: 0; accent-color: var(--m-accent); }
.m-submit-box { padding: 3px 1px 0; }
.m-submit-box .m-btn + .m-btn { margin-top: 8px; }
.m-member-posts { margin-top: 20px; }
.m-member-empty { padding: 28px 22px; color: var(--m-muted); font-size: 12.5px; }
.m-post-list { padding: 4px 20px 8px; }
.m-my-post { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 15px; padding: 12px 2px; border-bottom: 1px solid var(--m-line); }
.m-my-post:last-child { border-bottom: 0; }
.m-my-post-link { min-width: 0; display: flex; flex-direction: column; gap: 3px; color: inherit; text-decoration: none; }
.m-my-actions { display: flex; align-items: center; gap: 10px; }
.m-my-edit { color: var(--m-accent); font-size: 10.5px; text-decoration: none; }
.m-my-edit:hover { text-decoration: underline; }
.m-my-post-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--m-text); }
.m-my-post:hover .m-my-post-title { color: var(--m-accent); }
.m-my-post-meta { color: var(--m-muted); font-size: 10.5px; white-space: nowrap; }
.m-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 8px; font-size: 9.5px; white-space: nowrap; }
.m-badge.is-published { color: #2f7a58; background: rgba(47, 122, 88, .1); }
.m-badge.is-pending { color: #9a6b25; background: rgba(154, 107, 37, .1); }
.m-badge.is-draft { color: var(--m-muted); background: var(--m-bg); border: 1px solid var(--m-line); }

/* ---------- ink fallback: comments ---------- */
.comments { margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--m-line); }
.comments-title { margin: 0 0 18px; font-family: var(--m-serif); font-size: 22px; }
.comments-title span { color: var(--m-muted); font-family: var(--m-sans); font-size: 11px; margin-left: 5px; }
.comment-list, .comment-children { list-style: none; padding: 0; margin: 0; }
.comment { display: flex; gap: 11px; padding: 15px 0; border-bottom: 1px solid var(--m-line); }
.comment-children { margin-top: 12px; padding-left: 13px; border-left: 2px solid var(--m-line); }
.comment-avatar { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--m-accent-soft); color: var(--m-accent); font-weight: 700; font-size: 13px; }
.comment-body { min-width: 0; flex: 1; }
.comment-head { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.comment-head b { font-size: 12.5px; }
.comment-head time { color: var(--m-muted); font-size: 10.5px; }
.comment-text { margin: 5px 0; color: var(--m-soft); font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.comment-actions { display: flex; align-items: center; gap: 12px; }
.comment-like { border: 0; background: transparent; color: var(--m-muted); font-size: 11px; cursor: pointer; padding: 0; display: inline-flex; gap: 4px; }
.comment-like.is-liked { color: #d85b68; }
.comment-reply { color: var(--m-muted); font-size: 11px; }
.comment-reply:hover { color: var(--m-accent); }
.comment-reply-to { color: var(--m-muted); font-size: 11px; }
.comments-none, .comments-closed { color: var(--m-muted); font-size: 12px; }
.comment-form { margin-top: 20px; }
.cf-reply { background: var(--m-accent-soft); color: var(--m-soft); border-radius: 7px; padding: 7px 10px; font-size: 11px; margin-bottom: 9px; }
.cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.comment-form input, .comment-form textarea { width: 100%; border: 1px solid var(--m-line); background: var(--m-bg); color: var(--m-text); border-radius: 8px; padding: 9px 11px; outline: none; font-size: 12.5px; }
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--m-accent); }
.cf-url { margin-top: 8px; }
.cf-editor { margin-top: 8px; position: relative; }
.cf-editor textarea { resize: vertical; min-height: 110px; }
.cf-emoji { display: flex; justify-content: flex-end; margin-top: 5px; }
.emoji-toggle { border: 1px solid var(--m-line); background: var(--m-card); border-radius: 6px; padding: 4px 8px; color: var(--m-muted); font-size: 11px; cursor: pointer; }
.emoji-panel { position: absolute; right: 0; bottom: 33px; z-index: 5; width: 245px; max-height: 170px; overflow: auto; background: var(--m-card); border: 1px solid var(--m-line); border-radius: 9px; padding: 8px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; box-shadow: var(--m-shadow); }
.emoji-item { border: 0; background: transparent; font-size: 17px; padding: 4px; cursor: pointer; }
.cf-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; color: var(--m-muted); font-size: 10.5px; }
.cf-foot button { border: 0; background: var(--m-accent); color: #fff; border-radius: 7px; padding: 8px 16px; cursor: pointer; }
.hp { position: absolute; left: -9999px; opacity: 0; }

/* ---------- ink fallback: share ---------- */
.share-box { margin-top: 26px; border-top: 1px solid var(--m-line); padding-top: 18px; position: relative; }
.share-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.share-label { color: var(--m-muted); font-size: 11px; }
.share-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.share-btn { border: 1px solid var(--m-line); background: var(--m-bg); color: var(--m-soft); border-radius: 999px; padding: 5px 12px; font-size: 11px; cursor: pointer; display: inline-block; }
.share-btn:hover, .share-btn.is-primary { border-color: var(--m-accent); color: var(--m-accent); }
.share-tip { color: var(--m-muted); font-size: 10.5px; }
.share-qr-pop { margin-top: 12px; display: flex; align-items: flex-start; gap: 10px; }
.share-qr-img { width: 130px; height: 130px; border-radius: 8px; background: #fff; }
.share-qr-save { color: var(--m-muted); font-size: 10.5px; }
.share-modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; }
.share-modal-mask { position: absolute; inset: 0; background: rgba(10, 18, 30, .55); }
.share-modal-card { position: relative; z-index: 1; background: var(--m-card); border-radius: 12px; padding: 22px; max-width: min(520px, 92vw); max-height: 90vh; overflow: auto; }
.share-modal-close { position: absolute; right: 9px; top: 7px; border: 0; background: transparent; font-size: 22px; color: var(--m-muted); cursor: pointer; }
.share-modal-img { max-width: 100%; display: block; margin: 8px auto; }
.share-modal-loading { color: var(--m-muted); font-size: 12px; text-align: center; }

/* ---------- footer ---------- */
.m-footer { border-top: 0; background: linear-gradient(180deg, var(--m-bg), var(--m-card) 34%); padding: 44px 0 28px; }
.m-footer .m-container { text-align: center; }
.m-footer-note { max-width: 760px; margin: 0 auto 24px; padding: 19px 26px; background: var(--m-bg); border: 1px solid var(--m-line); border-radius: 13px; color: var(--m-soft); font-family: var(--m-serif); font-size: 16px; line-height: 1.9; }
.m-footer-note > :first-child { margin-top: 0; }
.m-footer-note > :last-child { margin-bottom: 0; }
.m-footer-note p { margin: 0 0 5px; }
.m-footer-note strong { color: var(--m-text); font-weight: 650; }
.m-footer-note a { color: var(--m-accent); text-decoration: underline; text-underline-offset: 2px; }
.m-footer-note code { padding: 1px 5px; border: 1px solid var(--m-line); border-radius: 4px; font-size: .9em; }
.m-footer-note img { max-height: 46px; width: auto; vertical-align: middle; }
.m-footer-note ul, .m-footer-note ol { display: inline-block; margin: 0 0 5px; padding-left: 1.3em; text-align: left; }
.m-footer-note h1, .m-footer-note h2, .m-footer-note h3, .m-footer-note h4 { margin: 0 0 5px; font-size: 14px; }
.m-footer-note blockquote { margin: 0; padding-left: 11px; border-left: 2px solid var(--m-line-strong); }
.m-footer-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px; padding: 15px 0 18px; border-top: 1px solid var(--m-line); border-bottom: 1px solid var(--m-line); }
.m-footer-links > span { color: var(--m-muted); font-size: 10px; letter-spacing: 1.5px; }
.m-footer-links a { color: var(--m-muted); font-size: 11px; }
.m-footer-links a:hover { color: var(--m-accent); }
.m-footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; padding-top: 18px; color: var(--m-muted); font-size: 12px; }
.m-footer-bottom a { color: var(--m-muted); }
.m-footer-bottom a:hover { color: var(--m-accent); }
.m-to-top { position: fixed; right: 22px; bottom: 24px; z-index: 40; width: 37px; height: 37px; border-radius: 50%; border: 1px solid var(--m-line); background: var(--m-card); color: var(--m-soft); display: grid; place-items: center; cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(8px); transition: .25s; box-shadow: 0 8px 25px -14px rgba(0, 0, 0, .35); }
.m-to-top.is-show { opacity: 1; visibility: visible; transform: translateY(0); }
.m-to-top:hover { color: var(--m-accent); border-color: var(--m-accent); }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
    .m-nav { display: none; }
    .m-menu-open { display: inline-block; }
}
@media (max-width: 980px) {
    .m-nav { display: none; }
    .m-menu-open { display: inline-block; }
    .m-header-inner { gap: 13px; min-height: 66px; }
    .m-layout { grid-template-columns: 1fr; }
    .m-archive-desc-row.has-count { width: 100%; }
    .m-sidebar { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .m-profile { grid-column: 1 / -1; }
    .m-member-grid { grid-template-columns: 1fr; }
    .m-member-side { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .m-submit-box { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
    .m-container { width: calc(100% - 32px); }
    .m-user-center, .m-logout-btn { display: none; }
    .m-brand-text i { display: block; font-size: 9px; }
    .m-brand-text b { font-size: 17px; }
    .m-brand-mark { width: 30px; height: 30px; flex-basis: 30px; }
    .m-brand-logo { height: 28px; max-width: 120px; }
    .m-hero { padding-top: 16px; }
    .m-carousel { border-radius: 15px; aspect-ratio: 4 / 3; }
    .m-slide-copy { left: 22px; right: 22px; bottom: 22px; }
    .m-slide-copy strong { font-size: 24px; }
    .m-slide-copy em { font-size: 11px; }
    .m-car-arrow { display: none; }
    .m-car-dots { right: 50%; transform: translateX(50%); bottom: 14px; }
    .m-layout { padding-top: 23px; gap: 18px; }
    .m-card-author { padding: 13px 16px 10px; }
    .m-card-cover { aspect-ratio: 2.2 / 1; }
    .m-card-body { padding: 16px 16px 14px; }
    .m-card-title, .m-moment-text { font-size: 20px; }
    .m-card-excerpt { font-size: 12.5px; }
    .m-sidebar { grid-template-columns: 1fr; }
    .m-article { padding: 20px 17px 24px; border-radius: 14px; }
    .m-article-head h1 { font-size: 29px; }
    .m-prose { font-size: 15px; }
    .m-adjacent { grid-template-columns: 1fr; }
    .m-adjacent .is-next { text-align: left; align-items: flex-start; }
    .cf-row { grid-template-columns: 1fr; }
    .m-account-card { padding: 24px 19px; }
    .m-member { padding-top: 18px; }
    .m-member-hero { padding: 18px; gap: 17px; }
    .m-member-avatar { width: 54px; height: 54px; flex-basis: 54px; border-radius: 15px; font-size: 22px; }
    .m-member-stats { margin-left: 0; gap: 18px; }
    .m-member-actions { margin-left: 0; width: 100%; }
    .m-member-actions .m-btn { padding: 8px 13px; font-size: 11.5px; }
    .m-member-side { grid-template-columns: 1fr; }
    .m-editor, .m-panel-head { padding-left: 15px; padding-right: 15px; }
    .m-editor { padding-top: 15px; }
    .m-editor-area textarea { min-height: 300px; padding: 13px; }
    .m-editor-preview { min-height: 300px; padding: 13px; }
    .m-my-post { grid-template-columns: minmax(0, 1fr) auto; gap: 5px 9px; }
    .m-my-post-meta { font-size: 10px; }
    .m-my-actions { align-items: flex-end; flex-direction: column; gap: 4px; }
    .m-flashes { top: 72px; }
    .m-footer { padding-top: 32px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
