:root {
  --ink: #1c1b1a;
  --muted: #6b6862;
  --line: #dedbd5;
  --accent: #2f4fd8;
  --bg: #faf9f6;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; }
main { max-width: 760px; margin: 0 auto; padding: 56px 20px 24px; }
.brand { font: 700 15px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 20px; }
h1 { font: 600 44px/1.1 Georgia, "Times New Roman", serif; margin: 0 0 12px; letter-spacing: -0.01em; }
h2 { font: 600 24px/1.3 Georgia, "Times New Roman", serif; margin: 40px 0 8px; }
.lede { font-size: 20px; color: var(--muted); margin: 0 0 32px; }
code { font-size: 0.92em; background: #efede8; padding: 1px 5px; border-radius: 4px; }

#drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 56px 20px; border: 2px dashed #b9b5ad; border-radius: 16px; background: #fff; cursor: pointer; text-align: center; transition: background .15s, border-color .15s; }
#drop:hover, #drop.over { border-color: var(--accent); background: #f2f4fd; }
#drop input { display: none; }
#drop strong { font-size: 20px; }
#drop span { color: var(--muted); }

#result { margin-top: 28px; text-align: center; }
#fileinfo { color: var(--muted); margin: 0 0 16px; }
#preview img { max-width: 100%; max-height: 70vh; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: 0 4px 24px rgba(0, 0, 0, .08); }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 24px 0 8px; }
.actions button { font: inherit; font-weight: 600; padding: 12px 22px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; cursor: pointer; }
.actions button:hover { background: #243fb3; }
.actions.more { margin-top: 0; align-items: center; font-size: 15px; color: var(--muted); }
.actions.more button { padding: 6px 14px; background: transparent; color: var(--accent); border: 1px solid var(--line); font-weight: 600; }
.actions.more button:hover { background: #f2f4fd; }
.actions button:disabled { opacity: .5; cursor: progress; }
.edit-row { margin: 16px 0 0; font-size: 15px; color: var(--muted); }
.edit-row button { font: inherit; font-weight: 600; padding: 6px 14px; border: 1px solid var(--accent); border-radius: 10px; background: #fff; color: var(--accent); cursor: pointer; }
.edit-row button:hover { background: #f2f4fd; }
.edit-row span { display: block; margin-top: 6px; font-size: 14px; }
#editor { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; background: #262626; }
#editor[hidden] { display: none; }
.editor-bar { display: flex; align-items: center; gap: 16px; padding: 8px 16px; background: var(--bg); border-bottom: 1px solid var(--line); font-size: 15px; }
.editor-bar span { flex: 1; color: var(--muted); }
.editor-bar button { font: inherit; font-weight: 600; padding: 6px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; }
#editor-frame { flex: 1; width: 100%; border: 0; }
#status { color: var(--muted); min-height: 1.6em; margin: 0; }
#notes { list-style: none; padding: 0; margin: 8px auto 0; max-width: 520px; text-align: left; font-size: 15px; color: var(--muted); }
#notes li { padding: 2px 0; }
#notes li:not(.notes-head)::before { content: "· "; }
#notes .notes-head { color: var(--ink); }
#error { margin: 20px 0 0; padding: 12px 16px; border: 1px solid #e3b4b4; border-radius: 10px; background: #fdf3f3; color: #8d1d1d; }

.privacy { margin: 28px 0 0; font-size: 15px; color: var(--muted); text-align: center; }
.guide { margin-top: 56px; border-top: 1px solid var(--line); }
.guide ol { padding-left: 22px; }
footer { max-width: 760px; margin: 0 auto; padding: 24px 20px 48px; font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); }
footer a, .guide a { color: var(--accent); }
@media (max-width: 560px) { h1 { font-size: 34px; } main { padding-top: 36px; } }

/* Visit-counting question (public/analytics.js). The links only show when analytics is on. */
.if-analytics { display: none; }
html.has-analytics .if-analytics { display: revert; }
.consent { position: fixed; z-index: 9; right: 16px; bottom: 16px; max-width: min(26rem, calc(100vw - 32px)); padding: 16px; background: #fff; border: 1px solid #ccc; border-radius: 8px; box-shadow: 0 4px 16px rgb(0 0 0 / 0.15); }
.consent p { margin: 0 0 12px; }
.consent .btn-row { display: flex; gap: 8px; }
