.gm-body { overflow: hidden; }
.gm-header {
  height: 86px;
  padding: 13px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(232,220,186,.97);
  border-bottom: 2px solid var(--ink);
}
.gm-header h1 { font-size: 28px; }
.gm-header nav { display: flex; align-items: center; gap: 18px; font: 12px "Microsoft YaHei", sans-serif; }
.gm-header a { color: var(--blue); }
#save-status { color: var(--muted); }

.gm-workspace {
  height: calc(100vh - 86px);
  display: grid;
  grid-template-columns: 270px minmax(440px, 1fr) 330px;
  background: var(--paper);
}
.gm-sidebar, .gm-operations {
  overflow: auto;
  background: rgba(231,219,186,.97);
}
.gm-sidebar { border-right: 1px solid var(--rule); display: flex; flex-direction: column; }
.gm-operations { border-left: 1px solid var(--rule); }
.gm-sidebar section, .gm-operations section { padding: 16px; border-bottom: 1px solid rgba(72,65,53,.28); }
.gm-sidebar .grow { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.gm-sidebar h2, .gm-operations h2 { margin: 0 0 10px; font-size: 14px; letter-spacing: .1em; }
.split-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.split-heading button { padding: 4px 7px; }

.inline-form { display: flex; gap: 6px; }
.inline-form input:first-child { flex: 1; }
.inline-form input[type="color"] { width: 40px; padding: 2px; }
button {
  color: var(--ink);
  background: rgba(249,240,210,.7);
  border: 1px solid var(--rule);
  padding: 7px 10px;
  cursor: pointer;
}
button:hover { color: var(--red); border-color: var(--red); }
button:disabled { opacity: .45; cursor: not-allowed; }

#gm-place-list { margin: 10px 0 0; padding: 0; list-style: none; overflow: auto; }
#gm-place-list button {
  width: 100%;
  display: grid;
  grid-template-columns: 48px 1fr 22px;
  gap: 6px;
  text-align: left;
  border: 0;
  border-bottom: 1px dashed rgba(72,65,53,.24);
  background: transparent;
}
#gm-place-list button.active { color: var(--red); background: rgba(255,249,226,.6); }
#gm-place-list small { font-family: "Courier New", monospace; color: var(--muted); }

.gm-editor { overflow: auto; padding: 20px 26px 40px; }
.editor-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.editor-heading h2 { margin: 0; font-size: 25px; }

.archive-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 15px; }
.archive-form .wide { grid-column: 1 / -1; }
textarea {
  width: 100%;
  padding: 9px;
  resize: vertical;
  color: var(--ink);
  background: rgba(255,249,226,.54);
  border: 1px solid var(--rule);
}
.checkbox-field { display: flex; align-items: center; gap: 8px; }
.checkbox-field input { width: auto; accent-color: var(--red); }
.checkbox-field span { margin: 0; }
.secret-field { padding: 10px; border-left: 3px solid var(--red); background: rgba(143,46,51,.06); }

.stack-form { display: grid; gap: 9px; }
fieldset { margin: 0; border: 1px solid var(--rule); }
legend { color: var(--muted); font-size: 11px; }
.check-list { display: grid; gap: 5px; }
.check-list label { display: flex; gap: 7px; font-size: 12px; }
.check-list input { width: auto; }
.compact-list { padding: 0; margin: 9px 0 0; list-style: none; font-size: 12px; }
.compact-list li { padding: 5px 0; border-bottom: 1px dashed rgba(72,65,53,.25); }
.subheading { margin: 15px 0 5px; color: var(--muted); font-size: 12px; letter-spacing: .1em; }
.compact-list button { margin-left: 6px; padding: 2px 5px; font-size: 11px; }
.publish-button { border: 2px solid var(--red); color: var(--red); }

.login-panel {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgba(44,42,36,.72);
  backdrop-filter: blur(3px);
}
.login-panel.authenticated { display: none; }
.login-panel form {
  width: min(420px, calc(100vw - 30px));
  padding: 28px;
  background: var(--paper-light);
  border: 2px solid var(--ink);
  box-shadow: 12px 15px 0 rgba(37,36,31,.35);
}
.login-panel h2 { margin: 5px 0 8px; font-size: 25px; }
.login-panel p { line-height: 1.6; }
.login-panel button { width: 100%; margin-top: 14px; color: var(--red); border: 2px solid var(--red); }
.error-text { min-height: 1.2em; color: var(--red); font-size: 12px; }

@media (max-width: 1050px) {
  .gm-body { overflow: auto; }
  .gm-workspace { height: auto; grid-template-columns: 240px 1fr; }
  .gm-operations { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .gm-header nav span { display: none; }
  .gm-workspace { grid-template-columns: 1fr; }
  .gm-sidebar { max-height: 320px; }
  .gm-operations { display: block; }
  .archive-form { grid-template-columns: 1fr; }
  .archive-form .wide { grid-column: auto; }
}
