/* Necropolis editor chrome + haunted 90s themes */
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; background: #12101a; color: #e8e4f0; }
.app-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 24px; background: #1c1830; border-bottom: 2px solid #6b4fa1; }
.app-header h1 { margin: 0; font-size: 28px; letter-spacing: 1px; }
.subtitle { margin: 4px 0 0; color: #b9b0d6; font-size: 14px; }
.header-actions { display: flex; gap: 8px; flex-wrap: wrap; }
button { cursor: pointer; border: 1px solid #6b4fa1; background: #2a2342; color: #e8e4f0; border-radius: 6px; padding: 8px 12px; font-size: 14px; }
button:hover { background: #3a2f5c; }
button.primary { background: #6b4fa1; font-weight: 700; }
button.danger { border-color: #a13d3d; color: #ffb3b3; }
.layout { display: grid; grid-template-columns: 380px 1fr; gap: 0; min-height: calc(100vh - 140px); }
.editor { padding: 20px; background: #171425; border-right: 2px solid #6b4fa1; overflow-y: auto; }
.editor h2 { margin-top: 0; }
.editor h3 { margin: 22px 0 8px; color: #c9b8ff; }
.editor label { display: block; margin: 12px 0; font-size: 14px; color: #cfc6e8; }
.editor input[type=text], .editor textarea, .editor select { width: 100%; margin-top: 4px; padding: 8px; border-radius: 6px; border: 1px solid #4a3f6e; background: #211c38; color: #fff; font-size: 14px; }
.themes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.theme-swatch { padding: 10px; font-size: 13px; }
.theme-swatch.active { outline: 3px solid #ffd75e; }
.theme-swatch.mansion { background: #2b0f4d; }
.theme-swatch.pumpkin { background: #4d1f00; }
.theme-swatch.crypt { background: #0f2b1a; }
.theme-swatch.carnival { background: #3d0f38; }
.medium-box { border: 1px dashed #8a6fd0; border-radius: 8px; padding: 12px; margin-top: 18px; background: #1f1836; }
.medium-box h3 { margin: 0 0 6px; }
.medium-box p { font-size: 13px; color: #b9b0d6; margin: 0 0 10px; }
.link-row { display: flex; gap: 6px; margin-bottom: 6px; }
.link-row input { flex: 1; }
.link-add { display: flex; flex-direction: column; gap: 6px; }
.hint { font-size: 12px; color: #8f86ad; }
.preview-pane { padding: 20px; display: flex; flex-direction: column; background: #0d0b14; }
.preview-bar { display: flex; justify-content: space-between; align-items: center; }
.preview-bar h2 { margin: 0; }
.counter-badge { background: #000; color: #39ff6a; font-family: "Courier New", monospace; padding: 6px 10px; border-radius: 4px; border: 1px solid #39ff6a; }
#preview { width: 100%; height: 560px; border: 3px ridge #6b4fa1; background: #fff; margin-top: 12px; }
.preview-note { font-size: 13px; color: #8f86ad; margin: 10px 0; }
.guestbook-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.guestbook-form h3 { width: 100%; margin: 4px 0; }
.guestbook-form input { flex: 1; min-width: 160px; padding: 8px; border-radius: 6px; border: 1px solid #4a3f6e; background: #211c38; color: #fff; }
.guestbook-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.gb-entry { background: #1c1830; border-left: 3px solid #6b4fa1; padding: 8px 12px; border-radius: 4px; font-size: 14px; }
.gb-entry time { color: #8f86ad; font-size: 12px; }
.app-footer { text-align: center; padding: 12px; color: #8f86ad; font-size: 13px; border-top: 1px solid #2a2342; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #2a2342; border: 1px solid #6b4fa1; padding: 10px 18px; border-radius: 8px; z-index: 10; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }
