:root {
  color-scheme: light;
  --ink: #242a27;
  --muted: #6f756f;
  --line: #e6ded2;
  --paper: #fffdf9;
  --canvas: #f6f1e9;
  --green: #315f4d;
  --green-dark: #244b3d;
  --coral: #dd745f;
  --amber: #b47b30;
  --shadow: 0 18px 44px rgba(52, 45, 35, .08);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #ece7df; }
body { min-height: 100%; margin: 0; color: var(--ink); background: #ece7df; font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
body [hidden] { display: none; }

.content-app { position: relative; width: min(100%, 430px); min-height: 100vh; margin: 0 auto; overflow-x: hidden; background: var(--canvas); box-shadow: 0 0 24px rgba(54, 44, 28, .08); }
.content-topbar, .detail-topbar { position: sticky; z-index: 20; top: 0; display: grid; grid-template-columns: 48px 1fr auto; align-items: center; min-height: 76px; padding: calc(10px + env(safe-area-inset-top)) 20px 10px; background: rgba(246, 241, 233, .94); border-bottom: 1px solid rgba(222, 212, 199, .8); backdrop-filter: blur(18px); }
.content-topbar > div { min-width: 0; }
.content-topbar p { margin: 0 0 2px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.content-topbar h1 { margin: 0; font-size: clamp(20px, 4vw, 28px); line-height: 1.15; }
.icon-link { display: grid; width: 42px; height: 42px; padding: 0; place-items: center; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 50%; font-size: 32px; line-height: 1; cursor: pointer; }
.topbar-action { min-height: 40px; padding: 0 16px; color: #fff; background: var(--green); border: 0; border-radius: 999px; font-weight: 800; cursor: pointer; }
a.topbar-action { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.content-main { padding: 24px 20px calc(42px + env(safe-area-inset-bottom)); }

.content-card { margin-bottom: 18px; padding: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.section-heading > div { display: flex; align-items: center; gap: 10px; }
.section-heading > div > span { display: grid; width: 30px; height: 30px; place-items: center; color: #fff; background: var(--green); border-radius: 10px; font-size: 11px; font-weight: 900; }
.section-heading h2 { margin: 0; font-size: 18px; }
.section-heading p { max-width: 360px; margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: right; }

.content-type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.content-type-grid label { cursor: pointer; }
.content-type-grid input { position: absolute; opacity: 0; pointer-events: none; }
.content-type-grid span { display: flex; min-height: 94px; padding: 16px; flex-direction: column; justify-content: center; border: 1px solid var(--line); border-radius: 18px; transition: .2s ease; }
.content-type-grid strong { margin-bottom: 7px; font-size: 16px; }
.content-type-grid small { color: var(--muted); line-height: 1.4; }
.content-type-grid input:checked + span { color: var(--green-dark); background: #edf4ef; border-color: #76a08e; box-shadow: inset 0 0 0 1px #76a08e; }
.content-type-grid input:focus-visible + span { outline: 3px solid rgba(49, 95, 77, .22); outline-offset: 2px; }

.editor-field { display: block; margin-top: 16px; }
.editor-field > span, .category-fieldset legend { display: flex; margin-bottom: 8px; align-items: center; justify-content: space-between; color: #3c433f; font-size: 13px; font-weight: 800; }
.editor-field em { color: var(--muted); font-size: 11px; font-style: normal; font-weight: 500; }
.editor-field input, .editor-field textarea, .editor-field select { width: 100%; color: var(--ink); background: #fbf8f2; border: 1px solid var(--line); border-radius: 14px; outline: 0; }
.editor-field input, .editor-field select { min-height: 48px; padding: 0 14px; }
.editor-field textarea { padding: 14px; line-height: 1.65; resize: vertical; }
.editor-field input:focus, .editor-field textarea:focus, .editor-field select:focus { background: #fff; border-color: #6c9987; box-shadow: 0 0 0 3px rgba(49, 95, 77, .1); }

.category-fieldset { padding: 0; margin: 0 0 18px; border: 0; }
.category-check-grid { display: flex; flex-wrap: wrap; gap: 9px; }
.category-check-grid label { cursor: pointer; }
.category-check-grid input { position: absolute; opacity: 0; }
.category-check-grid span { display: block; padding: 9px 13px; background: #f5f0e8; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 700; }
.category-check-grid input:checked + span { color: #fff; background: var(--green); border-color: var(--green); }

.media-picker { display: flex; min-height: 150px; align-items: center; justify-content: center; flex-direction: column; color: var(--green); background: repeating-linear-gradient(135deg, #fbf8f2, #fbf8f2 9px, #f7f2e9 9px, #f7f2e9 18px); border: 1px dashed #93aa9f; border-radius: 20px; cursor: pointer; }
.media-picker input { position: absolute; opacity: 0; pointer-events: none; }
.media-picker > span { display: grid; width: 42px; height: 42px; margin-bottom: 9px; place-items: center; color: #fff; background: var(--green); border-radius: 50%; font-size: 24px; }
.media-picker strong { font-size: 15px; }
.media-picker small { margin-top: 5px; color: var(--muted); font-size: 11px; }
.media-preview-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 14px; }
.media-preview-item { position: relative; overflow: hidden; aspect-ratio: 1; background: #ebe5dc; border-radius: 14px; }
.media-preview-item img, .media-preview-item video { width: 100%; height: 100%; object-fit: cover; }
.media-preview-item button { position: absolute; top: 6px; right: 6px; display: grid; width: 26px; height: 26px; padding: 0; place-items: center; color: #fff; background: rgba(20, 24, 22, .78); border: 0; border-radius: 50%; cursor: pointer; }
.media-preview-item.existing::after { position: absolute; bottom: 6px; left: 6px; padding: 3px 7px; color: #fff; background: rgba(20, 24, 22, .72); border-radius: 999px; content: "已上传"; font-size: 9px; }
.field-error { min-height: 18px; margin: 8px 0 0; color: #ad3f37; font-size: 12px; }
.editor-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: end; }
.setting-toggle { display: flex; min-height: 48px; padding: 0 2px 0 14px; align-items: center; justify-content: space-between; background: #fbf8f2; border: 1px solid var(--line); border-radius: 14px; }
.setting-toggle span { display: flex; flex-direction: column; }
.setting-toggle strong { font-size: 13px; }
.setting-toggle small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.setting-toggle input { width: 44px; height: 24px; accent-color: var(--green); }
.editor-status, .page-status { min-height: 20px; margin: 12px 0; color: #ad3f37; font-size: 13px; font-weight: 700; text-align: center; }
.editor-status.success, .page-status.success { color: var(--green); }
.editor-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 12px; }
.editor-actions button { min-height: 54px; border-radius: 16px; font-weight: 900; cursor: pointer; }
.secondary-action { color: var(--green); background: #edf4ef; border: 1px solid #aac0b6; }
.primary-action { color: #fff; background: var(--green); border: 1px solid var(--green); box-shadow: 0 12px 24px rgba(49, 95, 77, .2); }
.editor-actions button:disabled, .topbar-action:disabled { opacity: .55; cursor: wait; }
.editor-state-card { margin-bottom: 18px; padding: 16px 18px; background: #fff3df; border: 1px solid #e6c68c; border-radius: 16px; }
.editor-state-card strong { color: #805621; }
.editor-state-card p { margin: 5px 0 0; color: #795f3e; line-height: 1.5; }

.mine-app { background: linear-gradient(180deg, #f2f5f1 0, #f7f2ea 420px); }
.mine-topbar { background: rgba(246, 248, 245, .92); border-bottom-color: rgba(211, 220, 214, .8); }
.mine-topbar .icon-link { background: rgba(255, 255, 255, .82); border-color: #d8e0da; box-shadow: 0 5px 16px rgba(31, 56, 45, .05); }
.mine-create-action { display: inline-flex; align-items: center; gap: 5px; box-shadow: 0 9px 22px rgba(49, 95, 77, .2); }
.mine-create-action span { font-size: 17px; font-weight: 500; }
.mine-main { width: 100%; margin: 0 auto; }
.mine-overview { position: relative; overflow: hidden; padding: 27px; color: #fff; background: linear-gradient(135deg, #153c30, #315f4d 62%, #487461); border-radius: 28px; box-shadow: 0 20px 42px rgba(29, 68, 53, .18); }
.mine-overview::before { position: absolute; top: -72px; right: -44px; width: 210px; height: 210px; border: 1px solid rgba(255, 255, 255, .13); border-radius: 50%; box-shadow: 0 0 0 32px rgba(255, 255, 255, .035), 0 0 0 68px rgba(255, 255, 255, .025); content: ""; }
.mine-overview-copy { position: relative; z-index: 1; }
.mine-overview-copy > p { margin: 0 0 7px; color: #bcd8ca; font-size: 10px; font-weight: 900; letter-spacing: .17em; }
.mine-overview-copy h2 { margin: 0; font-size: clamp(24px, 4vw, 34px); line-height: 1.18; }
.mine-overview-copy > span { display: block; margin-top: 9px; color: rgba(255, 255, 255, .7); font-size: 12px; }
.mine-summary { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 23px; }
.mine-summary article { min-width: 0; min-height: 78px; padding: 13px; display: flex; align-items: center; gap: 11px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .13); border-radius: 17px; backdrop-filter: blur(8px); }
.mine-summary article > div { min-width: 0; display: flex; flex-direction: column; }
.mine-stat-icon { width: 32px; height: 32px; flex: 0 0 32px; display: grid; place-items: center; color: #d9f4e6; background: rgba(255, 255, 255, .13); border-radius: 10px; font-size: 15px; }
.mine-stat-icon.pending { color: #ffe1a9; }
.mine-stat-icon.published { color: #c6f0dc; }
.mine-summary strong { overflow: hidden; color: #fff; font-size: 23px; line-height: 1; text-overflow: ellipsis; }
.mine-summary small { margin-top: 5px; overflow: hidden; color: rgba(255, 255, 255, .66); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.mine-workspace { margin: 18px 0 14px; padding: 18px; background: rgba(255, 255, 255, .78); border: 1px solid rgba(216, 222, 216, .9); border-radius: 22px; box-shadow: 0 12px 34px rgba(48, 62, 53, .06); }
.mine-workspace-head { display: flex; margin-bottom: 15px; align-items: center; justify-content: space-between; gap: 16px; }
.mine-workspace-head h2 { margin: 0; font-size: 18px; }
.mine-workspace-head p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.mine-workspace-head p strong { color: var(--green); font-size: 12px; }
.mine-workspace-head button { min-height: 36px; padding: 0 12px; display: inline-flex; align-items: center; gap: 5px; color: var(--green); background: #edf3ef; border: 1px solid #d6e2da; border-radius: 10px; font-size: 11px; font-weight: 800; cursor: pointer; }
.mine-workspace-head button span { font-size: 16px; }
.mine-toolbar { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; }
.mine-toolbar label { min-width: 0; padding: 9px 12px; display: flex; flex-direction: column; background: #f8faf7; border: 1px solid #dce3dd; border-radius: 13px; }
.mine-toolbar label > span { margin-bottom: 3px; color: #7d867f; font-size: 9px; font-weight: 800; }
.mine-toolbar select { width: 100%; min-width: 0; padding: 0 24px 0 0; color: #28342e; background: transparent; border: 0; outline: 0; font-size:16px; font-weight: 800; }
.mine-toolbar label:focus-within { background: #fff; border-color: #80a392; box-shadow: 0 0 0 3px rgba(49, 95, 77, .09); }
.mine-filter-reset { min-width: 88px; color: #69726c; background: transparent; border: 1px solid #d8dfda; border-radius: 13px; font-size: 11px; font-weight: 800; cursor: pointer; }
.mine-filter-reset:hover { color: var(--green); background: #f0f5f1; }
.mine-list { display: grid; gap: 12px; }
.mine-item { position: relative; display: grid; grid-template-columns: 142px minmax(0, 1fr); gap: 17px; padding: 14px; background: rgba(255, 255, 255, .9); border: 1px solid #dde3de; border-radius: 21px; box-shadow: 0 9px 26px rgba(45, 61, 52, .055); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.mine-item:hover { border-color: #bdcdc4; box-shadow: 0 15px 34px rgba(45, 61, 52, .09); transform: translateY(-2px); }
.mine-item[aria-busy="true"] { opacity: .58; pointer-events: none; }
.mine-thumb { position: relative; min-height: 142px; overflow: hidden; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 5px; color: #fff; background: linear-gradient(145deg, #264f40, #9a6e56); border-radius: 15px; }
.mine-thumb::after { position: absolute; inset: 45% 0 0; background: linear-gradient(0deg, rgba(17, 27, 22, .36), transparent); content: ""; pointer-events: none; }
.mine-thumb img,.mine-thumb video { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.mine-thumb-symbol { font-size: 30px; }
.mine-thumb > small { color: rgba(255, 255, 255, .78); font-size: 10px; font-weight: 800; }
.mine-media-badge { position: absolute; z-index: 2; left: 8px; bottom: 8px; padding: 4px 7px; color: #fff; background: rgba(18, 28, 23, .72); border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px; font-size: 9px; font-weight: 800; backdrop-filter: blur(6px); }
.mine-copy { min-width: 0; padding: 2px 2px 1px 0; display: flex; flex-direction: column; }
.mine-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.status-chip,.type-chip { padding: 4px 8px; border-radius: 999px; font-size: 9px; font-weight: 850; }
.status-chip { color: #725124; background: #faebcc; }
.status-chip.published { color: #235443; background: #dfeee7; }
.status-chip.rejected { color: #8f332d; background: #f7deda; }
.status-chip.draft { color: #58615d; background: #e9edeb; }
.status-chip.archived { color: #6b6176; background: #ece7f1; }
.type-chip { color: #53576b; background: #ececf3; }
.type-chip.guide { color: #785a20; background: #f5ead3; }
.type-chip.snapshot { color: #76485a; background: #f3e4ea; }
.mine-copy h2 { margin: 9px 0 5px; overflow: hidden; font-size: 17px; line-height: 1.38; text-overflow: ellipsis; white-space: nowrap; }
.mine-copy h2 a:focus-visible { outline: 3px solid rgba(49, 95, 77, .2); outline-offset: 3px; }
.mine-copy > p:not(.moderation-note) { display: -webkit-box; margin: 0; overflow: hidden; color: #6e7670; font-size: 12px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.mine-categories { display: flex; gap: 5px; margin-top: 9px; flex-wrap: wrap; }
.mine-categories span { padding: 3px 7px; color: #5d7066; background: #eff4f1; border-radius: 6px; font-size: 9px; font-weight: 750; }
.mine-meta { display: flex; gap: 12px; margin-top: 9px; color: #949a96; font-size: 9px; flex-wrap: wrap; }
.moderation-note { margin: 9px 0 0; padding: 7px 9px; color: #87453e; background: #fbedeb; border-radius: 8px; font-size: 10px; line-height: 1.5; }
.mine-actions { margin-top: auto; padding-top: 12px; display: flex; align-items: center; gap: 7px; }
.mine-actions a,.mine-actions button { min-height: 34px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; color: var(--green); background: #edf4f0; border: 0; border-radius: 9px; font-size: 10px; font-weight: 850; text-align: center; cursor: pointer; }
.mine-actions .mine-primary-action { color: #fff; background: var(--green); }
.mine-actions .mine-secondary-action { background: #edf4f0; }
.mine-actions .danger-action { margin-left: auto; color: #9a4942; background: #fbefed; }
.content-loading { display: flex; padding: 42px 10px; align-items: center; justify-content: center; color: var(--muted); }
.content-loading span, .admin-loading span { width: 22px; height: 22px; margin-right: 10px; border: 3px solid #d5ccc0; border-top-color: var(--green); border-radius: 50%; animation: content-spin .8s linear infinite; }
@keyframes content-spin { to { transform: rotate(360deg); } }
.content-empty { padding: 50px 20px; background: rgba(255, 255, 255, .82); border: 1px dashed #bfcac3; border-radius: 22px; text-align: center; }
.content-empty > span { width: 50px; height: 50px; margin: 0 auto; display: grid; place-items: center; color: #fff; background: var(--green); border-radius: 15px; font-size: 24px; transform: rotate(-3deg); }
.content-empty h2 { margin: 12px 0 5px; }
.content-empty p { margin: 0 0 18px; color: var(--muted); }
.content-empty a, .load-more { display: inline-grid; min-height: 44px; padding: 0 18px; place-items: center; color: #fff; background: var(--green); border: 0; border-radius: 999px; font-weight: 800; }
.load-more { margin: 20px auto 0; cursor: pointer; box-shadow: 0 9px 20px rgba(49, 95, 77, .14); }

.detail-app { max-width: none; width: min(100%, 430px); background: var(--paper); }
.detail-topbar { grid-template-columns: 48px 1fr 48px; background: rgba(255, 253, 249, .94); }
.detail-brand { justify-self: center; color: var(--green); font-family: Georgia, serif; font-size: 22px; font-weight: 800; letter-spacing: .04em; }
.detail-profile { width: 40px; height: 40px; overflow: hidden; justify-self: end; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.detail-profile img { width: 100%; height: 100%; object-fit: cover; }
.detail-main { padding: 24px 20px calc(50px + env(safe-area-inset-bottom)); }
.detail-article { width: 100%; margin: 0 auto; padding: 0 4px; }
.detail-heading { padding: 22px 0 26px; border-bottom: 1px solid var(--line); }
.detail-badges { display: flex; gap: 7px; margin-bottom: 14px; flex-wrap: wrap; }
.detail-badges span { padding: 5px 9px; color: var(--green); background: #edf4ef; border-radius: 999px; font-size: 10px; font-weight: 800; }
.detail-heading h1 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(30px, 7vw, 50px); line-height: 1.14; letter-spacing: -.02em; }
.detail-excerpt { margin: 15px 0 0; color: #656c67; font-size: 17px; line-height: 1.7; }
.detail-author { display: flex; margin-top: 22px; align-items: center; }
.detail-author img { width: 44px; height: 44px; margin-right: 11px; object-fit: cover; border-radius: 50%; }
.detail-author div { display: flex; flex-direction: column; }
.detail-author span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.detail-media { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 24px 0; overflow: hidden; border-radius: 22px; }
.detail-media.one { grid-template-columns: 1fr; }
.detail-media img, .detail-media video { width: 100%; min-height: 220px; max-height: 560px; object-fit: cover; background: #e7e0d6; }
.detail-media > :first-child:nth-last-child(3), .detail-media > :first-child:nth-last-child(5) { grid-row: span 2; }
.detail-body { min-height: 120px; margin: 26px 0; font-size: 17px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-actions { display: grid; grid-template-columns: repeat(3, 1fr); padding: 12px; background: #f7f2ea; border-radius: 18px; }
.detail-actions button, .detail-actions a { display: flex; min-height: 48px; padding: 0 10px; align-items: center; justify-content: center; background: transparent; border: 0; border-right: 1px solid var(--line); cursor: pointer; }
.detail-actions > :last-child { border-right: 0; }
.detail-actions span { margin-right: 7px; font-size: 20px; }
.detail-actions strong { font-size: 12px; }
.detail-actions em { margin-left: 5px; color: var(--muted); font-size: 10px; font-style: normal; }
.detail-actions [aria-pressed="true"] { color: var(--coral); }
.detail-owner-note { padding: 12px 14px; color: #704d25; background: #fff2da; border-radius: 12px; font-size: 12px; line-height: 1.6; }
.comment-section { width: 100%; margin: 34px auto 0; padding-top: 28px; border-top: 1px solid var(--line); }
.comment-section > header { display: flex; align-items: end; justify-content: space-between; }
.comment-section header p { margin: 0; color: var(--green); font-size: 9px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.comment-section header h2 { margin: 3px 0 0; font-size: 24px; }
.comment-section header > span { color: var(--muted); font-size: 12px; }
.comment-compose { margin: 18px 0 24px; padding: 14px; background: #f8f4ed; border-radius: 16px; }
.comment-compose textarea { width: 100%; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; resize: vertical; }
.comment-compose > div:last-child { display: flex; margin-top: 9px; align-items: center; justify-content: space-between; }
.comment-compose small { color: var(--muted); }
.comment-compose button { padding: 9px 14px; color: #fff; background: var(--green); border: 0; border-radius: 999px; font-weight: 800; cursor: pointer; }
.reply-context { display: flex; margin-bottom: 8px; align-items: center; justify-content: space-between; color: var(--green); font-size: 11px; }
.reply-context button { padding: 4px 8px; color: #8b423d; background: #f9e4e0; }
.comment-list { display: grid; gap: 12px; }
.comment-item { padding: 15px; background: #fcfaf6; border: 1px solid var(--line); border-radius: 16px; }
.comment-item.is-reply { margin-left: 34px; }
.comment-item header { display: flex; align-items: center; }
.comment-item header img { width: 34px; height: 34px; margin-right: 9px; object-fit: cover; border-radius: 50%; }
.comment-item header div { display: flex; flex-direction: column; }
.comment-item header span { color: var(--muted); font-size: 10px; }
.comment-item p { margin: 11px 0; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-item footer { display: flex; justify-content: space-between; }
.comment-item footer span { color: var(--amber); font-size: 10px; font-weight: 800; }
.comment-item footer button { padding: 0; color: var(--green); background: transparent; border: 0; font-size: 11px; font-weight: 800; cursor: pointer; }
.comment-empty { padding: 22px; color: var(--muted); background: #f8f4ed; border-radius: 16px; text-align: center; }

.editor-status[data-kind="success"], .page-status[data-kind="success"] { color: var(--green); }
.editor-status[data-kind="working"], .page-status[data-kind="working"] { color: var(--muted); }
.media-preview-item small { position: absolute; right: 7px; bottom: 7px; left: 7px; overflow: hidden; padding: 4px 6px; color: #fff; background: rgba(20, 24, 22, .72); border-radius: 6px; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.comment-item { display: grid; grid-template-columns: 38px 1fr; gap: 11px; }
.comment-item > img { width: 38px; height: 38px; object-fit: cover; border-radius: 50%; }
.comment-copy header { justify-content: space-between; gap: 10px; }
.comment-copy header time { color: var(--muted); font-size: 10px; }
.comment-copy > p { margin: 8px 0; }
.comment-pending { display: block; color: var(--amber); }
.comment-reply { padding: 4px 0; color: var(--green); background: transparent; border: 0; font-size: 11px; font-weight: 800; cursor: pointer; }
.comment-replies { display: grid; gap: 8px; margin-top: 12px; }
.comment-replies .comment-item { background: #f6f1e9; }

@media (max-width: 620px) {
  .content-main, .detail-main { padding-right: 14px; padding-left: 14px; }
  .content-topbar, .detail-topbar { padding-right: 14px; padding-left: 14px; }
  .content-card { padding: 18px 15px; border-radius: 20px; }
  .section-heading { display: block; }
  .section-heading p { margin: 8px 0 0 40px; text-align: left; }
  .content-type-grid { grid-template-columns: 1fr; }
  .content-type-grid span { min-height: 68px; }
  .media-preview-grid { grid-template-columns: repeat(3, 1fr); }
  .editor-settings-grid { grid-template-columns: 1fr; }
  .mine-overview { padding: 22px 18px; border-radius: 24px; }
  .mine-summary { gap: 7px; }
  .mine-summary article { min-height: 72px; padding: 10px; gap: 8px; }
  .mine-stat-icon { width: 28px; height: 28px; flex-basis: 28px; }
  .mine-workspace { padding: 15px; }
  .mine-item { grid-template-columns: 112px minmax(0, 1fr); gap: 13px; padding: 12px; }
  .mine-thumb { min-height: 132px; }
  .mine-copy h2 { display: -webkit-box; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .mine-actions { flex-wrap: wrap; }
  .detail-media img, .detail-media video { min-height: 160px; }
}

@media (max-width: 390px) {
  .topbar-action { padding: 0 12px; font-size: 12px; }
  .mine-topbar p { max-width: 135px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mine-create-action { padding: 0 10px; font-size: 11px; }
  .mine-overview-copy > span { max-width: 250px; line-height: 1.55; }
  .mine-summary article { min-height: 74px; flex-direction: column; align-items: flex-start; gap: 7px; }
  .mine-summary strong { font-size: 20px; }
  .mine-summary small { margin-top: 3px; }
  .mine-toolbar { grid-template-columns: 1fr; }
  .mine-filter-reset { min-height: 42px; }
  .mine-item { grid-template-columns: 94px minmax(0, 1fr); gap: 11px; }
  .mine-thumb { min-height: 122px; }
  .mine-meta { gap: 6px; }
  .mine-actions { margin-left: 0; }
  .mine-actions a,.mine-actions button { flex: 1; padding: 0 9px; }
  .mine-actions .danger-action { margin-left: 0; flex: 0 0 auto; }
  .detail-actions strong { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .mine-item { transition: none; }
}

/* keluvi-mobile-safe-v1 — phone shell aligned with /me /settings */
html, body {
  max-width: 100%;
  overflow-x: hidden;
  background: #ece7df;
}
.content-app,
.detail-app,
.editor-app,
.mine-app {
  position: relative;
  width: min(100%, 430px);
  max-width: 430px;
  min-height: 100vh;
  margin: 0 auto;
  overflow-x: hidden;
  box-shadow: 0 0 24px rgba(54, 44, 28, .08);
}
.content-topbar,
.detail-topbar,
.mine-topbar,
.content-main,
.detail-main,
.mine-main,
.content-card,
.detail-article,
.mine-item,
.mine-workspace,
.comment-section {
  min-width: 0;
  max-width: 100%;
}
.detail-heading h1 {
  font-size: clamp(20px, 5.6vw, 24px);
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.detail-excerpt,
.detail-body,
.detail-owner-note,
.mine-copy h2,
.mine-copy p,
.section-heading p,
.editor-state-card p,
.page-status,
.editor-status,
.comment-item p {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.detail-media {
  width: 100%;
  max-width: 100%;
  grid-template-columns: 1fr;
}
.detail-media img,
.detail-media video {
  width: 100%;
  max-width: 100%;
  min-height: 180px;
  max-height: 70vh;
  display: block;
  object-fit: contain;
  background: #1a1f1c;
}
.media-preview-item img,
.media-preview-item video,
.mine-thumb img,
.mine-thumb video,
.detail-author img,
.detail-profile img {
  max-width: 100%;
}
.media-preview-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.content-type-grid {
  grid-template-columns: 1fr;
}
.editor-settings-grid,
.editor-actions {
  grid-template-columns: 1fr;
}
.section-heading {
  display: block;
}
.section-heading p {
  max-width: none;
  margin: 8px 0 0 40px;
  text-align: left;
}
.mine-item {
  grid-template-columns: 112px minmax(0, 1fr);
}
.mine-actions {
  margin-left: 0;
  width: 100%;
}
@media (max-width: 374px) {
  .content-main, .detail-main, .mine-main { padding-left: 10px; padding-right: 10px; }
  .content-topbar, .detail-topbar, .mine-topbar { padding-left: 10px; padding-right: 10px; }
  .mine-item { grid-template-columns: 94px minmax(0, 1fr); }
}
@media (min-width: 700px) {
  .content-app,
  .detail-app,
  .editor-app,
  .mine-app {
    min-height: calc(100vh - 40px);
    margin: 20px auto;
    border-radius: 8px;
    overflow: hidden;
  }
}


.detail-owner-actions {
  display: flex;
  gap: 10px;
  margin: 14px 0 4px;
}
.detail-owner-actions a,
.detail-owner-actions button {
  display: inline-flex;
  min-height: 40px;
  padding: 0 14px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}
.detail-owner-actions .mine-secondary-action {
  color: #315f4d;
  background: #e7efe9;
  border: 1px solid #c7d8ce;
}
.detail-owner-actions .danger-action {
  color: #a33b33;
  background: #f8e8e6;
  border: 1px solid #e4c0bb;
}

/* v0.6.18 ios video cover */
.mine-thumb video,.detail-media video,.media-preview-item video{width:100%;height:100%;max-height:100%;object-fit:cover;display:block}

/* v0.6.24 guide detail reference layout */
.guide-detail-app {
  --paper: #ffffff;
  --ink: #1a1a1a;
  --muted: #8a8a8a;
  --line: #ececec;
  --green: #3d9b6c;
  --green-soft: #e8f6ee;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: #fff;
  color: var(--ink);
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
.guide-detail-topbar {
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
}
.guide-detail-topbar .detail-brand { color: var(--green); }
.guide-detail-main { padding: 12px 16px 28px; background: #fff; }
.guide-detail-heading { padding: 8px 0 18px; border-bottom: 1px solid var(--line); }
.guide-detail-title-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}
.guide-detail-title-row h1 {
  flex: 1;
  margin: 0;
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  font-size: clamp(20px, 5.4vw, 24px);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0;
}
.guide-detail-cat-tags {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 46%;
  justify-content: flex-end;
}
.guide-detail-cat-tag {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 0 10px;
  color: #2f7a55;
  background: var(--green-soft);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}
.guide-detail-heading .detail-excerpt {
  margin: 10px 0 0;
  color: #666;
  font-size: 14px;
  line-height: 1.7;
}
.guide-detail-author-row {
  display: flex;
  margin-top: 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.guide-detail-author {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}
.guide-detail-author img {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 50%;
  background: #f2f2f2;
}
.guide-detail-author-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}
.guide-detail-author-meta strong {
  font-size: 14px;
  font-weight: 700;
}
.guide-detail-author-meta em {
  display: inline-flex;
  min-height: 18px;
  padding: 0 6px;
  align-items: center;
  color: #8a5a1b;
  background: #fff4df;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}
.guide-detail-author span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.guide-detail-author i {
  font-style: normal;
}
.guide-follow-btn {
  flex-shrink: 0;
  min-height: 36px;
  min-width: 72px;
  padding: 0 14px;
  color: #fff;
  background: var(--green);
  border: 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.guide-follow-btn.is-active {
  color: var(--green);
  background: var(--green-soft);
}
.guide-detail-stats {
  display: flex;
  margin-top: 16px;
  gap: 16px;
  flex-wrap: wrap;
  color: #9a9a9a;
  font-size: 12px;
}
.guide-detail-stats span,
.guide-detail-stats a,
.guide-detail-stats button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
  text-decoration: none;
  cursor: pointer;
}
.guide-detail-stats .ui-icon {
  width: 14px;
  height: 14px;
}
.guide-detail-stats button.is-active {
  color: #e35d6a;
}
.guide-detail-section {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.guide-detail-section h2 {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 800;
}
.guide-detail-section .detail-body {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.guide-media-feature {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #f3f3f3;
  aspect-ratio: 16 / 10;
}
.guide-media-feature img,
.guide-media-feature video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.guide-media-play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  color: #fff;
  font-size: 28px;
  background: rgba(0, 0, 0, .18);
  border: 0;
  cursor: pointer;
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
}
.guide-media-play[hidden] {
  display: none;
}
.guide-media-feature.is-playing .guide-media-play {
  display: none;
}
.guide-media-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.guide-media-thumbs button {
  overflow: hidden;
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #f3f3f3;
  cursor: pointer;
}
.guide-media-thumbs button.is-active {
  border-color: var(--green);
}
.guide-media-thumbs img,
.guide-media-thumbs video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.guide-location-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.guide-location-map {
  position: relative;
  height: 148px;
  background: linear-gradient(180deg, #eef6f1, #dfece5);
}
.guide-location-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.guide-map-pin {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 50% 50% 50% 0;
  background: var(--green);
  transform: rotate(-45deg);
  box-shadow: 0 4px 10px rgba(61, 155, 108, .35);
  pointer-events: none;
}
.guide-map-fallback {
  display: grid;
  height: 100%;
  place-items: center;
  padding: 16px;
  color: #66756d;
  font-size: 13px;
  text-align: center;
}
.guide-location-copy {
  display: flex;
  gap: 10px;
  padding: 14px;
  align-items: flex-start;
  justify-content: space-between;
}
.guide-location-copy strong {
  display: block;
  font-size: 14px;
}
.guide-location-copy p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.guide-location-copy button {
  flex-shrink: 0;
  min-height: 32px;
  padding: 0 10px;
  color: var(--green);
  background: var(--green-soft);
  border: 0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.guide-location-open {
  display: flex;
  padding: 0 14px 14px;
  justify-content: flex-end;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.guide-nearby-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(138px, 42%);
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.guide-nearby-card {
  scroll-snap-align: start;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
}
.guide-nearby-media {
  aspect-ratio: 1;
  background: #f2f2f2;
  overflow: hidden;
}
.guide-nearby-media img,
.guide-nearby-media video,
.guide-nearby-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.guide-nearby-placeholder { background: linear-gradient(135deg, #eef6f1, #f7f7f7); }
.guide-nearby-card strong {
  display: block;
  padding: 8px 10px 0;
  font-size: 13px;
  line-height: 1.4;
}
.guide-nearby-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px 10px;
  color: var(--muted);
  font-size: 11px;
}
.guide-nearby-more {
  display: flex;
  margin-top: 14px;
  justify-content: center;
  color: #666;
  font-size: 13px;
  text-decoration: none;
}
.guide-comment-section {
  margin-top: 8px;
  padding: 8px 4px 0;
  background: transparent;
  border: 0;
}
.guide-comment-section > header {
  margin-bottom: 12px;
  padding: 0 10px;
}
.guide-comment-section > header h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}
.guide-comment-section .comment-list {
  gap: 10px;
}
.guide-comment-section .comment-item {
  align-items: flex-start;
  padding: 12px 14px;
  background: #fcfaf6;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.guide-comment-section .comment-item > img {
  width: 36px;
  height: 36px;
}
.guide-comment-section .comment-copy header {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.guide-comment-section .comment-compose {
  margin: 14px 4px 8px;
}
.guide-comment-section .comment-empty {
  margin: 0 4px;
}
.guide-comment-section .comment-level {
  display: inline-flex;
  min-height: 16px;
  padding: 0 5px;
  align-items: center;
  color: #8a5a1b;
  background: #fff4df;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}
.guide-detail-dock {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 0;
  display: grid;
  width: min(100%, 430px);
  transform: translateX(-50%);
  grid-template-columns: 1.4fr repeat(3, auto);
  gap: 8px;
  align-items: center;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.guide-dock-input {
  min-height: 40px;
  padding: 0 14px;
  color: #999;
  text-align: left;
  background: #f3f3f3;
  border: 0;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
}
.guide-detail-dock > button:not(.guide-dock-input) {
  display: grid;
  min-width: 52px;
  gap: 2px;
  place-items: center;
  color: #444;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.guide-detail-dock > button .ui-icon {
  width: 18px;
  height: 18px;
}
.guide-detail-dock > button span {
  font-size: 10px;
}
.guide-detail-dock > button em {
  font-size: 10px;
  font-style: normal;
  color: var(--muted);
}
.guide-detail-dock > button.is-active {
  color: var(--green);
}
@media (max-width: 420px) {
  .guide-detail-main { padding-left: 12px; padding-right: 12px; }
  .guide-media-thumbs { grid-template-columns: repeat(4, 1fr); gap: 6px; }
}

/* v0.6.26 editor location + map */
.editor-location-block {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding: 14px;
  background: #f7faf8;
  border: 1px solid #dde8e1;
  border-radius: 16px;
}
.editor-location-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.editor-location-head strong {
  font-size: 14px;
}
.editor-location-head span,
[data-location-optional-mark] {
  display: inline-flex;
  min-height: 22px;
  padding: 0 8px;
  align-items: center;
  color: #2f7a55;
  background: #e7f5ee;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}
.editor-coord-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.editor-location-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.editor-location-actions .secondary-action {
  min-height: 40px;
  padding: 0 14px;
  color: #315f4d;
  background: #fff;
  border: 1px solid #c7d8ce;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.editor-map-preview {
  overflow: hidden;
  height: 168px;
  border-radius: 12px;
  border: 1px solid #d5e2db;
  background: #eef5f1;
}
.editor-map-preview iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
[data-location-error]:empty {
  display: none;
}
[data-location-error] {
  margin: 0;
  color: #a33b33;
  font-size: 12px;
}
@media (max-width: 520px) {
  .editor-coord-grid { grid-template-columns: 1fr; }
}

/* v0.6.27 guide body collapse */
.guide-body-collapse {
  position: relative;
}
.guide-body-collapse.is-collapsed {
  max-height: 7.8em;
  overflow: hidden;
}
.guide-body-collapse.is-collapsed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2.4em;
  background: linear-gradient(180deg, rgba(255,255,255,0), #fff 78%);
  pointer-events: none;
}
.guide-body-collapse.is-expanded {
  max-height: none;
  overflow: visible;
}
.guide-body-collapse.is-expanded::after {
  display: none;
}
.guide-detail-section .detail-body {
  min-height: 0;
  margin: 0;
  font-size: 15px;
  line-height: 1.85;
}
.guide-body-expand {
  display: inline-flex;
  margin-top: 8px;
  min-height: 36px;
  padding: 0;
  align-items: center;
  color: var(--green, #3d9b6c);
  background: transparent;
  border: 0;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.guide-body-expand[hidden] {
  display: none;
}
