:root {
  font: 16px/1.55 "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #252824;
  background: #f8f4ec;
  --ink: #2f5562;
  --border: #d8d0c5;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, p, figure { margin: 0; }
a { color: var(--ink); text-underline-offset: 3px; }
header { border-bottom: 1px solid var(--border); background: #eee5d9; }
.wrap { width: min(100% - 34px, 940px); margin: 0 auto; }
.top { min-height: 65px; display: flex; justify-content: space-between; align-items: center; }
.top a { font: italic 29px/1 Georgia, serif; letter-spacing: -.045em; color: inherit; text-decoration: none; }
main { padding: 37px 0 60px; }
h1 { font-size: clamp(27px, 5vw, 42px); line-height: 1.15; }
h2 { font-size: 19px; margin-bottom: 9px; }
.status { margin: 13px 0; padding: 9px 12px; border-left: 3px solid var(--ink); background: #e8efec; color: #29423a; overflow-wrap: anywhere; }
.status:empty { display: none; }
.status.error { border-color: #a85b4c; background: #f7e6de; color: #772d20; }
.panel { border: 1px solid var(--border); background: #fffcf8; padding: clamp(15px, 3vw, 24px); min-width: 0; }
.auth { max-width: 480px; }
.auth label, .sidebar label { margin: 12px 0; }
label { display: grid; gap: 5px; font-weight: 650; font-size: 14px; min-width: 0; }
input, select, button, textarea { font: inherit; }
input, select, textarea { width: 100%; min-height: 43px; padding: 8px 10px; border: 1px solid #afa697; border-radius: 2px; color: #242824; background: white; font-weight: 400; font-size: 16px; }
textarea { resize: vertical; }
input[type=file] { padding: 6px; }
button { background: var(--ink); border: 1px solid var(--ink); color: white; min-height: 43px; padding: 8px 15px; border-radius: 2px; font-weight: 630; font-size: 14px; cursor: pointer; }
button:hover { background: #21434e; }
button:disabled { opacity: .52; cursor: not-allowed; }
button.secondary { background: transparent; color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.muted { font-size: 13px; color: #61584e; }
#admin-main.editor-active { width: min(100% - 30px, 1680px); }
.editor-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 10px 16px; margin-block: 14px; padding: 12px; }
.editor-toolbar label:first-child { min-width: 160px; }
.editor-toolbar a { padding: 9px 0; }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(264px, 322px); gap: 12px; align-items: start; }
.canvas { position: relative; background: #e7ddd0; border: 1px solid var(--border); height: clamp(540px, 76vh, 960px); overflow: hidden; }
.canvas iframe { position: absolute; top: 0; left: 50%; border: 0; background: #fff; transform-origin: top center; }
.canvas p { position: relative; z-index: 1; padding: 10px; width: fit-content; background: #fffcf3; }
.editor-switch { display: flex; gap: 7px; }
.editor-switch button[aria-pressed="false"] { color: var(--ink); background: transparent; }
.sidebar button { margin-top: 7px; }
.sidebar #publish { border-top: 1px solid var(--border); margin-top: 17px; padding-top: 15px; }
.sidebar #text-changes { margin-bottom: 5px; }
@media (max-width: 800px) {
  .editor-grid { grid-template-columns: 1fr; }
  .canvas { height: 60vh; min-height: 400px; }
  main { padding-top: 23px; }
}
