:root { color-scheme: light; --bg: #eef8ff; --panel: #ffffff; --text: #28445b; --muted: #6f8aa0; --accent: #4fa9df; --accent-deep: #247fb9; --line: #cce7f7; --soft-blue: #dff3ff; --soft-yellow: #fff4c9; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: linear-gradient(180deg, #dff3ff 0, var(--bg) 360px); color: var(--text); font: 16px/1.7 "Trebuchet MS", "Microsoft YaHei", system-ui, sans-serif; }
body::before, body::after { position: fixed; z-index: -1; color: #fff; font-size: 5rem; opacity: .75; pointer-events: none; }
body::before { content: "✦"; top: 92px; left: 5%; color: #ffd978; }
body::after { content: "☁"; top: 150px; right: 5%; color: #fff; }
a { color: var(--accent-deep); text-decoration: none; font-weight: 700; }
a:hover { color: #155d8a; text-decoration: underline; }
.shell { width: min(960px, calc(100% - 32px)); margin: auto; }
header { padding: 28px 0 30px; border-bottom: 2px solid var(--line); }
.brand { display: inline-block; line-height: 0; }
.brand img { display: block; width: 300px; height: auto; }
.login-logo { display: inline-block; line-height: 0; margin-bottom: 24px; }
.login-logo img { display: block; width: min(300px, 76vw); height: auto; }
header h1 a { color: var(--accent-deep); text-shadow: 2px 3px 0 #fff; }
nav { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
nav a { background: #fff; border: 2px solid var(--line); border-radius: 999px; padding: 6px 15px; box-shadow: 0 4px 0 #b9dff2; }
.category-nav { display: contents; }
nav a:hover { background: var(--soft-blue); text-decoration: none; transform: translateY(-1px); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 6vw, 4.6rem); margin: 0; }
h2 { color: #316d96; }
main { padding: 46px 0 80px; }
.eyebrow, .meta { color: var(--muted); font-size: .9rem; font-weight: 700; letter-spacing: .04em; }
.card { background: rgba(255,255,255,.96); border: 2px solid var(--line); border-radius: 22px; padding: 22px; margin: 18px 0; box-shadow: 0 8px 0 rgba(178, 218, 239, .55); }
.card h2 { margin-top: 0; }
.card:hover { border-color: #a7d8f2; transform: translateY(-2px); transition: transform .15s ease; }
.prose { max-width: 960px; }
.post-title-row { display: flex; align-items: stretch; gap: 16px; margin: 18px 0 30px; }
.post-title-accent { flex: 0 0 10px; min-height: 68px; border-radius: 8px; background: linear-gradient(180deg, #ffd978, #8bd5f5); box-shadow: 3px 4px 0 rgba(178, 218, 239, .6); }
.post-title { margin: 0; color: #1f648a; font-size: clamp(calc(2.5rem - 7px), calc(6vw - 7px), calc(4.8rem - 7px)); line-height: 1.12; text-shadow: 2px 3px 0 #fff; }
.prose img { max-width: 100%; border-radius: 16px; border: 2px solid var(--line); }
.prose pre { overflow: auto; background: #effaff; border: 1px solid var(--line); padding: 16px; border-radius: 14px; color: #31546d; }
.prose code { background: var(--soft-blue); border-radius: 6px; padding: 2px 6px; }
.tag { display: inline-block; border: 1px solid var(--line); padding: 2px 9px; border-radius: 999px; color: var(--muted); font-size: .85rem; }
footer { border-top: 2px solid var(--line); padding: 24px 0 50px; color: var(--muted); }
.notice { border: 2px solid #f3d875; border-radius: 16px; padding: 12px 16px; background: var(--soft-yellow); color: #6d5b23; }
hr { border: 0; border-top: 2px dashed var(--line); margin: 36px 0; }
.admin-section { scroll-margin-top: 18px; }
.admin-form { display: grid; gap: 12px; margin: 18px 0 26px; }
.admin-form label { display: grid; gap: 5px; font-weight: 700; color: #47718d; }
.admin-form input, .admin-form textarea, .admin-form select { width: 100%; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fbfeff; color: var(--text); font: inherit; }
.admin-form textarea { resize: vertical; }
.markdown-label { margin-top: 8px; }
.markdown-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -5px; padding: 8px; border: 2px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; background: #f4fbff; }
.markdown-toolbar button { margin: 0; padding: 6px 11px; border: 1px solid var(--line); background: #fff; color: var(--accent-deep); font-size: .88rem; }
.markdown-toolbar button:hover { background: var(--soft-blue); }
.markdown-editor, .markdown-source { min-height: 360px; width: 100%; border: 2px solid var(--line); border-radius: 0 0 12px 12px; padding: 18px; background: #fff; color: var(--text); font: 16px/1.8 "Trebuchet MS", "Microsoft YaHei", system-ui, sans-serif; }
.markdown-editor:focus, .markdown-source:focus { outline: 3px solid rgba(79,169,223,.2); }
.markdown-editor p { margin: 0 0 12px; }
.markdown-editor h1, .markdown-editor h2, .markdown-editor h3 { color: #316d96; }
.markdown-editor blockquote { margin: 12px 0; padding-left: 14px; border-left: 4px solid var(--accent); color: var(--muted); }
.markdown-editor pre { padding: 12px; border-radius: 9px; background: #effaff; }
.markdown-source { display: block; resize: vertical; border-radius: 0 0 12px 12px; }
.toastui-editor-defaultUI { border: 2px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.toastui-editor-defaultUI-toolbar { background: #f4fbff; border-bottom-color: var(--line); }
.toastui-editor-toolbar-icons { opacity: .9; }
.toastui-editor-ww-container, .toastui-editor-md-container { background: #fff; }
.toastui-editor-contents { font-family: "Trebuchet MS", "Microsoft YaHei", system-ui, sans-serif; color: var(--text); }
.toastui-editor-mode-switch { background: #f4fbff; border-top-color: var(--line); }
.toastui-editor-mode-switch .tab-item.active { color: var(--accent-deep); border-color: var(--line); background: #fff; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
button { border: 0; border-radius: 999px; padding: 9px 17px; background: var(--accent); color: #fff; font: inherit; font-weight: 700; cursor: pointer; margin-right: 8px; }
button:hover { filter: brightness(.96); transform: translateY(-1px); }
button.secondary { background: var(--soft-blue); color: var(--accent-deep); }
button.danger { background: #ffe0e4; color: #b84e63; }
.admin-list { display: grid; gap: 10px; }
.admin-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; border: 2px solid var(--line); border-radius: 16px; padding: 14px 16px; background: #fbfeff; }
.admin-row p { margin: 7px 0 0; white-space: pre-wrap; }
.row-actions { flex: 0 0 auto; white-space: nowrap; }
.toolbar { margin: 12px 0 18px; }
.toolbar label { color: #47718d; font-weight: 700; }
.toolbar select { margin-left: 6px; border: 2px solid var(--line); border-radius: 10px; padding: 7px 10px; background: #fff; color: var(--text); }
.admin-body { background: #f4faff; }
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { position: sticky; top: 0; display: flex; flex: 0 0 238px; flex-direction: column; min-height: 100vh; padding: 26px 16px 20px; background: linear-gradient(180deg, #dff3ff 0%, #eef9ff 68%, #fff 100%); border-right: 2px solid var(--line); }
.admin-brand { display: block; margin: 0 auto; line-height: 0; }
.admin-brand img { display: block; width: 178px; height: auto; }
.admin-brand-caption { margin: 13px 0 28px; color: var(--muted); font-size: .85rem; font-weight: 700; text-align: center; }
.admin-menu { display: grid; gap: 8px; margin: 0; }
.admin-menu a { display: block; padding: 11px 13px; border: 0; border-radius: 12px; background: transparent; color: #47718d; box-shadow: none; font-weight: 700; }
.admin-menu a:hover, .admin-menu a.active { background: #fff; color: var(--accent-deep); text-decoration: none; box-shadow: 0 4px 0 rgba(178, 218, 239, .7); }
.admin-sidebar-foot { margin-top: auto; padding: 18px 8px 0; color: #8eb3c9; font-size: .72rem; font-weight: 700; letter-spacing: .08em; line-height: 1.6; }
.admin-content { min-width: 0; flex: 1; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 34px; background: rgba(255,255,255,.9); border-bottom: 2px solid var(--line); }
.admin-topbar h1 { margin: 2px 0 0; color: var(--text); font-size: 1.55rem; text-shadow: none; }
.admin-user { display: flex; align-items: center; gap: 9px; color: #47718d; font-size: .9rem; font-weight: 700; }
.admin-user a { margin-left: 8px; color: #b84e63; }
.admin-avatar { display: inline-grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--soft-yellow); color: #8b7627; }
.admin-main { width: min(1180px, calc(100% - 68px)); max-width: none; margin: 0 auto; padding: 28px 0 70px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-heading h2 { margin: 0; color: var(--text); font-size: 1.65rem; }
.button-link { display: inline-block; border-radius: 999px; padding: 10px 17px; background: var(--accent); color: #fff; font-weight: 700; text-decoration: none; }
.button-link:hover { color: #fff; text-decoration: none; transform: translateY(-1px); }
.secondary-link { background: var(--soft-blue); color: var(--accent-deep); }
.secondary-link:hover { color: var(--accent-deep); }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.filter-group { display: flex; flex-wrap: wrap; gap: 10px; }
.filter-group input, .filter-group select { min-width: 190px; border: 2px solid var(--line); border-radius: 11px; padding: 9px 12px; background: #fff; color: var(--text); font: inherit; }
.toolbar-summary { color: var(--muted); font-size: .9rem; font-weight: 700; }
.list-card { padding: 12px 16px 18px; }
.data-table { display: grid; grid-template-columns: 2.2fr 1fr .9fr 1fr 1.15fr; gap: 14px; align-items: center; min-height: 62px; padding: 11px 10px; border-bottom: 1px solid var(--line); }
.data-table:last-child { border-bottom: 0; }
.data-table small { display: block; margin-top: 3px; color: var(--muted); font-size: .82rem; }
.data-table span { min-width: 0; overflow-wrap: anywhere; }
.table-head { min-height: 42px; color: var(--muted); font-size: .82rem; font-weight: 700; }
.category-table { grid-template-columns: 1.25fr 1fr 2.5fr 1.15fr; }
.comment-table { grid-template-columns: 2.1fr 1fr .9fr 1fr 1.5fr; }
.status-badge { display: inline-block; border-radius: 999px; padding: 3px 9px; background: var(--soft-blue); color: var(--accent-deep); font-size: .78rem; font-style: normal; font-weight: 700; }
.status-badge.draft, .status-badge.pending { background: var(--soft-yellow); color: #8b7627; }
.status-badge.rejected { background: #ffe0e4; color: #b84e63; }
.text-action { border: 0; padding: 0; margin: 0 8px 0 0; background: transparent; color: var(--accent-deep); font: inherit; font-weight: 700; cursor: pointer; }
.text-action:hover { text-decoration: underline; transform: none; }
.danger-text { color: #b84e63; }
.empty-state { padding: 35px 10px; color: var(--muted); text-align: center; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 14px; padding-top: 18px; color: var(--muted); font-weight: 700; }
.pagination button:disabled { cursor: not-allowed; opacity: .5; }
@media (max-width: 600px) { header { padding-top: 28px; } main { padding-top: 32px; } .card { border-radius: 18px; padding: 18px; } body::before, body::after { font-size: 3rem; } }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } .admin-row { align-items: flex-start; flex-direction: column; } .row-actions { white-space: normal; } }
@media (max-width: 760px) { .admin-sidebar { flex-basis: 76px; align-items: center; padding: 18px 8px; } .admin-brand img { width: 58px; } .admin-brand-caption, .admin-menu a { font-size: 0; } .admin-menu a { width: 54px; padding: 13px 8px; text-align: center; } .admin-sidebar-foot { display: none; } .admin-topbar { padding: 16px 18px; } .admin-main { width: min(100% - 28px, 1180px); } .admin-user span:not(.admin-avatar) { display: none; } }
@media (max-width: 760px) { .page-heading, .list-toolbar { align-items: flex-start; flex-direction: column; } .data-table { grid-template-columns: 1.5fr 1fr 1fr; gap: 8px; } .data-table > span:nth-child(4) { display: none; } .data-table > span:last-child { grid-column: 3; grid-row: 1 / span 2; } .table-head { display: none; } .category-table, .comment-table { grid-template-columns: 1.5fr 1fr 1fr; } .comment-table > span:nth-child(4) { display: none; } .filter-group { width: 100%; } .filter-group input, .filter-group select { min-width: 0; width: 100%; } }
