:root {
  color-scheme: dark;
  --ground: #101f17;
  --panel: #1c3025;
  --cream: #f6ecd8;
  --muted: #c8c9b4;
  --gold: #e1c288;
  --line: #ad905b7a;
  --serif: Iowan Old Style, Georgia, "Songti TC", serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 15% 0%, #293f32, transparent 55%), var(--ground);
  color: var(--cream);
  font: 16px/1.55 system-ui, -apple-system, sans-serif;
}
.shell { width: min(920px, calc(100% - 40px)); margin: auto; }
header {
  min-height: 67px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.brand { font: 600 19px/1.1 var(--serif); letter-spacing: .08em; }
.brand span, a { color: var(--gold); }
header a { font-size: 14px; }
main { padding-block: 20px 50px; }
h1 { font: 600 47px/1.18 var(--serif); }
h2 { margin: 0; font: 600 26px/1.32 var(--serif); }
h1 { margin: 10px 0 24px; }
.panel {
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.access { max-width: 500px; }
.hint { margin: 4px 0 10px; color: var(--muted); font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; min-height: 44px; padding: 7px 14px; border-radius: 5px; white-space: nowrap; }
button:disabled { opacity: .6; cursor: default; }
.gold { border: 1px solid #f3d99c; background: linear-gradient(#f2d996, #ccaa6e); color: #182117; font-weight: 700; }
.quiet { color: var(--gold); background: transparent; border: 1px solid var(--line); }
button:hover:not(:disabled) { filter: brightness(1.12); }
input, select, textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 45px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #122219;
  color: var(--cream);
}
:focus-visible { outline: 2px solid #efd59a; outline-offset: 2px; }
input::file-selector-button {
  margin-right: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #314738;
  color: var(--cream);
}
label { display: block; margin-bottom: 5px; color: var(--gold); font-weight: 600; }
.sign-in-row, .section-head, .publish-row, .manager li {
  display: flex;
  gap: 12px;
  align-items: center;
}
.section-head, .manager li { justify-content: space-between; }
.section-head { margin-bottom: 12px; }
.list-head { margin-top: 25px; }
fieldset { margin: 0; padding: 0; border: none; min-width: 0; }
.editor { display: grid; grid-template-columns: minmax(215px, 1fr) minmax(0, 1.5fr); gap: 22px; }
.details-column label:not(:first-child) { margin-top: 12px; }
.preview {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 4.6;
  margin-top: 12px;
  border: 1px dashed var(--line);
  border-radius: 5px;
  overflow: hidden;
  color: var(--muted);
  background: #15271e;
  text-align: center;
}
.preview img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.publish-row { margin-top: 14px; flex-wrap: wrap; }
.status { margin: 7px 0 0; color: var(--muted); }
.status:empty { display: none; }
.manager { margin: 0; padding: 0; list-style: none; }
.manager li { padding: 12px 3px; border-bottom: 1px solid var(--line); }
.manager strong { overflow-wrap: anywhere; }
.card-state { display: block; font-size: 13px; color: var(--muted); }
@media (max-width: 620px) {
  h1 { font-size: 38px; }
  .shell { width: calc(100% - 26px); }
  .panel { padding: 15px; }
  .editor { grid-template-columns: 1fr; gap: 15px; }
  .preview { max-width: 250px; }
}

.cover-editor {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr);
  gap: 17px;
  align-items: center;
}
.feature-preview {
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #15271e;
}
.feature-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
#feature-save { margin-top: 7px; }
@media (max-width: 460px) {
  .cover-editor { grid-template-columns: 1fr; }
  .feature-preview { max-width: 125px; }
}

.share-editor {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
#share-preview-heading { margin: 0 0 5px; color: var(--gold); font-size: 16px; }
.share-preview-card { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #122219; }
.share-preview-art { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; background: #263d30; color: var(--muted); font-size: 14px; }
.share-preview-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.share-preview-content { padding: 12px; overflow-wrap: anywhere; }
.share-preview-content p { margin: 0; color: var(--muted); font-size: 13px; }
.share-preview-content strong { display: block; margin-block: 3px; }
@media (max-width: 620px) {
  .share-editor { grid-template-columns: 1fr; gap: 16px; }
}
