@import url('/static/vendor/highlight.css');
:root {
  --bg:#f7f8f2;
  --paper:#fffef9;
  --ink:#253b32;
  --muted:#7d857b;
  --line:#dfe4d8;
  --accent:#365e49;
  --soft:#edf0e4;
  --lime:#e2eab3;
  --danger:#b34137;
  --shadow:0 12px 50px #263c3210;
  --sans:Inter,"Segoe UI","Microsoft YaHei",sans-serif;
  --serif:Georgia,"Noto Serif SC","Songti SC",SimSun,serif
}
html[data-theme=dark] {
  --bg:#11151f;
  --paper:#181e2b;
  --ink:#e6e9f2;
  --muted:#929ab0;
  --line:#2b3346;
  --accent:#a4b7ff;
  --soft:#222b3e;
  --lime:#36436b;
  --danger:#ff9b94;
  --shadow:0 12px 50px #0002
}
* {
  box-sizing:border-box
}
body {
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font:14px/1.65 var(--sans)
}
button,input,textarea,select {
  font:inherit
}
button,a,input,textarea,select {
  -webkit-tap-highlight-color:transparent
}
a {
  color:inherit;
  text-decoration:none
}
button {
  cursor:pointer
}
button:disabled {
  opacity:.55;
  cursor:wait
}
button:focus-visible,a:focus-visible {
  outline:3px solid var(--accent);
  outline-offset:4px
}
input:focus,textarea:focus,select:focus {
  outline:2px solid var(--accent);
  outline-offset:1px
}
::selection {
  background:var(--lime)
}
.wrap {
  max-width:1300px;
  margin:auto;
  padding:0 54px
}
.topbar {
  height:91px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--line);
  gap:24px
}
.brand {
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:750;
  font-size:23px;
  letter-spacing:3px
}
.brand img {
  width:34px;
  height:34px
}
.brand small {
  font:10px var(--sans);
  letter-spacing:2px;
  color:var(--muted);
  display:block
}
.nav {
  display:flex;
  align-items:center;
  gap:30px
}
.nav a {
  color:var(--muted);
  position:relative;
  font-size:13px
}
.nav a.active {
  color:var(--ink)
}
.nav a.active:after {
  content:'';
  position:absolute;
  bottom:-32px;
  left:0;
  right:0;
  height:2px;
  background:var(--accent)
}
.top-actions {
  display:flex;
  align-items:center;
  gap:12px
}
.btn {
  border:1px solid var(--line);
  border-radius:9px;
  padding:9px 16px;
  background:var(--paper);
  color:var(--ink);
  display:inline-flex;
  gap:8px;
  align-items:center;
  justify-content:center;
  white-space:nowrap;
  font-size:13px;
  transition:background .15s,transform .15s
}
.btn:hover {
  background:var(--soft);
  transform:translateY(-1px)
}
.btn.primary {
  background:var(--accent);
  color:var(--paper);
  border-color:var(--accent)
}
html[data-theme=dark] .btn.primary {
  color:#111827
}
.btn.soft {
  background:var(--soft)
}
.btn.danger {
  color:var(--danger)
}
.icon-btn {
  width:36px;
  height:36px;
  padding:0
}
.icon {
  width:17px;
  height:17px;
  stroke:currentColor;
  fill:none;
  stroke-width:1.65;
  stroke-linecap:round;
  stroke-linejoin:round;
  vertical-align:middle;
  flex-shrink:0
}
.eyebrow {
  display:flex;
  align-items:center;
  gap:9px;
  color:var(--muted);
  font-size:10px;
  letter-spacing:2.5px;
  text-transform:uppercase
}
.dot {
  width:6px;
  height:6px;
  background:#91a777;
  border-radius:50%;
  display:inline-block
}
.hero {
  display:grid;
  grid-template-columns:1.4fr 1fr;
  gap:50px;
  padding:65px 0 55px;
  align-items:center
}
.hero h1 {
  font:500 clamp(38px,4.2vw,62px)/1.35 var(--serif);
  letter-spacing:1px;
  margin:20px 0 22px
}
.hero h1 em {
  font-style:normal;
  color:var(--accent)
}
.hero p {
  color:var(--muted);
  font-size:14px;
  max-width:420px;
  line-height:2
}
.hero-actions {
  display:flex;
  align-items:center;
  gap:20px;
  margin-top:28px
}
.text-link {
  font-size:12px;
  display:inline-flex;
  align-items:center;
  gap:8px
}
.hero-art {
  height:300px;
  position:relative;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:150px 150px 18px 18px;
  background:radial-gradient(ellipse at 50% 80%,var(--lime),var(--soft) 65%);
  max-width:380px;
  width:100%;
  justify-self:end
}
.hero-art svg {
  width:100%;
  height:100%;
  color:var(--accent)
}
.art-caption {
  position:absolute;
  bottom:19px;
  left:24px;
  font-size:9px;
  letter-spacing:2px;
  color:var(--accent)
}
.art-tag {
  position:absolute;
  top:45px;
  right:25px;
  border:1px solid var(--accent);
  border-radius:50%;
  width:55px;
  height:55px;
  display:grid;
  place-items:center;
  font-size:11px;
  transform:rotate(12deg)
}
.section-line {
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:center;
  border-top:1px solid var(--line);
  padding-top:26px;
  margin-bottom:25px
}
.section-line h2 {
  font-size:18px;
  letter-spacing:1px;
  font-weight:550;
  margin:0
}
.section-line small {
  color:var(--muted);
  font:10px var(--sans);
  letter-spacing:2px;
  margin-left:12px
}
.content-grid {
  display:grid;
  grid-template-columns:minmax(0,1fr) 265px;
  gap:44px
}
.filters {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-bottom:26px
}
.chip {
  border:1px solid var(--line);
  color:var(--muted);
  background:transparent;
  padding:5px 13px;
  border-radius:20px;
  font-size:11px;
  cursor:pointer
}
.chip.selected {
  background:var(--ink);
  color:var(--bg);
  border-color:var(--ink)
}
.post-card {
  display:grid;
  grid-template-columns:1fr 125px;
  gap:25px;
  padding:26px 0;
  border-bottom:1px solid var(--line)
}
.post-card:first-child {
  padding-top:0
}
.post-card h3 {
  font:600 22px/1.5 var(--serif);
  margin:11px 0 8px
}
.post-card:hover h3 {
  color:var(--accent)
}
.post-card p {
  font-size:12px;
  color:var(--muted);
  margin:0 0 14px;
  line-height:1.9;
  overflow-wrap:anywhere
}
.post-meta {
  display:flex;
  gap:14px;
  align-items:center;
  font-size:10px;
  color:var(--muted)
}
.category {
  font-size:10px;
  color:var(--accent);
  letter-spacing:1px
}
.post-visual {
  border-radius:12px;
  min-height:125px;
  align-self:center;
  display:grid;
  place-items:center;
  background:var(--soft);
  color:var(--accent);
  font:italic 46px var(--serif);
  position:relative;
  overflow:hidden
}
.post-visual:after {
  content:'';
  border:1px solid var(--accent);
  width:90px;
  height:90px;
  border-radius:50%;
  position:absolute;
  opacity:.2;
  right:-25px;
  bottom:-30px
}
.side-card {
  background:var(--soft);
  padding:25px;
  border-radius:12px;
  margin-bottom:20px
}
.avatar {
  background:var(--accent);
  color:var(--paper);
  border-radius:50%;
  height:42px;
  width:42px;
  display:grid;
  place-items:center;
  font:20px var(--serif);
  margin-bottom:18px
}
.side-card h3 {
  font-size:16px;
  margin:0 0 10px
}
.side-card p {
  color:var(--muted);
  font-size:12px;
  line-height:1.95
}
.stats {
  border-top:1px solid var(--line);
  display:flex;
  gap:30px;
  padding-top:16px;
  margin-top:20px
}
.stats strong {
  font:24px var(--serif);
  display:block
}
.stats span {
  font-size:10px;
  color:var(--muted)
}
.side-heading {
  font-size:11px;
  letter-spacing:2px;
  margin-bottom:16px
}
.note-callout {
  padding:22px;
  border:1px solid var(--line);
  border-radius:12px;
  font-size:12px;
  line-height:1.9
}
.note-callout p {
  color:var(--muted)
}
.footer {
  display:flex;
  justify-content:space-between;
  color:var(--muted);
  font-size:10px;
  padding:28px 0;
  border-top:1px solid var(--line);
  margin-top:65px;
  gap:20px
}
.empty {
  padding:35px 25px;
  border:1px dashed var(--line);
  border-radius:12px;
  text-align:center
}
.empty .icon {
  width:35px;
  height:35px;
  margin-bottom:12px;
  color:var(--muted)
}
.empty h3 {
  font:22px var(--serif);
  margin:6px
}
.empty p {
  font-size:12px;
  color:var(--muted);
  max-width:430px;
  margin:12px auto 20px
}
.starter-grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  margin-top:22px
}
.starter {
  padding:20px 15px;
  background:var(--soft);
  border-radius:10px
}
.starter strong {
  font:20px var(--serif);
  display:block;
  margin-bottom:8px
}
.starter span {
  font-size:11px;
  color:var(--muted)
}
.search-field {
  display:flex;
  align-items:center;
  gap:10px;
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:9px;
  padding:8px 12px
}
.search-field input {
  min-width:0;
  width:100%;
  border:0;
  background:transparent;
  color:var(--ink);
  outline:0;
  font-size:12px
}
.page-title {
  font:42px var(--serif);
  margin:40px 0 15px
}
.article {
  max-width:800px;
  margin:45px auto
}
.article h1 {
  font:42px/1.4 var(--serif);
  margin:22px 0
}
.article .prose {
  margin-top:35px;
  border-top:1px solid var(--line);
  padding-top:25px
}
.prose {
  font-size:15px;
  line-height:1.95;
  overflow-wrap:anywhere
}
.prose h1,.prose h2,.prose h3 {
  font-family:var(--serif);
  line-height:1.5;
  margin:1.5em 0 .6em
}
.prose a {
  color:var(--accent);
  text-decoration:underline
}
.prose img {
  max-width:100%;
  height:auto;
  border-radius:7px
}
.prose pre {
  overflow:auto;
  background:var(--soft);
  padding:18px;
  border-radius:9px;
  font-size:13px
}
.prose code {
  font-family:Consolas,monospace;
  background:var(--soft)
}
.prose table {
  display:block;
  overflow-x:auto;
  border-collapse:collapse;
  max-width:100%
}
.prose td,.prose th {
  padding:8px 14px;
  border:1px solid var(--line)
}
.prose blockquote {
  margin-left:0;
  padding:5px 20px;
  border-left:3px solid var(--accent);
  color:var(--muted)
}
.archive-item {
  display:flex;
  gap:30px;
  align-items:center;
  padding:20px 0;
  border-bottom:1px solid var(--line)
}
.archive-item time {
  font-size:12px;
  color:var(--muted);
  white-space:nowrap
}
.archive-item h3 {
  font:20px var(--serif);
  margin:0
}
.login-wrap {
  max-width:430px;
  margin:65px auto 80px
}
.login-wrap h1 {
  font:36px var(--serif)
}
label {
  display:block;
  color:var(--muted);
  font-size:12px;
  margin-bottom:17px
}
input.field,textarea.field,select.field {
  display:block;
  width:100%;
  border:1px solid var(--line);
  border-radius:8px;
  padding:11px 12px;
  color:var(--ink);
  background:var(--paper);
  margin-top:7px
}
textarea.field {
  resize:vertical;
  min-height:90px
}
.hint {
  font-size:11px;
  color:var(--muted)
}
.error {
  color:var(--danger);
  font-size:12px;
  white-space:pre-wrap
}
.workspace {
  display:grid;
  grid-template-columns:225px minmax(0,1fr);
  min-height:100vh
}
.sidebar {
  border-right:1px solid var(--line);
  padding:28px 18px;
  background:var(--paper);
  display:flex;
  flex-direction:column;
  gap:20px;
  position:sticky;
  top:0;
  height:100vh
}
.sidebar .brand {
  padding:0 8px
}
.side-nav {
  display:flex;
  flex-direction:column;
  gap:5px
}
.side-nav button {
  border:0;
  background:none;
  color:var(--muted);
  text-align:left;
  padding:10px 13px;
  border-radius:8px;
  display:flex;
  align-items:center;
  gap:10px;
  font-size:12px
}
.side-nav button.selected {
  background:var(--soft);
  color:var(--ink)
}
.side-nav button span {
  margin-left:auto;
  font-size:10px
}
.sidebar-label {
  font-size:10px;
  letter-spacing:1px;
  color:var(--muted);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 12px
}
.sidebar-bottom {
  margin-top:auto
}
.sidebar-books {
  overflow:auto;
  min-height:40px
}
.work-main {
  padding:0 38px 35px;
  min-width:0
}
.work-top {
  height:85px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px
}
.breadcrumb {
  font-size:12px;
  color:var(--muted)
}
.work-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:18px;
  margin:32px 0 24px
}
.work-header h1 {
  font:30px var(--serif);
  margin:0 0 6px
}
.work-header p {
  margin:0;
  color:var(--muted);
  font-size:12px
}
.actions {
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap
}
.overview {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px;
  margin-bottom:28px
}
.overview>div {
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--paper);
  padding:18px 22px
}
.overview strong {
  font:30px var(--serif);
  margin-right:12px
}
.overview span {
  font-size:11px;
  color:var(--muted)
}
.workspace-list {
  border:1px solid var(--line);
  border-radius:12px;
  overflow:hidden;
  background:var(--paper)
}
.list-head,.note-row {
  display:grid;
  grid-template-columns:minmax(0,1fr) 105px 105px 95px;
  gap:15px;
  align-items:center;
  padding:16px 22px
}
.list-head {
  font-size:10px;
  letter-spacing:1px;
  background:var(--soft);
  color:var(--muted)
}
.note-row {
  border-top:1px solid var(--line);
  cursor:pointer
}
.note-row:hover {
  background:var(--soft)
}
.note-row h3 {
  font-size:13px;
  margin:0;
  font-weight:500;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}
.note-row p {
  font-size:10px;
  margin:4px 0 0;
  color:var(--muted);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}
.note-row>span {
  font-size:11px;
  color:var(--muted)
}
.badge {
  font-size:10px;
  border:1px solid var(--line);
  padding:3px 8px;
  border-radius:20px;
  display:inline-flex;
  gap:5px;
  align-items:center;
  width:max-content;
  color:var(--muted)
}
.badge.public {
  background:var(--soft);
  color:var(--accent)
}
.editor-bar {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin:20px 0;
  flex-wrap:wrap
}
.title-input {
  font:32px var(--serif);
  color:var(--ink);
  width:100%;
  border:0;
  background:none;
  outline:none;
  padding:8px 0 20px
}
.editor-meta {
  display:grid;
  grid-template-columns:1fr 1fr 1fr 90px;
  gap:12px
}
.editor-meta label {
  margin-bottom:15px
}
.editor-meta .field {
  padding:7px 9px;
  font-size:12px
}
.save-status {
  font-size:11px;
  color:var(--muted)
}
.save-retry {
  border:0;
  background:none;
  color:var(--accent);
  cursor:pointer;
  font-size:inherit;
  text-decoration:underline;
  padding:0;
  font-family:inherit
}
.save-retry:hover {
  opacity:.8
}
.editor-frame {
  background:var(--paper);
  border-radius:10px;
  overflow:hidden
}
.editor-foot {
  display:flex;
  justify-content:space-between;
  gap:15px;
  margin-top:14px;
  color:var(--muted);
  font-size:10px
}
.toastui-editor-defaultUI {
  border-color:var(--line)!important
}
.toastui-editor-contents {
  font-family:var(--sans)!important
}
.toastui-editor-defaultUI-toolbar {
  background:var(--soft)!important;
  border-color:var(--line)!important
}
.toastui-editor-md-container,.toastui-editor-ww-container {
  background:var(--paper)!important
}
.settings-form {
  max-width:720px
}
.settings-form h2 {
  font:22px var(--serif);
  padding-top:15px
}
.notice {
  border:1px solid var(--line);
  background:var(--soft);
  border-radius:9px;
  padding:14px 18px;
  font-size:12px;
  color:var(--muted);
  margin:20px 0
}
.import-box {
  border:1px dashed var(--accent);
  padding:30px;
  border-radius:12px;
  text-align:center;
  margin:22px 0
}
.import-box input {
  max-width:100%;
  margin:18px 0
}
.revision {
  border-top:1px solid var(--line);
  padding:15px 0;
  display:flex;
  justify-content:space-between;
  gap:15px;
  font-size:12px
}
.revision-preview {
  max-height:220px;
  overflow:auto;
  white-space:pre-wrap;
  font-size:12px;
  background:var(--soft);
  padding:12px;
  border-radius:8px
}
#toast {
  position:fixed;
  bottom:28px;
  left:50%;
  transform:translateX(-50%);
  max-width:85vw;
  background:var(--ink);
  color:var(--bg);
  padding:12px 22px;
  border-radius:10px;
  z-index:100;
  box-shadow:var(--shadow);
  font-size:12px;
  display:none
}
dialog {
  max-width:620px;
  width:calc(100% - 35px);
  max-height:85vh;
  overflow:auto;
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--paper);
  color:var(--ink);
  padding:28px;
  box-shadow:var(--shadow)
}
dialog::backdrop {
  background:#0b152577;
  backdrop-filter:blur(3px)
}
.modal-title {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:20px
}
.modal-title h2 {
  font:23px var(--serif);
  margin:0
}
.loading {
  padding:90px;
  text-align:center;
  color:var(--muted)
}
.mobile-menu {
  display:none
}
.theme-label {
  font-size:10px;
  color:var(--muted)
}
.reader-tools {
  display:flex;
  justify-content:space-between;
  align-items:center
}
.theme-switch {
  display:flex;
  align-items:center;
  gap:8px
}
.highlight {
  background:var(--soft)!important;
  color:var(--ink)!important
}
.highlight .k,.highlight .kn,.highlight .kd {
  color:var(--accent);
  font-weight:bold
}
.highlight .s,.highlight .s1,.highlight .s2 {
  color:#809d62
}
.highlight .c,.highlight .c1 {
  color:var(--muted)
}
@media(min-width:1600px) {
  .wrap {
    max-width:1420px
  }
  .hero {
    padding:85px 0
  }
  .hero-art {
    max-width:420px;
    height:335px
  }
  .content-grid {
    gap:65px
  }
}
@media(max-width:1000px) {
  .wrap {
    padding:0 28px
  }
  .hero {
    gap:25px
  }
  .content-grid {
    grid-template-columns:minmax(0,1fr) 220px;
    gap:25px
  }
  .nav {
    gap:18px
  }
  .workspace {
    grid-template-columns:190px 1fr
  }
  .work-main {
    padding:0 24px 30px
  }
  .editor-meta {
    grid-template-columns:1fr 1fr
  }
  .list-head,.note-row {
    grid-template-columns:minmax(0,1fr) 85px 80px
  }
  .list-head>:last-child,.note-row>:last-child {
    display:none
  }
}
@media(max-width:700px) {
  .wrap {
    padding:0 20px
  }
  .topbar {
    height:75px;
    gap:10px;
    flex-wrap:wrap
  }
  .brand {
    font-size:19px;
    gap:8px
  }
  .brand small {
    font-size:8px
  }
  .brand img {
    width:30px;
    height:30px
  }
  .nav {
    order:3;
    width:100%;
    justify-content:space-between;
    border-bottom:1px solid var(--line);
    padding:12px 5px;
    background:var(--bg)
  }
  .nav a.active:after {
    bottom:-12px
  }
  .top-actions {
    gap:6px
  }
  .top-actions .btn {
    font-size:11px;
    padding:7px 10px
  }
  .theme-label {
    display:none
  }
  .hero {
    grid-template-columns:1fr;
    padding:75px 0 28px;
    gap:20px
  }
  .hero h1 {
    font-size:39px
  }
  .hero-art {
    height:185px;
    max-width:100%;
    border-radius:100px 100px 12px 12px
  }
  .hero-art svg {
    max-height:220px
  }
  .hero p {
    font-size:12px
  }
  .hero-actions {
    margin-top:20px
  }
  .content-grid {
    grid-template-columns:minmax(0,1fr)
  }
  .public-sidebar {
    display:none
  }
  .section-line small {
    display:none
  }
  .post-card {
    grid-template-columns:1fr 85px;
    gap:15px
  }
  .post-card h3 {
    font-size:19px
  }
  .post-visual {
    min-height:95px;
    font-size:33px
  }
  .footer {
    margin-top:40px;
    font-size:9px
  }
  .starter-grid {
    gap:8px
  }
  .starter {
    padding:15px 10px
  }
  .starter strong {
    font-size:17px
  }
  .article {
    margin-top:75px
  }
  .article h1 {
    font-size:32px
  }
  .page-title {
    margin-top:75px;
    font-size:34px
  }
  .login-wrap {
    margin-top:85px
  }
  .workspace {
    display:block
  }
  .sidebar {
    display:none;
    position:fixed;
    z-index:30;
    width:235px;
    box-shadow:var(--shadow)
  }
  .workspace.menu-open .sidebar {
    display:flex
  }
  .work-main {
    padding:0 17px 25px
  }
  .mobile-menu {
    display:inline-flex
  }
  .work-top {
    height:65px
  }
  .work-header {
    margin-top:25px;
    align-items:flex-start
  }
  .work-header h1 {
    font-size:25px
  }
  .work-header .actions {
    justify-content:flex-end
  }
  .overview {
    gap:8px
  }
  .overview>div {
    padding:12px
  }
  .overview strong {
    font-size:24px;
    display:block
  }
  .list-head,.note-row {
    padding:13px;
    gap:10px;
    grid-template-columns:minmax(0,1fr) 70px
  }
  .list-head>:nth-child(3),.note-row>:nth-child(3) {
    display:none
  }
  .editor-meta {
    grid-template-columns:1fr 1fr
  }
  .title-input {
    font-size:25px
  }
  .editor-foot {
    flex-direction:column;
    gap:3px
  }
  .editor-bar .btn {
    padding:7px 10px;
    font-size:11px
  }
  .work-top .top-actions .text-link {
    display:none
  }
  .toastui-editor-defaultUI-toolbar {
    flex-wrap:wrap;
    height:auto!important
  }
  .toastui-editor-toolbar-group {
    margin-right:0!important
  }
  .archive-item {
    gap:15px
  }
  .archive-item h3 {
    font-size:17px
  }
}
.sidebar .brand {
  white-space:nowrap
}
.sidebar .brand small {
  display:none
}
.mobile-public-search {
  display:none
}
@media(max-width:700px) {
  .topbar .brand small {
    display:none
  }
  .mobile-public-search {
    display:flex;
    margin-bottom:18px
  }
  .topbar .brand {
    white-space:nowrap
  }
  .work-top .theme-switch {
    gap:0
  }
}
html[data-theme=dark] .hero h1 {
  font-family:var(--sans);
  font-weight:650;
  letter-spacing:-1px
}
html[data-theme=dark] .hero-art {
  border-radius:18px;
  background:radial-gradient(ellipse at 50% 80%,#334064,#181e2b 70%)
}
html[data-theme=dark] .hero {
  background-image:linear-gradient(#667db208 1px,transparent 1px),linear-gradient(90deg,#667db208 1px,transparent 1px);
  background-size:32px 32px
}
html[data-theme=dark] .eyebrow {
  font-family:Consolas,monospace;
  color:#98a6cf
}
html[data-theme=dark] .post-visual {
  font-family:Consolas,monospace
}
@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior:auto!important;
    transition:none!important
  }
}
.post-visual img {
  width:100%;
  height:145px;
  object-fit:cover;
  display:block
}
.post-visual:has(img):after {
  display:none
}
.article-cover {
  display:block;
  width:100%;
  max-height:440px;
  object-fit:cover;
  border-radius:14px;
  margin-top:28px
}
.cover-preview {
  width:100%;
  aspect-ratio:16/9;
  background:var(--soft);
  border:1px dashed var(--line);
  border-radius:12px;
  overflow:hidden;
  display:grid;
  place-items:center;
  color:var(--muted);
  font-size:12px;
  margin:16px 0
}
.cover-preview img {
  width:100%;
  height:100%;
  object-fit:cover
}
.book-sidebar-links {
  flex-wrap:wrap
}
@media(max-width:700px) {
  .post-visual img {
    height:110px
  }
  .article-cover {
    max-height:240px
  }
}
.content-switch {
  display:grid;
  gap:7px
}
.content-switch a {
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  color:var(--muted);
  border-radius:8px
}
.content-switch a.selected {
  background:var(--soft);
  color:var(--accent)
}
.blog-workspace .sidebar {
  gap:16px
}
.article-meta {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
  border-top:1px solid var(--line);
  padding-top:16px;
  margin-bottom:8px
}
.blog-article-list {
  margin-top:24px
}
.blog-article-row {
  display:grid;
  grid-template-columns:90px minmax(0,1fr) auto;
  gap:22px;
  align-items:center;
  padding:22px 0;
  border-bottom:1px solid var(--line)
}
.blog-article-row h3 {
  font:22px/1.4 var(--serif);
  margin:0 0 8px
}
.blog-article-row p {
  font-size:12px;
  color:var(--muted);
  margin:0 0 8px;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis
}
.blog-thumb {
  height:80px;
  border-radius:10px;
  overflow:hidden;
  background:var(--soft);
  display:grid;
  place-items:center;
  color:var(--accent)
}
.blog-thumb img,.column-art img {
  width:100%;
  height:100%;
  object-fit:cover
}
.column-card {
  display:grid;
  grid-template-columns:110px minmax(0,1fr) auto;
  gap:24px;
  align-items:center;
  padding:28px 0;
  border-bottom:1px solid var(--line)
}
.column-art {
  height:100px;
  border-radius:10px;
  background:var(--soft);
  display:grid;
  place-items:center;
  color:var(--accent);
  overflow:hidden
}
.column-art>.icon {
  height:34px;
  width:34px
}
.column-card h2,.column-title {
  font:600 22px/1.5 var(--serif);
  margin:0;
  color:var(--ink);
  background:none;
  border:0;
  padding:0;
  text-align:left
}
.column-card p {
  color:var(--muted);
  font-size:13px;
  line-height:1.8;
  margin:10px 0;
  white-space:pre-wrap;
  overflow-wrap:anywhere
}
.column-card:hover h2,.column-title:hover {
  color:var(--accent)
}
.columns-page {
  min-height:60vh;
  padding-top:25px
}
.column-posts {
  max-width:900px;
  margin:40px 0
}
.column-description {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
  color:var(--muted)
}
@media(max-width:700px) {
  .article-meta {
    grid-template-columns:1fr;
    gap:0
  }
  .column-card {
    grid-template-columns:70px minmax(0,1fr);
    gap:14px
  }
  .column-card>.btn {
    grid-column:2;
    justify-self:start
  }
  .column-card>.icon {
    display:none
  }
  .column-art {
    height:70px
  }
  .column-card h2,.column-title {
    font-size:18px
  }
  .blog-article-row {
    grid-template-columns:64px minmax(0,1fr);
    gap:14px
  }
  .blog-article-row>.badge {
    grid-column:2;
    justify-self:start
  }
  .blog-article-row h3 {
    font-size:18px
  }
  .blog-thumb {
    height:64px
  }
  .public-columns {
    margin-top:25px
  }
  .columns-page {
    padding-top:40px
  }
  .nav {
    gap:12px
  }
}
.markdown-paste-dialog {
  position:fixed;
  inset:100px 24px auto auto;
  margin:0;
  width:min(390px,calc(100vw - 32px));
  padding:20px;
  border-radius:10px;
  font-size:13px
}
.markdown-paste-dialog::backdrop {
  background:#0002;
  backdrop-filter:none
}
.markdown-paste-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px
}
.markdown-paste-heading button {
  background:none;
  border:0;
  color:var(--muted);
  font-size:23px;
  line-height:1;
  cursor:pointer
}
.markdown-paste-dialog p {
  margin:12px 0 18px;
  line-height:1.8
}
.markdown-paste-dialog .actions {
  justify-content:flex-end
}
.markdown-paste-dialog .btn {
  font-size:12px;
  padding:7px 12px
}
@media(max-width:700px) {
  .markdown-paste-dialog {
    top:85px;
    right:16px
  }
}
/* Code blocks: controls/gutter never participate in editable or copied text. */
.cb-block {
  max-width:100%;
  min-width:0;
  margin:16px 0;
  border:1px solid var(--line);
  border-radius:9px;
  background:var(--soft);
  overflow:hidden;
  color:var(--ink)
}
.cb-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:7px 12px;
  background:var(--paper);
  border-bottom:1px solid var(--line);
  font:12px var(--sans);
  user-select:none
}
.cb-language,.cb-copy {
  font:12px var(--sans);
  border:1px solid var(--line);
  background:var(--paper);
  color:var(--ink);
  border-radius:5px;
  padding:4px 8px;
  max-width:100%
}
.cb-body {
  display:flex;
  min-width:0;
  align-items:stretch
}
.cb-lines {
  flex:none;
  white-space:pre;
  text-align:right;
  padding:14px 10px!important;
  color:var(--muted);
  border-right:1px solid var(--line);
  user-select:none;
  font:13px/22px Consolas,monospace!important
}
.cb-block .cb-body pre {
  margin:0!important;
  padding:14px 12px!important;
  flex:1;
  min-width:0;
  overflow-x:auto!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  font:13px/22px Consolas,monospace!important;
  white-space:pre!important;
  overflow-wrap:normal!important;
  word-break:normal!important
}
.cb-block .cb-body pre code {
  display:block;
  padding:0!important;
  margin:0!important;
  background:transparent!important;
  color:inherit;
  font:inherit!important;
  white-space:pre!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
  border:0!important
}
.cb-block .cb-body pre code:before,.cb-block .cb-body pre code:after {
  content:none!important
}
html[data-theme=dark] .cb-block {
  background:#20242e;
  color:#d5dbe7
}
html[data-theme=dark] .hljs-keyword,html[data-theme=dark] .hljs-selector-tag,html[data-theme=dark] .hljs-literal {
  color:#ff9e80
}
html[data-theme=dark] .hljs-string,html[data-theme=dark] .hljs-attr {
  color:#a8d19c
}
html[data-theme=dark] .hljs-title,html[data-theme=dark] .hljs-built_in,html[data-theme=dark] .hljs-type {
  color:#e5c07b
}
html[data-theme=dark] .hljs-comment {
  color:#9ba4b4
}
html[data-theme=dark] .hljs-number,html[data-theme=dark] .hljs-variable,html[data-theme=dark] .hljs-symbol {
  color:#b4a3f5
}
.cb-block .cb-body pre code {
  overflow:visible!important;
  max-width:none!important
}
.toastui-editor-contents .cb-toolbar,.toastui-editor-contents .cb-copy,.toastui-editor-contents .cb-language {
  color:var(--ink)!important;
  font:12px var(--sans)!important
}
/* ---------- Reading mode / immersive / full-page editing ---------- */
.read-bar {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  flex-wrap:wrap;
  margin:18px 0 10px;
  position:sticky;
  top:0;
  z-index:30;
  background:var(--bg);
  padding:8px 0;
  border-bottom:1px solid var(--line)
}
.read-bar-main {
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  min-width:0
}
.read-doc-title {
  font:600 15px var(--serif);
  color:var(--ink);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  max-width:44vw
}
.read-bar-tools {
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap
}
.read-seg {
  display:inline-flex;
  border:1px solid var(--line);
  border-radius:999px;
  overflow:hidden
}
.read-seg button {
  border:0;
  background:none;
  color:var(--muted);
  font:11px var(--sans);
  padding:6px 11px;
  cursor:pointer
}
.read-seg button.active {
  background:var(--accent);
  color:var(--paper)
}
.note-read {
  max-width:760px;
  margin:0 auto 40px;
  padding:8px 0 60px;
  font-size:15px;
  line-height:1.9
}
body[data-read-width="wide"] .note-read {
  max-width:1100px
}
body[data-read-font="small"] .note-read {
  font-size:13.5px
}
body[data-read-font="large"] .note-read {
  font-size:17.5px
}
.note-read img {
  max-width:100%;
  height:auto;
  border-radius:8px;
  cursor:zoom-in
}
.note-read pre {
  overflow-x:auto
}
.note-read table {
  display:block;
  overflow-x:auto
}
.note-read h2,.note-read h3 {
  scroll-margin-top:96px
}
.note-toc {
  border:1px solid var(--line);
  border-radius:10px;
  padding:10px 14px;
  margin:6px auto 18px;
  background:var(--paper);
  max-width:760px;
  font-size:12px
}
body[data-read-width="wide"] .note-toc {
  max-width:1100px
}
.note-toc summary {
  cursor:pointer;
  color:var(--muted)
}
.note-toc ol {
  margin:8px 0 0;
  padding-left:18px
}
.note-toc .toc-l3 {
  margin-left:18px
}
.note-toc a {
  color:var(--ink);
  text-decoration:none;
  border-bottom:1px dashed var(--line)
}
.read-empty-box {
  text-align:center;
  padding:60px 20px;
  color:var(--muted)
}
.read-empty-box .actions {
  justify-content:center;
  margin-top:16px
}
.immersive-exit {
  display:none;
  position:fixed;
  top:14px;
  right:16px;
  z-index:80;
  border:1px solid var(--line);
  background:var(--paper);
  color:var(--ink);
  border-radius:999px;
  padding:9px 16px;
  cursor:pointer;
  box-shadow:var(--shadow);
  font:12px var(--sans)
}
body.immersive .immersive-exit {
  display:inline-flex;
  align-items:center;
  gap:6px
}
body.immersive .sidebar {
  display:none
}
body.immersive .workspace {
  grid-template-columns:minmax(0,1fr)
}
body.immersive .work-top {
  display:none
}
body.immersive .work-main {
  padding:0 24px 30px;
  max-width:1200px;
  margin:0 auto
}
body.immersive .note-read {
  max-width:900px;
  padding-top:24px
}
body.immersive .note-toc {
  display:none
}
body.immersive [data-action="immersive"] {
  display:none
}
body.immersive .music-widget {
  transform:scale(.72);
  transform-origin:bottom right;
  opacity:.88
}
.img-viewer {
  position:fixed;
  inset:0;
  z-index:200;
  background:rgba(12,14,18,.92);
  display:flex;
  align-items:center;
  justify-content:center
}
.img-stage {
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  touch-action:none
}
.img-target {
  max-width:96vw;
  max-height:88vh;
  user-select:none;
  cursor:grab;
  transition:transform .12s ease-out
}
.img-target:active {
  cursor:grabbing
}
.img-tools {
  position:fixed;
  bottom:22px;
  left:50%;
  transform:translateX(-50%);
  display:flex;
  gap:8px;
  background:var(--paper);
  border-radius:999px;
  padding:8px 12px;
  box-shadow:var(--shadow)
}
.img-tools button,.img-tools a {
  border:1px solid var(--line);
  background:none;
  color:var(--ink);
  border-radius:999px;
  min-width:38px;
  height:34px;
  padding:0 12px;
  cursor:pointer;
  font:12px var(--sans);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none
}
.img-tools .img-close {
  background:var(--ink);
  color:var(--paper)
}
.editor-frame {
  overflow:visible
}
.editor-frame .toastui-editor-defaultUI {
  height:auto
}
.editor-frame .toastui-editor-main {
  height:auto;
  min-height:340px
}
.editor-frame .toastui-editor-ww-container,.editor-frame .toastui-editor-md-container {
  height:auto!important;
  min-height:340px
}
.editor-frame .toastui-editor-contents {
  min-height:320px
}
.editor-frame .toastui-editor-defaultUI-toolbar {
  position:sticky;
  top:0;
  z-index:25;
  border-radius:10px 10px 0 0
}
.editor-frame .toastui-editor-md-container .CodeMirror {
  height:auto
}
@media(max-width:700px) {
  .read-bar {
    position:static
  }
  .read-doc-title {
    max-width:100%;
    white-space:normal
  }
  .read-bar-tools {
    gap:6px
  }
  .note-read {
    font-size:14px
  }
  body[data-read-font="large"] .note-read {
    font-size:16px
  }
  .img-tools {
    gap:5px;
    padding:6px 8px
  }
  .img-tools button,.img-tools a {
    min-width:34px;
    height:32px;
    padding:0 9px;
    font-size:11px
  }
  body.immersive .work-main {
    padding:0 12px 24px
  }
  body.immersive .note-read {
    max-width:100%
  }
}
/* Column article management */
.attach-tools {
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin:12px 0
}
.attach-tools .field,#attach-search {
  flex:1;
  min-width:160px;
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:8px;
  background:var(--paper);
  color:var(--ink);
  font:13px var(--sans)
}
.attach-scope {
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  color:var(--muted);
  white-space:nowrap
}
.attach-list {
  border:1px solid var(--line);
  border-radius:10px;
  max-height:46vh;
  overflow:auto;
  margin:6px 0 10px
}
.attach-row {
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 12px;
  border-bottom:1px solid var(--line);
  font-size:13px;
  cursor:pointer
}
.attach-row:last-child {
  border-bottom:0
}
.attach-row.joined {
  opacity:.62;
  cursor:default
}
.attach-title {
  flex:1;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}
.attach-joined {
  color:var(--accent);
  font-style:normal;
  font-size:11px
}
.blog-detach {
  margin-left:6px;
  color:var(--muted)
}
/* Knowledge-base catalog view (return target from reading mode) */
.book-outline {
  max-width:820px;
  padding:30px 0 40px
}
.outline-list {
  border:1px solid var(--line);
  border-radius:12px;
  overflow:hidden;
  margin:18px 0
}
.outline-row {
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 16px;
  padding-left:calc(16px + var(--level,0) * 22px);
  border-bottom:1px solid var(--line);
  text-decoration:none;
  color:var(--ink);
  font-size:14px
}
.outline-row:last-child {
  border-bottom:0
}
.outline-row:hover {
  background:var(--soft)
}
.outline-dot {
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--accent);
  flex:0 0 auto
}
.outline-title {
  flex:1;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap
}
/* Article TOC (author switch) + editor preview */
.article-toc {
  max-width:760px;
  margin:18px auto;
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px 16px;
  background:var(--paper);
  font-size:13px
}
.article-toc summary {
  cursor:pointer;
  color:var(--muted)
}
.article-toc ol,.article-toc-preview ol {
  margin:8px 0 0;
  padding-left:0;
  list-style:none
}
.article-toc a {
  color:var(--ink);
  text-decoration:none;
  border-bottom:1px dashed var(--line);
  display:inline-block;
  padding:2px 0
}
.article-toc a:hover {
  color:var(--accent)
}
.article-toc-preview {
  margin:8px 0 14px;
  border:1px dashed var(--line);
  border-radius:10px;
  padding:8px 14px;
  font-size:12px;
  color:var(--muted)
}
.article-toc-preview li {
  list-style:none;
  padding:1px 0
}
.toc-switch {
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  color:var(--muted)
}
.note-toc .toc-l1,.note-toc .toc-l2,.note-toc .toc-l3,.note-toc .toc-l4,.note-toc .toc-l5,.note-toc .toc-l6 {
  margin-left:0
}
.toc-l1 a,.article-toc-preview .toc-l1 {
  padding-left:0
}
.toc-l2 a,.article-toc-preview .toc-l2 {
  padding-left:12px
}
.toc-l3 a,.article-toc-preview .toc-l3 {
  padding-left:24px
}
.toc-l4 a,.article-toc-preview .toc-l4 {
  padding-left:36px
}
.toc-l5 a,.article-toc-preview .toc-l5 {
  padding-left:48px
}
.toc-l6 a,.article-toc-preview .toc-l6 {
  padding-left:60px
}
.prose h1,.prose h2,.prose h3,.prose h4,.prose h5,.prose h6 {
  scroll-margin-top:24px
}
