:root {
  --paper: #f3ecd9;
  --paper-deep: #e9dfc7;
  --ink: #26372c;
  --moss: #596945;
  --sage: #a8b095;
  --rose: #a86459;
  --line: rgba(42, 57, 45, .14);
  --danger: #924f47;
  --ease: cubic-bezier(.2,.72,.2,1);
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; background: radial-gradient(circle at 80% 0, rgba(207,188,141,.22), transparent 30%), var(--paper); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.admin-bar { height: 70px; padding: max(16px, env(safe-area-inset-top)) 20px 0; display:flex; align-items:flex-start; justify-content:space-between; }
.back-link { display:inline-flex; align-items:center; gap:5px; color:var(--ink); text-decoration:none; font-size:12px; font-weight:500; letter-spacing:.06em; }
.back-link svg { width:18px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.cloud-state { display:inline-flex; align-items:center; gap:7px; color:#798374; font-size:10px; letter-spacing:.08em; }
.cloud-state i { width:7px; height:7px; border-radius:50%; background:#c5a15f; box-shadow:0 0 0 4px rgba(197,161,95,.12); }
.cloud-state.is-online i { background:#71865a; }
.cloud-state.is-error i { background:var(--danger); }
main { width:min(100%, 780px); margin:0 auto; padding:7svh 20px 80px; }
.login-view { max-width:420px; margin:0 auto; }
.login-illustration { position:relative; width:96px; height:96px; margin:0 0 28px; }
.seed { position:absolute; left:36px; top:40px; width:27px; height:36px; border:1.5px solid var(--moss); border-radius:75% 28% 70% 30%; transform:rotate(20deg); }
.leaf { position:absolute; width:29px; height:46px; border:1.5px solid var(--moss); border-radius:90% 5% 90% 5%; transform-origin:bottom center; }
.leaf--one { left:25px; top:5px; transform:rotate(-32deg); }
.leaf--two { left:55px; top:4px; transform:rotate(38deg) scale(.82); }
.section-note { margin:0 0 8px; color:#7b8474; font-size:10px; font-weight:500; letter-spacing:.16em; }
h1,h2,h3 { font-family:"Ma Shan Zheng","STKaiti",serif; font-weight:400; }
h1 { margin:0; font-size:clamp(52px,14vw,76px); line-height:1.02; }
.login-copy { margin:16px 0 30px; color:#677265; font-size:13px; line-height:1.8; }
.login-form,.publish-form { display:grid; gap:18px; }
label { display:grid; gap:8px; color:#697267; font-size:10px; font-weight:600; letter-spacing:.1em; }
input,textarea,select { width:100%; border:1px solid var(--line); border-radius:14px; outline:0; background:rgba(255,255,255,.38); color:var(--ink); font-size:13px; font-weight:400; letter-spacing:0; transition:border-color .2s,box-shadow .2s; }
input,select { height:48px; padding:0 14px; }
textarea { padding:13px 14px; resize:vertical; line-height:1.65; }
input:focus,textarea:focus,select:focus { border-color:rgba(89,105,69,.58); box-shadow:0 0 0 3px rgba(89,105,69,.08); }
.primary-button { width:100%; height:50px; padding:0 18px; display:flex; align-items:center; justify-content:space-between; border:0; border-radius:15px; background:var(--moss); color:#fffaf0; font-size:12px; font-weight:600; letter-spacing:.1em; cursor:pointer; box-shadow:0 12px 26px rgba(50,67,48,.16); }
.primary-button:disabled { opacity:.55; cursor:wait; }
.form-message { min-height:18px; margin:0; color:#6c7869; font-size:11px; line-height:1.6; }
.form-message.is-error { color:var(--danger); }
.dashboard-heading { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:42px; }
.quiet-button { padding:8px 0; border:0; border-bottom:1px solid currentColor; background:none; color:#798273; font-size:10px; letter-spacing:.1em; cursor:pointer; }
.publish-form { padding:24px; border:1px solid var(--line); border-radius:24px; background:rgba(255,255,255,.28); box-shadow:0 28px 60px rgba(61,70,52,.08); }
.field-row { display:grid; gap:18px; }
.upload-grid { display:grid; gap:12px; }
.file-drop { min-height:82px; padding:15px; display:flex; align-items:center; gap:13px; border:1px dashed rgba(76,91,67,.32); border-radius:16px; cursor:pointer; }
.file-drop__icon { width:38px; height:38px; display:grid; place-items:center; border-radius:50%; background:rgba(89,105,69,.1); color:var(--moss); font-size:18px; }
.file-drop span:last-of-type { display:grid; gap:3px; }
.file-drop b { color:var(--ink); font-size:11px; }
.file-drop small { max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#81897a; font-size:9px; font-weight:400; }
.file-drop input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.publish-actions { display:grid; gap:10px; margin-top:4px; }
.published-section { margin-top:72px; }
.published-heading { display:flex; justify-content:space-between; align-items:flex-end; padding-bottom:16px; border-bottom:1px solid var(--line); }
.published-heading h2 { margin:0; font-size:38px; }
.published-heading > span { color:#7b8474; font-size:10px; }
.published-item { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:18px; align-items:center; padding:20px 0; border-bottom:1px solid var(--line); }
.published-item__type { color:var(--rose); font-size:9px; letter-spacing:.12em; }
.published-item__title { margin:5px 0 4px; font-size:24px; }
.published-item__desc { margin:0; color:#717a6d; font-size:10px; line-height:1.6; }
.delete-button { width:38px; height:38px; display:grid; place-items:center; border:1px solid var(--line); border-radius:50%; background:transparent; color:#8c625b; cursor:pointer; }
.delete-button svg { width:17px; fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; }
.published-item__actions { display:flex; flex-direction:column; align-items:stretch; gap:7px; }
.copy-button,.edit-button { min-height:34px; padding:0 11px; border:1px solid var(--line); border-radius:999px; background:rgba(255,255,255,.24); color:var(--ink); font-size:9px; white-space:nowrap; cursor:pointer; }
.edit-state { padding:12px 14px; display:flex; align-items:center; justify-content:space-between; gap:12px; border-left:2px solid var(--rose); background:rgba(255,250,240,.32); color:#68564b; font-size:11px; }
.edit-state button { padding:5px 0; border:0; border-bottom:1px solid currentColor; background:none; color:var(--rose); font-size:10px; cursor:pointer; }
.empty-copy { padding:34px 0; text-align:center; color:#858c80; font-size:11px; }
[hidden] { display:none !important; }
@media (min-width:640px) { .field-row,.upload-grid { grid-template-columns:1fr 1fr; } main { padding-inline:30px; } }
@media (prefers-reduced-motion:reduce) { * { scroll-behavior:auto !important; transition:none !important; } }

/* Castle archive — restrained editorial skin */
:root {
  --paper: #eee4d2;
  --paper-deep: #dfcfb5;
  --ink: #241914;
  --moss: #5d3c2d;
  --sage: #a98d68;
  --rose: #843c43;
  --line: rgba(72,46,30,.17);
  --danger: #8c3540;
  font-family: "PingFang SC", "Microsoft YaHei UI", sans-serif;
  color-scheme: light;
}
body {
  background:
    linear-gradient(90deg, transparent 49.9%, rgba(91,57,34,.035) 50%, transparent 50.1%),
    radial-gradient(circle at 85% 0, rgba(153,105,60,.18), transparent 33%),
    #eee4d2;
}
.admin-bar { height: 76px; padding-inline: clamp(18px,4vw,48px); }
.back-link { letter-spacing: .12em; }
.cloud-state { color: #7d6858; }
.cloud-state.is-online i { background: #866a44; }
main { width: min(100%, 900px); padding-top: 6svh; }
.login-view { max-width: 440px; }
.login-illustration { width: 58px; height: 58px; margin-bottom: 30px; }
.login-illustration .leaf,
.login-illustration .seed { display: none; }
.login-illustration::before {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  content: "A";
  border: 1px solid rgba(92,58,35,.46);
  border-radius: 50%;
  color: #69452f;
  font: 28px Georgia, serif;
}
.section-note { color: #866d59; font-family: Georgia,serif; letter-spacing: .2em; }
h1,h2,h3 { font-family: "Songti SC", "STSong", Georgia, serif; }
h1 { font-size: clamp(42px,10vw,66px); letter-spacing: .06em; }
.login-copy { color: #766255; }
label { color: #765f50; font-weight: 500; }
input,textarea,select { border-radius: 2px; background: rgba(255,250,240,.44); }
input:focus,textarea:focus,select:focus { border-color: rgba(107,70,43,.6); box-shadow: 0 0 0 3px rgba(107,70,43,.06); }
.primary-button { border-radius: 2px; background: #3e2920; box-shadow: 0 14px 34px rgba(48,29,20,.18); }
.quiet-button { color: #796354; }
.publish-form { padding: clamp(22px,5vw,42px); border-radius: 2px; background: rgba(255,250,240,.3); box-shadow: 0 30px 80px rgba(72,46,30,.07); }
.file-drop { border-radius: 2px; }
.file-drop__icon { border-radius: 50%; background: rgba(102,67,43,.09); color: #6f4a33; }
.published-heading h2 { font-size: 34px; letter-spacing: .06em; }
.published-item { align-items: start; }
.published-item__type { color: #914952; font-family: Georgia,serif; }
.published-item__title { font-size: 22px; }
.published-item__desc { color: #79675a; }
.published-item__content {
  max-height: 132px;
  margin: 13px 0 0;
  padding: 12px 14px;
  overflow: auto;
  border-left: 2px solid rgba(129,72,70,.45);
  background: rgba(255,250,240,.32);
  color: #68564b;
  font: 10px/1.7 ui-monospace, "Cascadia Code", monospace;
  white-space: pre-wrap;
  user-select: text;
}
.delete-button { border-radius: 50%; }
@media (max-width:520px) {
  .published-item { grid-template-columns:1fr; }
  .published-item__actions { flex-direction:row; flex-wrap:wrap; }
  .copy-button,.edit-button { min-height:38px; }
}
