/*
 * Mobile News Publisher – app styles.
 * Mobile first. Everything is scoped under .mnp so it can also live inside a theme page.
 * Bengali: system fonts only (no downloads) — Noto Sans Bengali / Hind Siliguri / Kalpurush / SolaimanLipi / Nikosh / Vrinda.
 */

.mnp {
	--p: var(--mnp-primary, #c8102e);
	--on-p: var(--mnp-on-primary, #ffffff);
	--p-soft: #fbe9ec;
	--p-soft: color-mix(in srgb, var(--p) 10%, var(--surface));
	--bg: #f1f2f4;
	--surface: #ffffff;
	--surface-2: #f7f8f9;
	--text: #14171c;
	--muted: #5b6470;
	--line: #dcdfe4;
	--soft: #eaecef;
	--danger: #c62828;
	--ok: #16794a;
	--warn: #9a5b00;
	--info: #1f5fbf;
	--radius: 14px;
	--radius-s: 10px;
	--hdr-h: 54px;
	--nav-h: 62px;
	--bar-h: 66px;
	--shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 2px 8px rgba(16, 24, 40, .06);
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Bengali", "Hind Siliguri", "Kalpurush", "SolaimanLipi", "Nikosh", "Siyam Rupali", "Vrinda", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
	--fs: 16px;

	font-family: var(--font);
	font-size: var(--fs);
	line-height: 1.55;
	color: var(--text);
	background: var(--bg);
	-webkit-text-size-adjust: 100%;
	-webkit-tap-highlight-color: transparent;
	text-align: left;
}

@media (prefers-color-scheme: dark) {
	.mnp:not([data-theme="light"]) {
		--p-soft: #3a1a20;
		--p-soft: color-mix(in srgb, var(--p) 22%, var(--surface));
		--bg: #0f1114;
		--surface: #181b20;
		--surface-2: #1f2329;
		--text: #eceef1;
		--muted: #9aa3ae;
		--line: #2c313a;
		--soft: #242932;
		--danger: #ef6b6b;
		--ok: #4cc38a;
		--warn: #e0a24a;
		--info: #6ea2f2;
		--shadow: 0 1px 2px rgba(0, 0, 0, .4);
	}
}
.mnp[data-theme="dark"] {
	--p-soft: #3a1a20;
	--p-soft: color-mix(in srgb, var(--p) 22%, var(--surface));
	--bg: #0f1114; --surface: #181b20; --surface-2: #1f2329; --text: #eceef1; --muted: #9aa3ae;
	--line: #2c313a; --soft: #242932; --danger: #ef6b6b; --ok: #4cc38a; --warn: #e0a24a; --info: #6ea2f2;
	--shadow: 0 1px 2px rgba(0, 0, 0, .4);
}
.mnp[data-fs="s"] { --fs: 15px; }
.mnp[data-fs="l"] { --fs: 18px; }

body.mnp-standalone { margin: 0; background: #f1f2f4; }
@media (prefers-color-scheme: dark) { body.mnp-standalone { background: #0f1114; } }

.mnp *, .mnp *::before, .mnp *::after { box-sizing: border-box; }
/* Base resets use :where() so they have zero specificity and never beat component classes. */
:where(.mnp) :is(button, input, select, textarea) { font: inherit; color: inherit; }
:where(.mnp) a { color: var(--p); }
:where(.mnp) :is(h1, h2, h3, p) { margin: 0; }
.mnp [hidden] { display: none !important; }
.mnp :focus-visible { outline: 3px solid color-mix(in srgb, var(--p) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
.mnp svg.mnp-i { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }

@media (prefers-reduced-motion: reduce) { .mnp * { animation: none !important; transition: none !important; } }

/* ---------- splash / spinner ---------- */
.mnp-splash { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); }
.mnp-splash img { border-radius: 16px; }
.mnp-splash strong { color: var(--text); font-size: 20px; }
.mnp-spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--soft); border-top-color: var(--p); animation: mnp-spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes mnp-spin { to { transform: rotate(360deg); } }
.mnp-center { display: flex; justify-content: center; padding: 28px 0; }

/* ---------- shell ---------- */
.mnp-shell { min-height: 100vh; min-height: 100dvh; max-width: 760px; margin: 0 auto; background: var(--bg); position: relative; }
.mnp-embedded .mnp-shell { min-height: 80vh; }
.mnp-hdr { position: sticky; top: 0; z-index: 30; height: calc(var(--hdr-h) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 8px 0; display: flex; align-items: center; gap: 4px; background: var(--surface); border-bottom: 1px solid var(--line); }
.mnp-hdr__title { flex: 1; min-width: 0; font-size: 18px; font-weight: 700; line-height: 1.3; padding: 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mnp-hdr__brand { display: flex; align-items: center; gap: 8px; }
.mnp-hdr__brand img { width: 28px; height: 28px; border-radius: 7px; }
.mnp-hdr__actions { display: flex; align-items: center; gap: 2px; }
.mnp-iconbtn { appearance: none; border: 0; background: transparent; width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text); font-size: 18px; position: relative; }
.mnp-iconbtn:active { background: var(--soft); }
.mnp-iconbtn .mnp-dot { position: absolute; top: 9px; right: 9px; }
.mnp-main { padding: 14px 14px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); }
.mnp-main.mnp-has-bar { padding-bottom: calc(var(--bar-h) + 28px + env(safe-area-inset-bottom)); }
.mnp-main.mnp-no-nav { padding-bottom: 28px; }

.mnp-netbar { position: sticky; top: calc(var(--hdr-h) + env(safe-area-inset-top)); z-index: 25; background: #3b2f00; color: #fff3c4; padding: 8px 14px; font-size: 14px; line-height: 1.4; display: flex; gap: 10px; align-items: center; }
.mnp-netbar small { display: block; opacity: .85; }

/* ---------- bottom navigation ---------- */
.mnp-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.mnp-nav__in { max-width: 760px; margin: 0 auto; height: var(--nav-h); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; }
.mnp-nav__item { appearance: none; border: 0; background: none; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: 12px; line-height: 1.2; cursor: pointer; text-decoration: none; }
.mnp-nav__item svg.mnp-i { width: 24px; height: 24px; }
.mnp-nav__item[aria-current="page"] { color: var(--p); font-weight: 700; }
.mnp-nav__new { margin-top: -22px; }
.mnp-nav__new span.mnp-fab { width: 60px; height: 60px; border-radius: 50%; background: var(--p); color: var(--on-p); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px color-mix(in srgb, var(--p) 45%, transparent), 0 0 0 5px var(--surface); }
.mnp-nav__new span.mnp-fab svg.mnp-i { width: 30px; height: 30px; stroke-width: 2.5; }
.mnp-nav__new:active span.mnp-fab { transform: scale(.96); }
body.mnp-kb .mnp-nav, body.mnp-kb .mnp-actionbar { display: none; }

/* ---------- toast ---------- */
.mnp-toasts { position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + 14px + env(safe-area-inset-bottom)); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.mnp-toasts.mnp-toasts--bar { bottom: calc(var(--bar-h) + 16px + env(safe-area-inset-bottom)); }
.mnp-toast { pointer-events: auto; max-width: 520px; width: 100%; background: #1d2127; color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 6px 24px rgba(0, 0, 0, .25); font-size: 15px; line-height: 1.45; display: flex; gap: 10px; align-items: flex-start; border-left: 5px solid #8892a0; }
.mnp-toast--success { border-left-color: #35c07a; }
.mnp-toast--error { border-left-color: #ff6b6b; }
.mnp-toast--warn { border-left-color: #ffc14d; }
.mnp-toast button { margin-left: auto; appearance: none; border: 0; background: none; color: #ffd9de; font-weight: 700; cursor: pointer; padding: 0 0 0 8px; }

/* ---------- buttons & fields ---------- */
.mnp-btn { appearance: none; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); min-height: 48px; padding: 10px 18px; border-radius: 12px; font-weight: 700; font-size: 16px; line-height: 1.2; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.mnp-btn:active { transform: translateY(1px); }
.mnp-btn[disabled] { opacity: .55; cursor: not-allowed; }
.mnp-btn--primary { background: var(--p); border-color: var(--p); color: var(--on-p); }
.mnp-btn--danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.mnp-btn--ghost { background: transparent; }
.mnp-btn--soft { background: var(--soft); border-color: transparent; }
.mnp-btn--block { display: flex; width: 100%; }
.mnp-btn--lg { min-height: 56px; font-size: 17px; border-radius: 14px; }
.mnp-btn--sm { min-height: 38px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.mnp-btn--link { border: 0; background: none; color: var(--p); min-height: 36px; padding: 4px 6px; }

.mnp-field { display: block; margin-bottom: 14px; }
.mnp-label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; color: var(--text); }
.mnp-hint { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.mnp-input, .mnp-textarea, .mnp-select { width: 100%; min-height: 50px; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 16px; line-height: 1.4; }
.mnp-textarea { resize: vertical; min-height: 90px; }
.mnp-input:focus, .mnp-textarea:focus, .mnp-select:focus { border-color: var(--p); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--p) 20%, transparent); }
.mnp-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.mnp-row { display: flex; gap: 10px; }
.mnp-row > * { flex: 1; min-width: 0; }
.mnp-counter { font-size: 12px; color: var(--muted); text-align: right; margin-top: 3px; }
.mnp-counter.is-over { color: var(--danger); font-weight: 700; }

.mnp-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 16px; cursor: pointer; }
.mnp-check input { width: 22px; height: 22px; accent-color: var(--p); flex: none; }
.mnp-flags { display: grid; grid-template-columns: 1fr; gap: 8px; }
.mnp-flag { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); min-height: 52px; cursor: pointer; font-weight: 600; }
.mnp-flag small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.mnp-flag input { position: absolute; opacity: 0; pointer-events: none; }
.mnp-flag .mnp-sw { width: 46px; height: 28px; border-radius: 14px; background: var(--line); position: relative; flex: none; transition: background .15s; }
.mnp-flag .mnp-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.mnp-flag input:checked + .mnp-sw { background: var(--p); }
.mnp-flag input:checked + .mnp-sw::after { transform: translateX(18px); }
.mnp-flag:has(input:checked) { border-color: var(--p); background: var(--p-soft); }
.mnp-flag:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--p) 55%, transparent); }

.mnp-card { background: var(--surface); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); margin-bottom: 12px; }
.mnp-card > h2 { font-size: 17px; margin-bottom: 10px; }
.mnp-sub { font-size: 14px; color: var(--muted); }
.mnp-err { color: var(--danger); font-size: 14px; margin: 8px 0; line-height: 1.45; }

/* ---------- status chip ---------- */
.mnp-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 2px 9px 2px 8px; border-radius: 99px; background: var(--soft); color: var(--muted); line-height: 1.6; white-space: nowrap; }
.mnp-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mnp-status--draft { color: #4b5563; }
.mnp-status--pending { color: var(--warn); background: color-mix(in srgb, var(--warn) 13%, var(--surface)); }
.mnp-status--publish { color: var(--ok); background: color-mix(in srgb, var(--ok) 13%, var(--surface)); }
.mnp-status--future { color: var(--info); background: color-mix(in srgb, var(--info) 13%, var(--surface)); }
.mnp-status--trash { color: var(--danger); background: color-mix(in srgb, var(--danger) 11%, var(--surface)); }
.mnp-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--p); display: inline-block; }
.mnp-tag-flag { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 6px; background: var(--p); color: var(--on-p); }
.mnp-tag-flag--soft { background: var(--p-soft); color: var(--p); }

/* ---------- login ---------- */
.mnp-login { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); max-width: 440px; margin: 0 auto; }
.mnp-login__brand { text-align: center; margin-bottom: 26px; }
.mnp-login__brand img, .mnp-login__logo { width: 76px; height: 76px; border-radius: 18px; margin: 0 auto 10px; }
.mnp-login__logo { display: flex; align-items: center; justify-content: center; background: var(--p); color: var(--on-p); font-size: 38px; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.mnp-login__brand h1 { font-size: 24px; line-height: 1.3; }
.mnp-login__brand p { color: var(--muted); margin-top: 4px; }
.mnp-pw { position: relative; }
.mnp-pw .mnp-iconbtn { position: absolute; right: 3px; top: 3px; }
.mnp-pw .mnp-input { padding-right: 52px; }

/* ---------- home ---------- */
.mnp-greet { margin: 2px 2px 14px; }
.mnp-greet h2 { font-size: 20px; line-height: 1.35; }
.mnp-greet p { color: var(--muted); font-size: 14px; }
.mnp-hero { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border: 0; cursor: pointer; background: var(--p); color: var(--on-p); border-radius: 18px; padding: 18px; margin-bottom: 14px; box-shadow: 0 6px 18px color-mix(in srgb, var(--p) 32%, transparent); }
.mnp-hero__plus { width: 54px; height: 54px; border-radius: 16px; background: color-mix(in srgb, var(--on-p) 20%, transparent); display: flex; align-items: center; justify-content: center; flex: none; }
.mnp-hero__plus svg.mnp-i { width: 30px; height: 30px; stroke-width: 2.6; }
.mnp-hero strong { display: block; font-size: 20px; line-height: 1.3; }
.mnp-hero span.mnp-hero__steps { display: block; font-size: 13px; opacity: .9; margin-top: 3px; line-height: 1.45; }
.mnp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.mnp-stat { background: var(--surface); border-radius: 14px; padding: 10px 8px; text-align: center; box-shadow: var(--shadow); border: 0; cursor: pointer; }
.mnp-stat b { display: block; font-size: 24px; line-height: 1.2; }
.mnp-stat span { font-size: 12.5px; color: var(--muted); }
.mnp-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mnp-tile { appearance: none; border: 0; background: var(--surface); border-radius: 16px; min-height: 104px; padding: 12px 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; box-shadow: var(--shadow); cursor: pointer; font-weight: 700; font-size: 14px; line-height: 1.3; text-align: center; position: relative; color: var(--text); }
.mnp-tile:active { transform: scale(.97); }
.mnp-tile__emoji { font-size: 30px; line-height: 1; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.mnp-tile__badge { position: absolute; top: 8px; right: 8px; min-width: 22px; height: 22px; border-radius: 11px; padding: 0 6px; background: var(--p); color: var(--on-p); font-size: 12px; display: flex; align-items: center; justify-content: center; }
.mnp-banner { display: flex; gap: 12px; align-items: flex-start; background: var(--p-soft); border: 1.5px solid color-mix(in srgb, var(--p) 35%, var(--line)); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; line-height: 1.5; }
.mnp-banner .mnp-btn { margin-top: 8px; }
.mnp-banner--info { background: color-mix(in srgb, var(--info) 10%, var(--surface)); border-color: color-mix(in srgb, var(--info) 35%, var(--line)); }

/* ---------- lists ---------- */
.mnp-search { position: relative; margin-bottom: 10px; }
.mnp-search svg.mnp-i { position: absolute; left: 14px; top: 15px; color: var(--muted); }
.mnp-search .mnp-input { padding-left: 42px; padding-right: 42px; }
.mnp-search .mnp-iconbtn { position: absolute; right: 3px; top: 3px; }
.mnp-filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; margin: 0 -14px; padding-left: 14px; padding-right: 14px; scrollbar-width: none; }
.mnp-filters::-webkit-scrollbar { display: none; }
.mnp-fchip { appearance: none; flex: none; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); border-radius: 99px; padding: 7px 14px; min-height: 40px; font-weight: 600; font-size: 14px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.mnp-fchip b { font-weight: 700; color: var(--muted); font-size: 12.5px; }
.mnp-fchip[aria-pressed="true"] { background: var(--p); border-color: var(--p); color: var(--on-p); }
.mnp-fchip[aria-pressed="true"] b { color: inherit; opacity: .9; }
.mnp-seg { display: inline-flex; background: var(--soft); border-radius: 12px; padding: 3px; margin-bottom: 10px; }
.mnp-seg button { appearance: none; border: 0; background: none; padding: 7px 16px; border-radius: 9px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--muted); min-height: 38px; }
.mnp-seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.mnp-news { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden; }
.mnp-news__top { display: flex; gap: 12px; padding: 12px; cursor: pointer; }
.mnp-news__thumb { width: 84px; height: 84px; border-radius: 10px; object-fit: cover; background: var(--soft); flex: none; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.mnp-news__body { flex: 1; min-width: 0; }
.mnp-news__title { font-weight: 700; font-size: 16.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.mnp-news__meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-top: 6px; font-size: 13px; color: var(--muted); }
.mnp-news__actions { display: flex; flex-wrap: wrap; border-top: 1px solid var(--line); }
.mnp-news__actions button, .mnp-news__actions a { flex: 1; appearance: none; border: 0; background: none; min-height: 46px; font-weight: 700; font-size: 14.5px; color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.mnp-news__actions button + button, .mnp-news__actions a + button, .mnp-news__actions button + a { border-left: 1px solid var(--line); }
.mnp-news__actions .is-danger { color: var(--danger); }
.mnp-news__actions .is-ok { color: var(--ok); }
.mnp-news__actions .is-wide { flex: 1 0 100%; border-bottom: 1px solid var(--line); }
.mnp-news__actions .is-wide + * { border-left: 0 !important; }
.mnp-empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.mnp-empty .mnp-empty__ico { font-size: 40px; margin-bottom: 8px; opacity: .8; }
.mnp-empty p { margin-bottom: 14px; }

/* ---------- editor ---------- */
.mnp-ed__state { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.mnp-ed__state .mnp-saved { display: inline-flex; align-items: center; gap: 6px; }
.mnp-ed__title { width: 100%; border: 0; border-bottom: 2px solid var(--line); background: transparent; padding: 8px 2px 12px; font-size: 24px; line-height: 1.45; font-weight: 800; resize: none; overflow: hidden; border-radius: 0; min-height: 64px; }
.mnp-ed__title:focus { outline: none; border-bottom-color: var(--p); }
.mnp-ed__title::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); font-weight: 600; }
.mnp-sec { margin-top: 18px; }
.mnp-sec > .mnp-label { display: flex; justify-content: space-between; align-items: center; }

.mnp-feat { border: 2px dashed var(--line); border-radius: 16px; background: var(--surface); }
.mnp-feat__empty { appearance: none; width: 100%; border: 0; background: none; padding: 26px 12px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); cursor: pointer; min-height: 140px; justify-content: center; font-weight: 700; font-size: 16px; }
.mnp-feat__empty svg.mnp-i { width: 36px; height: 36px; color: var(--p); }
.mnp-feat--has { border-style: solid; border-color: transparent; background: transparent; }
.mnp-feat__img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; background: var(--soft); }
.mnp-feat__tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.mnp-feat__tools .mnp-btn { min-height: 44px; padding: 6px 4px; font-size: 13.5px; flex-direction: column; gap: 2px; }

.mnp-rt { border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); }
.mnp-rt:focus-within { border-color: var(--p); }
.mnp-rt__bar { position: sticky; top: calc(var(--hdr-h) + env(safe-area-inset-top)); z-index: 12; display: flex; gap: 2px; padding: 6px; overflow-x: auto; background: var(--surface-2); border-bottom: 1px solid var(--line); border-radius: 13px 13px 0 0; scrollbar-width: none; }
.mnp-rt__bar::-webkit-scrollbar { display: none; }
.mnp-rt__btn { appearance: none; border: 0; background: none; width: 42px; height: 42px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex: none; cursor: pointer; color: var(--text); font-weight: 800; }
.mnp-rt__btn[aria-pressed="true"] { background: var(--p-soft); color: var(--p); }
.mnp-rt__btn:active { background: var(--soft); }
.mnp-rt__sep { width: 1px; background: var(--line); margin: 6px 4px; flex: none; }
.mnp-rt__sel { appearance: none; border: 0; background: var(--surface); border-radius: 10px; height: 42px; padding: 0 10px; font-size: 14.5px; font-weight: 700; flex: none; max-width: 120px; }
.mnp-rt__area { min-height: 260px; padding: 14px 14px 20px; font-size: 18px; line-height: 1.8; outline: none; overflow-wrap: anywhere; }
.mnp-rt__area:empty::before, .mnp-rt__area[data-empty="1"]::before { content: attr(data-ph); color: var(--muted); pointer-events: none; display: block; }
.mnp-rt__area p { margin: 0 0 .9em; }
.mnp-rt__area h2 { font-size: 1.35em; line-height: 1.45; margin: 1em 0 .5em; }
.mnp-rt__area h3 { font-size: 1.15em; line-height: 1.45; margin: 1em 0 .5em; }
.mnp-rt__area ul, .mnp-rt__area ol { margin: 0 0 .9em; padding-left: 1.5em; }
.mnp-rt__area blockquote { margin: 0 0 .9em; padding: 4px 14px; border-left: 4px solid var(--p); background: var(--surface-2); color: var(--muted); }
.mnp-rt__area figure { margin: .6em 0 1em; text-align: center; border-radius: 10px; }
.mnp-rt__area figure img { max-width: 100%; height: auto; border-radius: 8px; display: block; margin: 0 auto; }
.mnp-rt__area figure[contenteditable="false"] { cursor: pointer; outline: 2px dashed transparent; }
.mnp-rt__area figure[contenteditable="false"]:active { outline-color: var(--p); }
.mnp-rt__area figcaption { font-size: .8em; color: var(--muted); padding-top: 4px; }
.mnp-rt__foot { display: flex; justify-content: space-between; padding: 6px 14px 10px; font-size: 12.5px; color: var(--muted); }

.mnp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.mnp-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--p-soft); color: var(--text); border-radius: 99px; padding: 4px 4px 4px 12px; font-size: 14.5px; font-weight: 600; min-height: 36px; }
.mnp-chip button { appearance: none; border: 0; background: color-mix(in srgb, var(--p) 18%, transparent); width: 28px; height: 28px; border-radius: 50%; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--text); }
.mnp-inline { display: flex; gap: 8px; }
.mnp-inline .mnp-input { flex: 1; }

.mnp-acc { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 12px; }
.mnp-acc > summary { list-style: none; cursor: pointer; padding: 0 14px; min-height: 54px; display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.mnp-acc > summary::-webkit-details-marker { display: none; }
.mnp-acc > summary .mnp-acc__chev { margin-left: auto; transition: transform .15s; color: var(--muted); }
.mnp-acc[open] > summary .mnp-acc__chev { transform: rotate(180deg); }
.mnp-acc__body { padding: 4px 14px 14px; }
.mnp-acc > summary small { font-weight: 400; color: var(--muted); font-size: 13px; }

.mnp-gal { display: grid; gap: 10px; margin-bottom: 10px; }
.mnp-gal__item { display: grid; grid-template-columns: 84px 1fr auto; gap: 10px; background: var(--surface-2); border-radius: 12px; padding: 8px; align-items: start; }
.mnp-gal__item img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; background: var(--soft); }
.mnp-gal__fields { display: grid; gap: 6px; min-width: 0; }
.mnp-gal__fields .mnp-input { min-height: 40px; padding: 7px 10px; font-size: 14.5px; border-radius: 9px; }
.mnp-gal__btns { display: flex; flex-direction: column; gap: 4px; }
.mnp-gal__btns .mnp-iconbtn { width: 38px; height: 38px; background: var(--soft); }
.mnp-gal__btns .mnp-iconbtn[disabled] { opacity: .35; }

.mnp-serp { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); margin-bottom: 12px; }
.mnp-serp__url { font-size: 12.5px; color: var(--ok); word-break: break-all; }
.mnp-serp__title { font-size: 17px; color: var(--info); line-height: 1.4; margin: 2px 0; font-weight: 600; }
.mnp-serp__desc { font-size: 13.5px; color: var(--muted); line-height: 1.5; }

.mnp-actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--surface); border-top: 1px solid var(--line); padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
.mnp-actionbar__in { max-width: 760px; margin: 0 auto; display: flex; gap: 10px; }
.mnp-actionbar .mnp-btn { flex: 1; min-height: 48px; font-size: 15px; letter-spacing: .2px; }
.mnp-actionbar .mnp-btn--primary { flex: 1.35; }

/* ---------- modal / sheet ---------- */
.mnp-modal { position: fixed; inset: 0; z-index: 100; background: rgba(8, 10, 14, .55); display: flex; align-items: center; justify-content: center; padding: 18px; }
.mnp-modal--sheet { align-items: flex-end; padding: 0; }
.mnp-modal__dlg { background: var(--surface); color: var(--text); width: 100%; max-width: 460px; max-height: 88vh; max-height: 88dvh; overflow: auto; border-radius: 20px; padding: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); font-family: var(--font); font-size: var(--fs); line-height: 1.55; }
.mnp-modal--sheet .mnp-modal__dlg { max-width: 760px; border-radius: 22px 22px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
.mnp-modal--full .mnp-modal__dlg { max-width: 760px; height: 100%; max-height: 100%; border-radius: 0; }
.mnp-modal--full { padding: 0; }
.mnp-modal__title { font-size: 19px; font-weight: 800; margin-bottom: 8px; line-height: 1.4; }
.mnp-modal__body { margin-bottom: 14px; }
.mnp-modal__body p { margin-bottom: 8px; }
.mnp-modal__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.mnp-modal__actions .mnp-btn { flex: 1; min-width: 120px; }
.mnp-modal__actions--stack { flex-direction: column; }
.mnp-srcs { display: grid; gap: 10px; }
.mnp-src { appearance: none; border: 1.5px solid var(--line); background: var(--surface); border-radius: 14px; min-height: 64px; display: flex; align-items: center; gap: 14px; padding: 8px 16px; font-weight: 700; font-size: 17px; cursor: pointer; text-align: left; }
.mnp-src .mnp-tile__emoji { font-size: 28px; }
.mnp-src small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }

/* ---------- media ---------- */
.mnp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mnp-thumb { position: relative; appearance: none; border: 0; padding: 0; background: var(--soft); border-radius: 10px; overflow: hidden; aspect-ratio: 1; cursor: pointer; }
.mnp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mnp-thumb[aria-pressed="true"]::after { content: "✓"; position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; background: var(--p); color: var(--on-p); font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #fff; }
.mnp-thumb[aria-pressed="true"] { outline: 3px solid var(--p); outline-offset: -3px; }
.mnp-up { display: grid; gap: 8px; }
.mnp-up__row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font-size: 14px; }
.mnp-bar { grid-column: 1 / -1; height: 6px; background: var(--soft); border-radius: 3px; overflow: hidden; }
.mnp-bar > i { display: block; height: 100%; width: 0; background: var(--p); transition: width .15s; }
.mnp-up__row.is-err .mnp-bar > i { background: var(--danger); }

/* ---------- crop ---------- */
.mnp-crop__stage { position: relative; margin: 6px auto 10px; touch-action: none; user-select: none; -webkit-user-select: none; background: #000; border-radius: 10px; overflow: hidden; width: fit-content; max-width: 100%; }
.mnp-crop__stage img { display: block; max-width: 100%; max-height: 52vh; max-height: 52dvh; pointer-events: none; }
.mnp-crop__box { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55); cursor: move; }
.mnp-crop__box::before, .mnp-crop__box::after { content: ""; position: absolute; background: rgba(255, 255, 255, .45); }
.mnp-crop__box::before { left: 33.3%; right: 33.3%; top: 0; bottom: 0; border-left: 1px solid rgba(255,255,255,.5); border-right: 1px solid rgba(255,255,255,.5); background: none; }
.mnp-crop__box::after { top: 33.3%; bottom: 33.3%; left: 0; right: 0; border-top: 1px solid rgba(255,255,255,.5); border-bottom: 1px solid rgba(255,255,255,.5); background: none; }
.mnp-crop__ratios { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.mnp-crop input[type="range"] { width: 100%; accent-color: var(--p); height: 32px; }

/* ---------- stats ---------- */
.mnp-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
.mnp-kpi { background: var(--surface); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow); }
.mnp-kpi b { display: block; font-size: 28px; line-height: 1.2; }
.mnp-kpi span { font-size: 13.5px; color: var(--muted); }
.mnp-chart { display: flex; align-items: flex-end; gap: 4px; height: 130px; padding-top: 8px; }
.mnp-chart__col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 4px; min-width: 0; }
.mnp-chart__bar { width: 100%; background: var(--p); border-radius: 5px 5px 2px 2px; min-height: 3px; opacity: .9; }
.mnp-chart__col.is-zero .mnp-chart__bar { background: var(--line); }
.mnp-chart__col span { font-size: 11px; color: var(--muted); line-height: 1; }
.mnp-chart__val { font-size: 11px; font-weight: 700; line-height: 1; }
.mnp-list { list-style: none; margin: 0; padding: 0; }
.mnp-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mnp-list li:last-child { border-bottom: 0; }

/* ---------- profile & settings ---------- */
.mnp-prof { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.mnp-prof img { width: 68px; height: 68px; border-radius: 50%; background: var(--soft); }
.mnp-prof h2 { font-size: 20px; line-height: 1.3; }
.mnp-cat { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mnp-cat:last-child { border-bottom: 0; }
.mnp-cat b { margin-left: auto; color: var(--muted); font-size: 14px; }

/* desktop / tablet comfort */
@media (min-width: 761px) {
	.mnp-shell { box-shadow: 0 0 0 1px var(--line); }
	.mnp-nav__in, .mnp-actionbar__in { max-width: 760px; }
	.mnp-tiles { grid-template-columns: repeat(3, 1fr); }
	.mnp-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 360px) {
	.mnp-tile { font-size: 13px; min-height: 96px; }
	.mnp-rt__btn { width: 38px; }
}
