/* админка блога: оформление (шрифты и цвета — из blog.css) */
body.adm { background: var(--paper); }
.topbar { position: sticky; top: 0; z-index: 30; background: var(--ink); color: #fff; }
.topbar__in { display: flex; align-items: center; gap: 12px; min-height: 64px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.topbar__title { font: 600 16px var(--font-head); margin-right: auto; text-decoration: none; color: #fff; }
.topbar .btn--ghost { color: #fff; box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / .3); }
.topbar form { margin: 0; }
.page { padding: 24px 0 96px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.muted { color: var(--muted); }
.btn--sm { min-height: 40px; }

/* вход и настройка */
body.auth { display: grid; place-items: center; min-height: 100vh; padding: 24px 0; }
.authbox { width: min(440px, 92vw); background: var(--card); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 32px 28px; }
.authbox h1 { margin: 0 0 18px; font: 700 26px/1.2 var(--font-head); letter-spacing: -.02em; }
.fld { display: block; margin-bottom: 14px; }
.fld span { display: block; margin-bottom: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
.fld input, .fld select { width: 100%; min-height: 46px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; font: inherit; font-size: 16px; background: #faf9f5; }
.fld input:focus, .fld select:focus, .capin:focus { outline: none; border-color: var(--text); background: #fff; }
.chk { display: flex; gap: 10px; align-items: center; margin: 4px 0 18px; font-size: 14.5px; }
.chk input { width: 20px; height: 20px; accent-color: var(--accent); }
.msg { margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; font-size: 14.5px; }
.msg--err { background: #fde4e1; color: #b42318; }
.qr { display: grid; place-items: center; margin: 14px 0; padding: 14px; background: #fff; border-radius: 14px; box-shadow: inset 0 0 0 1.5px var(--line); }
.qr canvas, .qr img, .qr table { max-width: 220px; height: auto; }
code.secret { font-size: 15px; display: inline-block; line-height: 1.7; }
code.secret .g { display: inline-block; margin-right: .5em; white-space: nowrap; }
.codes { list-style: none; margin: 14px 0 22px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.codes code { display: block; padding: 8px 10px; background: #f1efe8; border-radius: 8px; text-align: center; font-size: 15px; }

/* список заметок */
.tools2 { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.tools2 input[type=search], .tools2 select { min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font: inherit; }
.tools2 input[type=search] { min-width: 240px; flex: 1 1 240px; }
.tools2 form { display: flex; gap: 8px; margin: 0; }
.spacer { flex: 1; }
.stat { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1.5px solid var(--line); }
.tbl td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 15px; }
.tbl td.t a { font-weight: 700; text-decoration: none; }
.tbl td.t a:hover { color: var(--accent); }
.tbl .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.tbl .act { white-space: nowrap; text-align: right; }
.lnk { border: 0; background: transparent; padding: 6px 8px; font: 600 13.5px var(--font); color: var(--accent); cursor: pointer; text-decoration: none; border-radius: 8px; }
.lnk:hover { background: var(--accent-soft); }
.lnk--del { color: #b42318; }
.rt { font-weight: 700; }
.st { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: #eee; }
.st--pub { background: #e1f5e8; color: #14733a; } .st--draft { background: #fff1cf; color: #8a5a00; }
.st--hidden { background: #e8e8ec; color: #55555c; } .st--sched { background: #e3ecfb; color: #274b91; }
@media (max-width: 760px) { .tbl thead { display: none; } .tbl tr { display: grid; padding: 10px 0; border-bottom: 1px solid var(--line); } .tbl td { border: 0; padding: 3px 12px; } .tbl .act { text-align: left; } }

/* редактор */
.app { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; padding: 28px 0 80px; }
.titlein { width: 100%; border: 0; background: transparent; font: 700 clamp(26px, 4vw, 40px)/1.15 var(--font-head); letter-spacing: -.02em; padding: 4px 0 14px; outline: none; color: var(--text); }
.titlein::placeholder { color: #b9b6ad; }
.blocks { display: grid; gap: 14px; margin-top: 8px; }
.block { border: 1.5px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.block__bar { display: flex; align-items: center; gap: 4px; padding: 6px 8px 6px 14px; background: #faf9f5; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.block__bar .sp { margin-left: auto; }
.ib { min-width: 36px; min-height: 36px; border: 0; background: transparent; border-radius: 8px; cursor: pointer; font: 600 15px var(--font); color: var(--text); }
.ib:hover { background: var(--line); }
.block__body { padding: 14px; }
.tools { display: flex; gap: 2px; margin-bottom: 8px; flex-wrap: wrap; }
.tools .ib { font-size: 14px; border: 1px solid var(--line); background: #fff; }
textarea.txt, textarea.html { width: 100%; border: 0; outline: none; font: inherit; font-size: 17px; line-height: 1.6; resize: none; background: transparent; color: var(--text); }
textarea.html { font: 13.5px/1.5 ui-monospace, Menlo, monospace; background: #f6f5f0; padding: 10px; border-radius: 8px; }
.block--photo img.pv { width: 100%; max-height: 420px; object-fit: contain; border-radius: 10px; background: #f1efe8; display: block; }
.capin { width: 100%; margin-top: 10px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; font-size: 15px; background: #faf9f5; }
.meta { margin-top: 8px; font-size: 13px; color: var(--muted); }
.meta.err { color: #b42318; }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.thumbs figure { margin: 0; position: relative; }
.thumbs img { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; display: block; background: #eee; }
.thumbs .x { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgb(0 0 0 / .65); color: #fff; cursor: pointer; }
.addrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.addrow .btn { min-height: 44px; padding: 0 16px; font-size: 15px; }
.drop { margin-top: 14px; border: 2px dashed #cfcbbf; border-radius: 14px; padding: 22px; text-align: center; color: var(--muted); font-size: 15px; cursor: pointer; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.empty { color: var(--muted); padding: 18px 0; text-align: center; }
aside .card { margin-bottom: 16px; padding: 18px; }
aside h3 { margin: 0 0 12px; font: 600 15px var(--font-head); }
.chips2 { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chipx { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 6px 0 12px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; }
.chipx button { border: 0; background: transparent; color: #fff; cursor: pointer; width: 22px; height: 22px; border-radius: 50%; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.quick button { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font: 500 13px var(--font); }
.quick button:hover { border-color: var(--text); }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; font-weight: 600; font-size: 15px; }
.switch input { width: 22px; height: 22px; accent-color: var(--accent); }
.ratebox { margin-top: 10px; padding: 14px; background: #faf9f5; border-radius: 12px; }
.ratebox[hidden] { display: none; }
.ratebox .big { display: flex; align-items: center; gap: 14px; }
.ratebox #rateNum { font: 700 28px var(--font-head); }
.ratebox input[type=range] { width: 100%; accent-color: var(--accent); }
.ratebox .hint { font-size: 12.5px; color: var(--muted); line-height: 1.45; margin-top: 8px; }
#rateBadge .rate { font-size: 15px; vertical-align: baseline; }
.slugline { font-size: 13px; color: var(--muted); word-break: break-all; margin-top: -4px; }
.tg { opacity: .55; } .tg small { display: block; color: var(--muted); font-size: 12.5px; }
.panel { margin-top: 22px; }
.panel h2 { font: 600 18px var(--font-head); margin: 0 0 12px; }
.panel h2 small { font: 400 13px var(--font); color: var(--muted); }
.previewbox { background: var(--paper); border: 1.5px dashed #cfcbbf; border-radius: var(--radius); padding: 8px 24px 24px; }
.previewbox .post { border: 0; padding: 20px 0 0; }
.srcedit { width: 100%; min-height: 220px; background: #17171a; color: #d9d7cf; border: 0; border-radius: 12px; padding: 16px; font: 13.5px/1.55 ui-monospace, Menlo, monospace; resize: vertical; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 14px 20px; border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 50; max-width: 92vw; font-size: 15px; }
.toast a { color: #ffb4ab; }
.toast[hidden] { display: none; }
@media (max-width: 960px) { .app { grid-template-columns: 1fr; } }

.wc-map-controls { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:4px 0 12px; }
.wc-map-controls small { flex-basis:100%; color:var(--muted); }
.wc-map-controls .wc-map-action, .wc-point-dialog .wc-map-action { min-height:44px; padding:8px 12px; font-size:13px; border:1px solid var(--line); background:var(--paper); white-space:normal; }
.wc-point-dialog { width:min(780px,94vw); padding:14px; border:1px solid var(--line); border-radius:16px; background:var(--card); }
.wc-point-dialog[open] { display:grid; grid-template-rows:auto 1fr; gap:8px; height:min(610px,90dvh); }
.wc-point-dialog::backdrop { background:rgb(0 0 0 / .52); }
.wc-point-dialog iframe { width:100%; height:100%; min-height:0; border:0; }
.wc-point-dialog-head { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.wc-point-dialog-head h2 { margin:0; font-size:21px; }
