/* BGIS Admin. */
body.admin { background: var(--panel); min-height: 100vh; }
input, textarea { font-weight: 500; }
input:focus, textarea:focus, select:focus { outline: 3px solid var(--sky); outline-offset: 1px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.toast { position: fixed; left: 50%; bottom: 24px; translate: -50% 0; z-index: 80; width: max-content; max-width: calc(100vw - 32px); padding: 14px 20px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 8px; box-shadow: 5px 5px 0 var(--lime); animation: toastIn .3s both; }
.toast .ms { font-size: 20px; color: var(--lime); }
.err, .ok { margin-top: 14px; padding: 10px 14px; border-radius: 12px; background: var(--err-bg); border: 2px solid var(--orange-d); font-weight: 600; font-size: 14.5px; color: var(--err); }
.ok { background: var(--lime-l); border-color: var(--ok); color: #1c5312; }

/* ---- fields ------------------------------------------------------------ */
.field { margin-top: 14px; font-size: 14px; }
.field > label, .lbl, .img-label { display: block; font-weight: 700; font-size: 14px; }
.field > label:not(.spread) > span:not(.auto), .img-label > span { font-weight: 500; color: var(--muted); }
.field > input, .pw > input, .field > textarea { display: block; width: 100%; margin-top: 8px; height: 52px; padding: 0 14px; border-radius: 12px; border: var(--b); font-size: 16px; background: #fff; color: var(--ink); }
.field > textarea { height: auto; padding: 12px 14px; font-size: 16px; line-height: 1.5; resize: vertical; }
.field > input.in-48 { height: 48px; padding: 0 12px; }
.field > input.in-cap { height: 44px; padding: 0 10px; border: var(--b2); border-radius: 10px; }
.field > input.in-title { font-size: 17px; font-weight: 600; }
.pw { position: relative; margin-top: 8px; }
.pw > input { margin: 0; padding-right: 56px; }
.pw button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; padding: 0; border-radius: 9px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.pw button:hover { background: var(--panel2); }

/* ---- sign in ----------------------------------------------------------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background-color: #fff; background-image: linear-gradient(var(--grid) 1.5px, transparent 1.5px), linear-gradient(90deg, var(--grid) 1.5px, transparent 1.5px); background-size: 44px 44px; }
.auth-card { width: 100%; max-width: 440px; min-width: 0; border-radius: 28px; border: var(--b); background: #fff; box-shadow: 10px 10px 0 var(--ink); padding: clamp(26px, 5vw, 40px); }
.auth-head { display: flex; align-items: center; gap: 14px; }
.auth-head img { height: 60px; width: auto; }
.auth-t { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: 34px; line-height: .9; }
.auth-s { font-size: 14px; font-weight: 600; color: var(--muted); margin-top: 4px; }
.auth-card .field { margin-top: 16px; }
.auth-card form > .field:first-of-type { margin-top: 28px; }
.auth-card h1 { margin: 26px 0 0; font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: 30px; line-height: .95; }
.auth-card form > p { margin: 8px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--body2); font-weight: 500; }
.auth-card h1 ~ .field:first-of-type { margin-top: 18px; }
.btn-main { margin-top: 22px; width: 100%; height: 56px; border-radius: 14px; background: var(--orange); border: var(--b); box-shadow: 5px 5px 0 var(--ink); font-weight: 700; font-size: 17px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.btn-main:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); color: var(--ink); }
.auth-link, .auth-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; font-size: 14.5px; }
.auth-link { margin-top: 4px; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 18px; }
.auth-back { display: flex; width: max-content; text-decoration: none; }
.auth-back .ms { font-size: 18px; }
.code-done { margin-top: 20px; padding: 16px; border-radius: 14px; background: var(--lime-l); border: var(--b); }
.code-done-t { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; }
.code-done-t .ms { color: var(--ok); }
.code-done p { margin: 8px 0 0; font-size: 14.5px; line-height: 1.5; font-weight: 500; color: var(--body2); }
.code-row { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.code-row code { padding: 10px 14px; border-radius: 10px; background: #fff; border: var(--b2); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: clamp(14px, 4vw, 17px); font-weight: 700; letter-spacing: .04em; }
.panel > .code-row code { background: var(--cream); }

/* ---- top bar ----------------------------------------------------------- */
.bar { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: var(--b); }
.bar-in { max-width: 1400px; margin: 0 auto; padding: 10px clamp(16px, 3vw, 32px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; }
.bar-brand { display: flex; align-items: center; gap: 12px; min-height: 46px; text-decoration: none; font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: 26px; line-height: 1; }
.bar-brand:hover { color: var(--ink); }
.bar-brand img { height: 46px; width: auto; }
.bar nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 700; font-size: 14.5px; }
.bar nav a, .bar nav button { height: 44px; padding: 0 14px; border-radius: 999px; border: 2px solid transparent; background: #fff; font-weight: 700; font-size: 14.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; white-space: nowrap; }
.bar nav a:hover { border-color: var(--ink); color: var(--ink); }
.bar nav .ms { font-size: 19px; }
.bar nav a.is-on { background: var(--yellow); border-color: var(--ink); }
.bar nav a.bar-view { border-color: var(--ink); }
.bar nav a.bar-view:hover { background: var(--lime); }
.bar nav .bar-out { border-color: var(--ink); background: var(--ink); color: #fff; }
.bar form { display: contents; }
@media (max-width: 860px) {
  .bar { position: static; }
  .bar nav { width: 100%; }
}
@media (max-width: 480px) {
  .bar nav { display: grid; grid-template-columns: repeat(6, 1fr); }
  .bar nav a, .bar nav button { grid-column: span 2; justify-content: center; padding: 0 6px; font-size: 13.5px; border-color: var(--dash); min-width: 0; }
  .bar nav a:nth-of-type(2) { grid-column: span 4; order: 1; }
  .bar nav a:nth-of-type(1) { grid-column: span 2; }
  .bar nav a:nth-of-type(3) { order: 2; } .bar nav a.bar-view { order: 3; } .bar nav .bar-out { order: 4; }
}

/* ---- shared page pieces ------------------------------------------------ */
.main { max-width: 1400px; margin: 0 auto; padding: clamp(24px, 4vw, 44px) clamp(16px, 3vw, 32px) 80px; }
.main-narrow { max-width: 640px; }
.main-edit { padding-top: clamp(20px, 3vw, 36px); padding-bottom: 120px; }
.h1 { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(44px, 5vw, 72px); line-height: .88; margin: 0; }
.h2 { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 28px; line-height: 1.2; margin: 0; }
.h2-acc { margin: 0; font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: 30px; line-height: .95; }
.lead { margin: 10px 0 0; font-size: 16px; font-weight: 500; color: var(--body2); max-width: 720px; line-height: 1.45; }
.note { margin: 6px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); font-weight: 500; }
.panel { border-radius: 22px; border: var(--b); background: #fff; }
.panel-pad { padding: 24px; display: block; }
.panel-pad > .field:first-of-type { margin-top: 0; }
.btn-save { margin-top: 20px; height: 52px; padding: 0 22px; border-radius: 14px; border: var(--b); background: var(--orange); box-shadow: 4px 4px 0 var(--ink); font-weight: 700; font-size: 16px; cursor: pointer; }
.btn-sm { min-height: 44px; padding: 0 14px; border-radius: 12px; border: var(--b2); background: #fff; font-weight: 700; font-size: 14.5px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; color: var(--ink); position: relative; }
.btn-sm:hover { color: var(--ink); background: var(--panel2); }
.btn-sm .ms { font-size: 19px; }
.btn-yellow, .btn-yellow:hover { background: var(--yellow); }
.btn-sky, .btn-sky:hover { background: var(--sky); }
.btn-red, .btn-red:hover { color: var(--orange-d); }
.btn-icon { width: 44px; padding: 0; }
.btn-danger, .btn-danger:hover { background: var(--orange-d); color: #fff; }
.code-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* ---- articles list ----------------------------------------------------- */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.count { margin: 8px 0 0; font-size: 15.5px; font-weight: 600; color: var(--muted); }
.btn-new { height: 54px; padding: 0 22px; border-radius: 14px; background: var(--orange); border: var(--b); box-shadow: 4px 4px 0 var(--ink); font-weight: 700; font-size: 16px; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.btn-new:hover { color: var(--ink); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.filters { margin-top: 24px; border-radius: 22px; border: var(--b); background: #fff; padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.filters-top { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.search { flex: 1 1 320px; min-width: 0; display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 0 0 12px; border-radius: 12px; border: var(--b); background: #fff; }
.search:focus-within { outline: 3px solid var(--sky); outline-offset: 1px; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0 !important; background: none; font-size: 16px; color: var(--ink); -webkit-appearance: none; appearance: none; text-overflow: ellipsis; }
.search input::-webkit-search-cancel-button { display: none; }
.search-x { width: 44px; height: 44px; display: grid; place-items: center; text-decoration: none; }
.search-x .ms { width: 32px; height: 32px; border-radius: 8px; background: var(--panel2); display: grid; place-items: center; font-size: 18px; }
.seg { display: flex; border: var(--b); border-radius: 12px; overflow: hidden; flex: none; max-width: 100%; }
.seg label { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; height: 45px; padding: 0 14px; font-weight: 700; font-size: 14.5px; cursor: pointer; position: relative; }
.seg label + label { border-left: var(--b2); }
.seg label span { font-weight: 600; color: var(--muted); }
.seg label.is-on { background: var(--yellow); }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg label:focus-within { outline: 3px solid #1d6fa5; outline-offset: -3px; }
.filters-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; align-items: end; }
.filters-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); min-width: 0; }
.filters-grid select { width: 100%; height: 46px; padding: 0 12px; border-radius: 12px; border: var(--b2); background: #fff; font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer; }
@media (max-width: 400px) { .filters-grid { grid-template-columns: 1fr 1fr; } .filters { padding: 14px; } .seg { width: 100%; } .seg label { padding: 0 8px; font-size: 14px; } }
.filters-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 8px; min-height: 24px; font-size: 14.5px; font-weight: 600; color: var(--body2); }
.clear { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--orange-d); }
.rows { margin-top: 16px; border-radius: 22px; border: var(--b); background: #fff; overflow: hidden; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; padding: 16px 18px; }
.row + .row { border-top: 2px solid var(--grid2); }
.row-img { position: relative; width: 112px; aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; border: var(--b2); flex: none; }
.row-text { flex: 1 1 280px; min-width: 0; }
.row-t { font-weight: 700; font-size: 17.5px; line-height: 1.3; overflow-wrap: anywhere; }
.row-meta { margin-top: 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.row-slug { overflow-wrap: anywhere; }
.pl { padding: 3px 10px; border-radius: 999px; border: var(--b2); color: var(--ink); white-space: nowrap; }
.pl-seo { padding: 3px 8px; border-width: 1.5px; }
.row-btns { display: flex; gap: 8px; flex: none; }
.row-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: none; font-weight: 700; font-size: 14.5px; }
.rows-empty { padding: 48px 20px; text-align: center; font-weight: 600; color: var(--muted); }
@media (max-width: 560px) {
  .row { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; padding: 14px; align-items: start; }
  .row-img { width: 84px; }
  .row-btns, .row-confirm { grid-column: 1 / -1; }
  .row-btns .btn-sm:not(.btn-icon) { flex: 1; }
}
.pager { margin-top: 16px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.pager label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--body2); }
.pager select { height: 44px; padding: 0 10px; border-radius: 10px; border: var(--b2); background: #fff; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.pages { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.page { min-width: 44px; height: 44px; padding: 0 8px; border-radius: 10px; border: var(--b2); background: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14.5px; text-decoration: none; }
.page .ms { font-size: 20px; }
.page.is-on { background: var(--yellow); }
.page.is-off { opacity: .35; }
.page.is-gap { border-color: transparent; background: none; }

/* ---- cover templates --------------------------------------------------- */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 22px; margin-top: 28px; }
.tpl-card { border-radius: 24px; border: var(--b); background: #fff; overflow: hidden; }
.tpl-card.is-default { box-shadow: 8px 8px 0 var(--ink); }
.tpl-img { position: relative; aspect-ratio: 4/3; border-bottom: var(--b); }
.tpl-body { padding: 18px 20px 20px; }
.tpl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.tpl-head h2 { flex: 1; min-width: 0; margin: 0; font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: 30px; line-height: 1.05; }
.tpl-head span { flex: none; padding: 4px 10px; border-radius: 999px; background: var(--lime); border: var(--b2); font-weight: 700; font-size: 13px; }
.tpl-body p { margin: 8px 0 0; font-size: 14.5px; color: var(--muted); font-weight: 500; }
.tpl-minis { display: flex; gap: 6px; margin-top: 12px; }
.tpl-minis > div { position: relative; flex: 1; aspect-ratio: 4/3; border-radius: 8px; overflow: hidden; border: var(--b2); }
.tpl-btn { margin-top: 14px; width: 100%; height: 48px; border-radius: 12px; border: var(--b); background: #fff; font-weight: 700; font-size: 15px; cursor: pointer; }
.tpl-btn:hover { background: var(--yellow); }
.tpl-btn.is-on { background: var(--lime); }

/* ---- editor ------------------------------------------------------------ */
.edit-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; }
.edit-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.back { width: 46px; height: 46px; flex: none; border-radius: 12px; border: var(--b2); background: #fff; display: grid; place-items: center; text-decoration: none; }
.edit-title h1 { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(34px, 4vw, 54px); line-height: 1; white-space: nowrap; margin: 0; }
.edit-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.eb { height: 50px; padding: 0 18px; border-radius: 14px; border: var(--b); background: #fff; font-weight: 700; font-size: 15px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; color: var(--ink); }
.eb:hover { color: var(--ink); background: var(--panel2); }
.eb .ms { font-size: 20px; }
.eb-main { padding: 0 22px; background: var(--orange); box-shadow: 4px 4px 0 var(--ink); transition: transform .15s, box-shadow .15s; }
.eb-main:hover { background: var(--orange); transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.eb[disabled] { opacity: .5; cursor: wait; }
@media (max-width: 560px) { .edit-btns { width: 100%; } .edit-btns .eb { flex: 1 1 auto; padding: 0 12px; } .edit-btns .eb-main { flex-basis: 100%; } }
.edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; margin-top: 22px; align-items: start; }
.edit-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.panel-edit { padding: clamp(18px, 2.6vw, 28px); min-width: 0; }
.edit-aside { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
@media (min-width: 1080px) { .edit-aside { max-height: calc(100vh - 112px); overflow-y: auto; overscroll-behavior: contain; padding: 0 2px 6px 0; scrollbar-width: thin; } }
@media (max-width: 1079.98px) {
  .edit-grid { grid-template-columns: minmax(0, 1fr); }
  .edit-aside { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: start; }
}
.auto { margin-left: 8px; padding: 2px 7px; border-radius: 6px; background: var(--sky); border: 1.5px solid var(--ink); font-size: 11px; font-weight: 700; letter-spacing: .08em; vertical-align: middle; color: var(--ink); }
.auto-banner { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 14px; border-radius: 14px; background: var(--sky-l); border: var(--b2); }
.auto-banner > div { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 600; line-height: 1.45; flex: 1 1 300px; min-width: 0; }
.auto-banner > div .ms { color: #1d6fa5; }
.auto-banner .btn-sm { font-size: 14px; }
.slug { display: flex; align-items: center; margin-top: 8px; height: 48px; border-radius: 12px; border: var(--b); overflow: hidden; background: #fff; }
.slug:focus-within { outline: 3px solid var(--sky); outline-offset: 1px; }
.slug > span { padding: 0 10px; height: 100%; display: flex; align-items: center; background: var(--panel2); border-right: var(--b2); font-size: 13.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.slug > input { flex: 1; min-width: 0; height: 100%; border: 0; padding: 0 12px; font-size: 16px; color: var(--ink); background: #fff; outline: 0 !important; }
.body-head { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 14px; }
.wp { display: flex; border: var(--b2); border-radius: 10px; overflow: hidden; }
.wp button { height: 34px; padding: 0 14px; border: 0; background: #fff; font-weight: 700; font-size: 13.5px; cursor: pointer; }
.wp button + button { border-left: var(--b2); }
.wp button.is-on { background: var(--yellow); }
.body-box { margin-top: 8px; border: var(--b); border-radius: 12px; overflow: hidden; background: #fff; }
.body-box:focus-within { outline: 3px solid var(--sky); outline-offset: 1px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px; border-bottom: var(--b2); background: var(--panel); }
.toolbar button { min-width: 38px; height: 36px; padding: 0 10px; border-radius: 8px; border: var(--b2); background: #fff; cursor: pointer; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 1px; }
.toolbar button:hover { background: var(--yellow); }
.toolbar b { font-weight: 800; }
.toolbar i { font-family: Georgia, serif; font-weight: 700; }
.toolbar u { font-weight: 700; }
.toolbar .a1 { font-weight: 700; font-size: 13px; } .toolbar .a2 { font-weight: 700; font-size: 17px; } .toolbar .a3 { font-weight: 700; font-size: 14px; }
.toolbar .sep { width: 2px; height: 24px; background: var(--dash); margin: 0 4px; }
.toolbar .tip { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.body-box textarea { display: block; width: 100%; min-height: 260px; padding: 14px; border: 0; font-size: 16px; line-height: 1.6; resize: vertical; color: var(--ink); background: #fff; outline: 0 !important; }
.body-preview { margin-top: 8px; border: var(--b); border-radius: 12px; padding: 20px 22px; min-height: 320px; max-height: 680px; overflow: auto; background: #fff; overflow-wrap: break-word; }
.body-preview p { font-size: 17px; line-height: 1.7; color: var(--body); margin: 0 0 18px; }
.body-preview h3 { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 30px; line-height: .95; margin: 28px 0 12px; }
.body-preview ul { margin: 0 0 18px; padding-left: 22px; font-size: 17px; line-height: 1.6; color: var(--body); }
.body-preview li { margin-bottom: 6px; }
.body-preview blockquote { margin: 20px 0; padding: 16px 18px; border-radius: 14px; background: var(--quote); border: var(--b2); font-size: 18px; line-height: 1.5; font-weight: 600; }
.pv-img { margin: 20px 0; }
.pv-img img { display: block; width: 100%; height: 200px; object-fit: contain; border-radius: 14px; border: var(--b2); background: var(--panel2); }
.pv-img span { display: block; margin-top: 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.pv-cta { margin: 20px 0; padding: 12px 16px; border-radius: 12px; border: 2px dashed var(--ink); background: var(--sky-l); font-size: 14px; font-weight: 700; }
.pv-empty { font-weight: 600; color: var(--muted); }
.txt-small { font-size: .85em; } .txt-big { font-size: 1.25em; } .txt-xl { font-size: 1.5em; }
.hints { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; font-weight: 600; color: var(--body2); }
.hints span { padding: 5px 10px; border-radius: 8px; background: var(--panel2); }
.photo-sum { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 14px; border-radius: 14px; background: var(--cream); border: var(--b2); font-size: 14.5px; font-weight: 700; }
.photo-sum.has-main { background: var(--lime-l); }
.photo-sum > span { display: inline-flex; align-items: center; gap: 8px; }
.photo-sum > i { font-style: normal; font-weight: 500; color: var(--body2); }
.img-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 18px; margin-top: 16px; align-items: start; }
.img-grid > div { min-width: 0; }
.img-label em { margin-left: 6px; padding: 2px 8px; border-radius: 6px; background: var(--orange); border: 1.5px solid var(--ink); font-size: 11px; font-style: normal; font-weight: 700; letter-spacing: .08em; }
.img-main { position: relative; margin-top: 8px; aspect-ratio: 16/9; border-radius: 16px; overflow: hidden; border: var(--b); }
.img-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
label:has(input[type=file]:focus-visible) { outline: 3px solid #1d6fa5; outline-offset: 2px; }
.gal { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.gal:empty { display: none; }
.gal-item { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 8px; border-radius: 14px; border: var(--b2); background: #fafafc; }
.gal-item.is-moving { opacity: .5; }
.gal-thumb { flex: none; width: 72px; height: 56px; border-radius: 8px; background: #eaeaf0 center/contain no-repeat; }
.gal-text { flex: 1 1 180px; min-width: 0; }
.gal-tag { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.gal-tag .in-text { color: var(--ok); }
.gal-text input { width: 100%; margin-top: 4px; height: 34px; padding: 0 10px; border-radius: 8px; border: var(--b2); font-size: 13.5px; color: var(--ink); background: #fff; }
.gal-btns { display: flex; flex-wrap: wrap; gap: 6px; flex: 0 1 auto; }
.gal-btns button { height: 34px; padding: 0 10px; border-radius: 9px; border: var(--b2); background: #fff; cursor: pointer; font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.gal-btns button:hover { background: var(--yellow); }
.gal-btns button[disabled] { opacity: .35; cursor: default; background: #fff; }
.gal-btns .sq { width: 34px; padding: 0; }
.gal-btns .sq .ms { font-size: 18px; }
.gal-btns .ins { background: var(--lime); }
.gal-btns .ins .ms { font-size: 17px; }
.gal-btns .del { color: var(--orange-d); }
.drop { min-height: 84px; margin-top: 10px; padding: 12px; border-radius: 14px; border: 2.5px dashed var(--ink); background: #fff; font-weight: 700; font-size: 14.5px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; position: relative; }
.drop.is-over { background: var(--sky-l); }
.drop > span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.drop > span + span { font-weight: 500; font-size: 13px; color: var(--muted); }
.busy { margin-top: 12px; font-weight: 700; font-size: 14px; color: #1d6fa5; }
.tpl-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 12px; margin-top: 14px; }
.tpl-opts label { position: relative; padding: 8px; border-radius: 16px; border: var(--b); background: #fff; cursor: pointer; font-weight: 700; font-size: 14px; }
.tpl-opts input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.tpl-opts label:has(:checked) { background: var(--yellow); box-shadow: 4px 4px 0 var(--ink); }
.tpl-opts label:has(:focus-visible), .cat-opts label:has(:focus-visible) span { outline: 3px solid #1d6fa5; outline-offset: 2px; }
.tpl-opt-img { display: block; position: relative; aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; border: var(--b2); margin-bottom: 8px; }
@media (max-width: 420px) { .tpl-opts { grid-template-columns: 1fr 1fr; } }
.lbl { margin-top: 14px; }
.cat-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cat-opts label { position: relative; }
.cat-opts input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cat-opts span { display: inline-flex; align-items: center; height: 44px; padding: 0 14px; border-radius: 999px; border: var(--b2); background: #fff; font-weight: 700; font-size: 14.5px; }
.cat-opts :checked + span { background: var(--c); }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 0 14px; margin-top: 2px; }
.spread { display: flex !important; justify-content: space-between; gap: 10px; }

[data-mt], [data-md] { color: var(--muted); } .is-long { color: var(--orange-d) !important; }
.panel-side { padding: 18px; min-width: 0; }
.side-t { font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.card-pv { margin-top: 12px; border-radius: 20px; border: var(--b); overflow: hidden; box-shadow: 5px 5px 0 var(--ink); background: #fff; }
.card-pv-img { position: relative; aspect-ratio: 4/3; border-bottom: var(--b); }
.card-pv-body { padding: 16px 18px 18px; overflow-wrap: anywhere; }
.card-pv-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.card-pv-meta span:first-child { padding: 3px 9px; border-radius: 999px; border: var(--b2); color: var(--ink); font-weight: 700; }
.card-pv-t { margin-top: 10px; font-family: var(--display); font-weight: 800; text-transform: uppercase; font-size: 26px; line-height: .95; }
.card-pv-x { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--body2); }
.serp { margin-top: 12px; font-family: Arial, sans-serif; overflow-wrap: anywhere; }
.serp-u { font-size: 13px; color: #202124; }
.serp-t { font-size: 19px; color: #1a0dab; margin-top: 4px; line-height: 1.3; }
.serp-d { font-size: 14px; color: #4d5156; margin-top: 4px; line-height: 1.5; }
.side-seo { display: flex; justify-content: space-between; align-items: center; }
.seo-pill { padding: 3px 10px; border-radius: 999px; border: var(--b2); font-weight: 700; font-size: 13px; }
.checks { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.checks > div { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; font-weight: 600; line-height: 1.35; }
.checks .ms { font-size: 20px; color: var(--disabled); font-variation-settings: 'FILL' 1; font-weight: 400; }
.checks .is-ok .ms { color: var(--ok); }

/* live covers: all templates are present, one is shown */
.live .cover-t { display: none; }
.live[data-tpl=A] .cover-a, .live[data-tpl=B] .cover-b, .live[data-tpl=C] .cover-c { display: block; }
.live.has-img .cover-t { display: none; }

/* touch and small screens: every control at least 44px */
@media (pointer: coarse), (max-width: 1079.98px) {
  .wp button, .toolbar button, .gal-btns button, .gal-text input { height: 44px; }
  .toolbar button, .gal-btns .sq { min-width: 44px; width: auto; }
  .gal-text input { font-size: 16px; }
  .gal-btns { gap: 8px; }
  .gal-thumb { width: 96px; height: 76px; }
}
@media (max-width: 560px) { .gal-item { padding: 10px; } .gal-text { flex-basis: 120px; } .gal-btns { width: 100%; } .gal-btns button { flex: 1 1 auto; } .toolbar .tip { display: none; } }
