.admin {
	padding: 4px;
	border-radius: 4px;
	background: green;
	margin: 6px;
	width: 200px;
	display: inline-block;
}
.admin.protected {
	background: red;
}
.admin INPUT[type="submit"] {
	width: 100%;
}
.admin.protected INPUT[type="submit"] {
	width: 90%;
}


.bbcode {
	overflow-wrap: anywhere;
}
.bbcode BLOCKQUOTE {
	border: 1px solid black;
	padding: 8px;
	background: #DDD;
}
.bbcode .anchor A.alink {
	visibility: hidden;
}
.bbcode .anchor:hover A.alink {
	visibility: visible;
}

.comment {
	text-align: left;
	position: relative;
	overflow-wrap: anywhere;
}
.comment IMG {
	max-width: 100%;
}
.comment .info {
	visibility: hidden;
	text-align: center;
	padding: var(--block-padding);
	background: var(--block);
	border: 1px solid var(--block-border);
	position: absolute;
	top: 0;
	left: -180px;
	width: 180px;
	z-index: 1;
	box-shadow: 0 0 4px #000;
	border-radius: 4px;
}
.comment:hover .info {
	visibility: visible;
}

.comment_add INPUT:not([type="checkbox"]):not([type="radio"]),
.comment_add TEXTAREA,
.comment_add BUTTON,
.comment_add SELECT {
	width: 100%;
}

#comment-list-recent .more {
	display: block;
	padding-top: 8px;
}
.comment_big_list {
	display: flex;
	gap: 1em;
}
.comment_big_list .thumb {
	flex: 0;
}
.comment_big_list .comment_list {
	flex: 1;
	border-left: 1px solid var(--block-border);
}
.comment_big_list .comment {
	margin-left: 0;
}

/* checkbox, title, doc link */
.ext-list TD:nth-child(1) {
    width: 1em;
}
.ext-list TD:nth-child(2) {
    width: 12em;
}
.ext-list TD:nth-child(3) {
    width: 1em;
}

#handle_pixel_media IMG {
    max-width: 100%;
}

.command_example {
	margin: 12pt;
	padding-left: 16pt;
}

.command_example code {
    padding:4pt;
    border: dashed 2px black;
    background: inherit;
}

.command_example p {
    padding-left: 16pt;
}

@media (min-width: 750px) {
    .command_example code {
        display: table-cell;
        width: 256px;
    }

    .command_example p {
        display: table-cell;
    }
}

SECTION#image-list {
	box-shadow: none;
}
SECTION#image-list .blockbody {
	background: none;
	border: none;
	padding: 0px;
	text-align: left;
}
.shm-image-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, calc(var(--thumb-width) + 14px));
	gap: 6px 8px;
	place-items: start center;
}
.shm-image-list .thumb {
	margin-bottom: 0;
}

.setupblocks {
	column-width: 400px;
	column-gap: 1em;
	max-width: 1200px;
	margin: auto;
}
.setupblocks > .setupblock:first-of-type { margin-top: 0; }

.setupblock {
	break-inside: avoid;
	text-align: center;
}
.setupblock TEXTAREA {
	width: 100%;
	font-size: 0.75rem;
	resize: vertical;
}
.setupblock SELECT[multiple] {
	width: 100%;
}

.advanced_settings INPUT {
	width: 100%;
}

#Setupmain {
	box-shadow: none;
}
#Setupmain>.blockbody {
	background: none;
	border: none;
	margin: 0;
	padding: 0;
}
.setupblock .form {
	width: 100%;
}
.setupblock .form TH {
	font-weight: normal;
}
.setupblock .advanced {
    color: var(--danger-color);
    background: var(--danger-background);
}
.setupsubmit {
	margin-top: 1em;
	padding: 1em;
	width: 100%;
}

:root {
	--added-background: lightgreen;
	--removed-background: lightcoral;

	--flash-color: #882;
	--flash-border: #660;
	--blink-base-color: #FF70;
	--blink-blink-color: #FF7F;
}

@media (prefers-color-scheme: dark) {
	:root {
		--added-background: green;
		--removed-background: coral;
	}
}

INPUT, TEXTAREA, SELECT, BUTTON {
	box-sizing: border-box;
	font-size: 1em;
}

TABLE.form {width: 300px;}
TABLE.zebra {width: 100%;}

TABLE.form TD, TABLE.form TH {vertical-align: middle;}
TABLE.form TBODY TR TD {text-align: left;}
TABLE.form TBODY TR TH {text-align: right; padding-right: 4px; width: 1%; white-space: nowrap;}
TABLE.form TBODY TR.header TD,
TABLE.form TBODY TR.header TH {text-align: center; width: auto;}
TABLE.form TD + TH {padding-left: 8px;}
TABLE.form INPUT:not([type="checkbox"]):not([type="radio"]),
TABLE.form SELECT,
TABLE.form TEXTAREA,
TABLE.form BUTTON {width: 100%;}

H1, H2, H3 {
    overflow-wrap: anywhere;
}

*[onclick],
H3[class~="shm-toggler"] {
    cursor: pointer;
}

@keyframes blink {
    0% {background-color: var(--blink-base-color);}
    25% {background-color: var(--blink-blink-color);}
    50% {background-color: var(--blink-base-color);}
    75% {background-color: var(--blink-blink-color);}
    100% {background-color: var(--blink-base-color);}
}
.blink {
    animation: blink 2s linear 1;
}

#flash {
    color: #444;
    background-color: var(--flash-color);
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--flash-border);
}
#flash B {
    display: block;
    padding: 8px;
    border-radius: var(--border-radius);
}

.tag {
    overflow-wrap: anywhere;
}

.prose {
    text-align: left;
}
.prose P:first-child {
    margin-top: 0;
}
.prose P:last-child {
    margin-bottom: 0;
}

TABLE#large_upload_form.form {
	width: 100%;
}

.mini_upload INPUT:not([type="checkbox"]):not([type="radio"]),
.mini_upload TEXTAREA,
.mini_upload BUTTON,
.mini_upload SELECT {
	width: 100%;
}

TABLE.form.image_info {
    width: 550px;
    max-width: 100%;
}

.image_info .edit {
    display: block;
}
.image_info .view {
    display: none;
}

.image_info.infomode-view .edit {
    display: none;
}
.image_info.infomode-view .view {
    display: block;
}

.image_info TEXTAREA {
    min-width: 100%;
    min-height: 3rem;
}
.image_info .image-info-sidebar-box {
    vertical-align: top;
}

.post_controls FORM {
    margin-bottom: 0.75em;
}
.post_controls FORM:last-child {
    margin-bottom: 0;
}

#handle_audio_media AUDIO {
	min-width: 300px;
	width: 65%;
}

#handle_video_media VIDEO {
    width: 100%;
    max-height: 85vh;
    background: black;
}

.autocomplete_completions {
    position: fixed;
    z-index: 99999;
    border: 1px solid #ccc;
    color: #000;
    background-color: #fff;
    padding: 5px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 1em;
    white-space: nowrap;
    overflow: hidden;
    text-align: left;
}
.autocomplete_completions LI {
    padding: 0.15em;
}
.autocomplete_completions .selected {
    background-color: #ccc;
    outline: none;
}

#filter-list{padding:revert; text-align:left;}
.thumb.filtered.filtered-active{display:none;}
.filter-inactive,.filter-inactive:hover{text-decoration: line-through;}
.thumb IMG {
	border-width: 2px !important;
}

.shm-thumb-has_child img {
	border-color: lime !important;
}

.shm-thumb-has_parent img {
	border-color: #cc0 !important;
}

.shm-thumb-has_child.shm-thumb-has_parent img {
	border-color: lime #cc0 #cc0 lime !important;
}

.tagcategoryblock {
	margin:0.6rem 1rem 0.6rem 0;
	padding:0.5rem 0.6rem 0.7rem;
	width:18rem;
	border:1px solid #AAAAAA;
	border-radius:0.25rem;
	display:inline-block;
}
.tagcategoryblock table {
	width:100%;
	border-spacing:0;
}
.tagcategoryblock input, .tagcategoryblock span {
	width:100%;
	height:100%;
}
.tagcategoryblock td:first-child {
	padding:0.3rem 0.7rem 0.4rem 0;
	text-align:right;
	width:40%;
}
.tagcategoryblock td:last-child {
	width:60%;
}
.tagcategoryblock td:last-child span {
	width:7ch;
	padding:0.24rem 0.7rem 0.5rem 0;
	display:inline-block;
}
.tagcategoryblock button {
	width:100%;
	margin-top:0.4rem;
	padding:0.2rem 0.6rem;
}

.tagcategoryblock input[type="color"] {
	height: 22px;
}

.tagcategoryblock .tc_colorswatch {
	display:inline-block;
	vertical-align:middle;
	height:1.25rem;
	width:1.25rem;
	border-radius:4px;
}

:root {
	color-scheme: dark;
	font-weight: normal;
	font-style: normal;
	font-variant: normal;
	font-size-adjust: none;
	font-stretch: normal;
	font-size: 15px;
	line-height: 1.45;
	-x-system-font: none;

	--radius-sm: 10px;
	--radius-md: 14px;
	--radius-lg: 20px;

	--page: #0b0c10;
	--text: #e9ebf2;
	--text-muted: #8b91a3;

	--danger-color: #ffb4c0;
	--danger-background: rgba(255, 80, 110, 0.18);

	--link-first: #ff8fb5;
	--link-default: #7eb6ff;
	--link-hover: #b8d6ff;
	--link-header: var(--text);

	--header-selected: rgba(126, 182, 255, 0.14);
	--footer-fg: var(--text-muted);
	--tag-count: #6d7388;
	--comment-meta: var(--text-muted);

	--paginator-border: transparent;
	--paginator-hover-bg: #7eb6ff;
	--paginator-hover-fg: #0b0c10;

	--block-border: rgba(255, 255, 255, 0.1);

	--zebra-heading-fg: #9ec5ff;
	--zebra-hover-bg: rgba(255, 255, 255, 0.04);

	--surface: rgba(255, 255, 255, 0.045);
	--surface-elevated: rgba(255, 255, 255, 0.08);
	--surface-border: rgba(255, 255, 255, 0.1);
	--accent-glow: rgba(126, 182, 255, 0.12);

	/* Header-only float from viewport edges (do not pad BODY.grid — that shrinks the image column) */
	--page-gutter-x: clamp(1rem, 1.2vw, 1.75rem);
	--page-gutter-top: clamp(0.75rem, 1.8vw, 1.125rem);
	--nav-inner-pad-x: 1rem;
}

HEADER {
	grid-column: 1 / 3;
	grid-row: 1;
	text-align: left;
}

HEADER h1 {
	text-align: left;
}

HEADER #site-title {
	margin-left: var(--nav-inner-pad-x);
	font-family: "Tahoma", "Verdana", "Helvetica", sans-serif;
}
HEADER #site-title IMG {
	vertical-align: middle;
	margin-right: .5rem;
}

HEADER ul#navbar,
HEADER ul#subnavbar {
	font-family: "Verdana", "Helvetica", sans-serif;
}

HEADER ul#navbar {
	margin: 0 0 10px;
	padding: 0 var(--nav-inner-pad-x) 0 var(--nav-inner-pad-x);
}

HEADER ul#navbar li {
	margin: 0;
}

HEADER ul#navbar li a {
	display: inline-block;
	margin: 0 0.15rem;
	padding: 0.4rem 0.6rem;
}

HEADER ul#navbar li:first-child a {
	margin-left: -0.6rem;
	color: var(--link-first);
	font-weight: bold;
}

HEADER ul#navbar li a.current-page {
	background-color: var(--header-selected);
	font-weight: bold;
}

HEADER ul#subnavbar {
	padding: 0 var(--nav-inner-pad-x) 0 var(--nav-inner-pad-x);
	background-color: var(--header-selected);
}

HEADER ul#subnavbar li {
	display: inline-block;
	margin: 0 0.15rem;
	padding: 0.4rem 0.6rem;
}

HEADER ul#subnavbar li:first-child {
	margin-left: -0.6rem;
}

body {
	background-color: var(--page);
	color: var(--text);
}

BODY.layout-grid {
	display: grid;
	grid-template-columns: minmax(12.5rem, 14.5rem) minmax(0, 1fr);
	grid-gap: 0 2.5rem;
	/* min-height:100vh on body leaves extra block space; without this, rows stretch and row 1 grows under the header */
	align-content: start;
	box-sizing: border-box;
}
BODY.layout-no-left NAV {
	display: none;
}
BODY.layout-no-left ARTICLE {
	margin-left: 2rem;
}

h1 {
	margin-top: 0;
	margin-bottom: 0;
	padding: 0.35rem;
	font-size: 2rem;
}

h1 a {
	color: var(--link-header);
}

h3 {
	margin-top: 0;
	margin-bottom: 0;
	padding: 0.2rem 0.2rem 0.2rem 0;
	font-size: 1rem;
}

h4 {
	font-size: 1.4rem;
}

h5 {
	font-size: 1.2rem;
}

table.zebra {
	border-spacing: 0;
	border-collapse: collapse;
}

table.zebra>tbody>tr:hover {
	background: var(--zebra-hover-bg);
}

table.zebra th {
	padding-right: 0.4rem;
	color: var(--zebra-heading-fg);
}

table.zebra td {
	margin: 0;
	padding-right: 0.6rem;
	border: 1px dotted #EEE;
}

table.zebra th {
	margin: 0;
	text-align: left;
}

thead {
	font-weight: bold;
	-moz-background-clip: border;
	-moz-background-inline-policy: continuous;
	-moz-background-origin: padding;
}

td {
	vertical-align: top;
}

#subtitle {
	margin: auto;
	width: 256px;
	border-top: medium none;
	text-align: center;
	font-size: 0.75em;
}

#short-wiki-description {
	padding: 0 2em;
	font-size: 1.2em;
}

#short-wiki-description h2 {
	padding-bottom: 0.2em;
}

FOOTER {
	grid-column: 1 / 3;
	grid-row: 3;
	clear: both;
	border-top: solid 1px var(--block-border);
	margin-top: 1rem;
	text-align: center;
	color: var(--footer-fg);
	font-size: 0.8rem;
}

FOOTER>DIV {
	margin: 1rem 2rem;
}

CODE {
	background: #DEDEDE;
	font-size: 0.9rem;
}

form {
	margin: 0;
}

a {
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

NAV {
	grid-column: 1;
	grid-row: 2;
	padding: 0 1rem 0.2rem 2rem;
	width: 100%;
	max-width: 14.5rem;
	box-sizing: border-box;
	text-align: left;
	align-self: start;
}

NAV section+section {
	margin-top: 1rem;
}

NAV table {
	width: 15rem;
}

NAV td {
	vertical-align: middle;
}

NAV input {
	padding: 0;
	width: 100%;
}

NAV select {
	padding: 0;
	width: 100%;
}

NAV h3 {
	text-align: left;
}

#comments p {
	overflow: hidden;
	max-width: 150px;
	width: 15rem;
	text-align: left;
}

SPAN.comment-info SPAN {
    margin-right: 2em;
}
SPAN.comment-info SPAN B {
    margin-right: 0.5em;
}

TABLE.tag_list {
	width: auto;
	border-collapse: collapse;
}

TABLE.tag_list>THEAD {
	display: none;
}

TABLE.tag_list>TBODY>TR>TD {
	display: inline;
	padding: 0;
	line-height: 1em;
}

TABLE.tag_list>TBODY>TR>TD:after {
	content: " ";
}

.tag_count {
	display: inline-block;
	margin-left: 0.4rem;
	color: var(--tag-count);
}

.more {
	content: "More â";
}

.comment {
	margin-bottom: 8px;
}

.comment .meta {
	width: 15rem;
	color: var(--comment-meta);
}

.comment TD {
	text-align: left;
}

.withleft {
	margin-left: 1rem;
}

div#paginator {
	display: block;
	clear: both;
	padding: 0.35rem 0 0.5rem;
	text-align: center;
	font-weight: 500;
	font-size: 0.8rem;
}

.paginator {
	margin: 0;
	text-align: center;
}

div#paginator b {
	margin: 1px 2px;
	padding: 0.2rem 0.45rem;
}

div#paginator a {
	margin: 1px 2px;
	padding: 0.2rem 0.45rem;
}

div#paginator a:hover {
	background: var(--paginator-hover-bg) none repeat scroll 0 0;
	color: var(--paginator-hover-fg);
}

#pagelist {
	margin-top: 32px;
}

#large_upload_form {
	width: 600px;
}

.setupblock,
.tagcategoryblock {
	margin: 0.6rem 1rem 0.6rem 0;
	padding: 0.5rem 0.6rem 0.7rem;
	border: 1px solid var(--block-border);
	border-radius: 0.25rem;
}

.tagcategoryblock {
	display: inline-block;
	width: 18rem;
}

.tagcategoryblock table {
	width: 100%;
	border-spacing: 0;
}

.tagcategoryblock input,
.tagcategoryblock span {
	width: 100%;
	height: 100%;
}

.tagcategoryblock td:first-child {
	padding: 0.3rem 0.7rem 0.4rem 0;
	text-align: right;
	width: 40%;
}

.tagcategoryblock td:last-child {
	width: 60%;
}

.tagcategoryblock td:last-child span {
	padding: 0.24rem 0.7rem 0.5rem 0;
	display: block;
}

.tagcategoryblock button {
	width: 100%;
	margin-top: 0.4rem;
	padding: 0.2rem 0.6rem;
}

.comment .username {
	font-weight: bold;
	font-size: 1.5em;
}

* {
	margin: 0;
	padding: 0;
	font-family: Tahoma, Verdana, Helvetica, sans-serif;
}

a {
	color: var(--link-default);
	text-decoration: none;
}

a:visited {
	color: var(--link-default);
	text-decoration: none;
}

a:hover {
	color: var(--link-hover);
	text-decoration: none;
}

a:active {
	color: var(--link-default);
	text-decoration: none;
}

ul.flat-list {
	display: block;
	margin: 0;
	padding: 0;
}

ul.flat-list * {
	display: inline;
	text-align: left;
}

ul.flat-list li {
	margin: 0 1.3em 0 0;
	list-style-type: none;
	text-align: left;
	font-weight: bold;
}

ul.flat-list li a {
	font-weight: normal;
}

#tips {
	margin-left: 16px;
}

#blotter1 {
	position: relative;
	margin-right: 16px;
	margin-left: 16px;
	font-size: 90%;
}

#blotter2 {
	margin-right: 16px;
	margin-left: 16px;
	font-size: 90%;
}

#flash {
	background: #FDF5D9;
	border: 1px solid #FCEEC1;
	margin: 1rem 0;
	padding: 1rem;
	text-align: center;
	border-radius: 0.5rem;
}

ARTICLE {
	grid-column: 2;
	grid-row: 2;
	margin-right: 0;
}

ARTICLE section+section {
	margin-top: 1rem;
}

form+form {
	margin-top: 0.5rem;
}

#Imagemain h3 {
	display: none;
}

@media screen and (width <=800px) {
	BODY.layout-grid {
		grid-template-columns: auto;
		align-content: start;
	}

	HEADER {
		grid-column: 1;
		grid-row: 1;
	}

	/* Put the left column (search / tags) above the image so it is not below the fold */
	NAV {
		grid-column: 1;
		grid-row: 2;
		margin: 0;
		width: auto;
		max-width: none;
	}

	ARTICLE {
		grid-column: 1;
		grid-row: 3;
		margin: 0;
	}

	FOOTER {
		grid-column: 1;
		grid-row: 4;
	}

	.withleft {
		margin: 0;
	}

	#image-list .blockbody {
		margin: 0;
	}

	.shm-image-list {
		justify-content: center;
	}
}

/* --- ImageBooru: dark sleek UI (thumbs, panels, post view) --- */

body {
	background-image: radial-gradient(ellipse 100% 70% at 50% -25%, var(--accent-glow), transparent 55%);
	min-height: 100vh;
}

HEADER {
	background: var(--surface);
	border: 1px solid var(--surface-border);
	border-radius: var(--radius-lg);
	padding: 0.2rem 0 0;
	margin: var(--page-gutter-top) var(--page-gutter-x) 1.25rem var(--page-gutter-x);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
	backdrop-filter: blur(16px);
}

HEADER #site-title {
	font-family: system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
	font-weight: 600;
}

/* h1 is more specific than #site-title alone — margin must live here (margin: 0 was wiping margin-left) */
HEADER h1#site-title {
	font-size: 1.65rem;
	line-height: 1.25;
	padding: 0.35rem 0;
	margin: 0 0 0 var(--nav-inner-pad-x);
}

HEADER ul#navbar {
	padding: 0 var(--nav-inner-pad-x) 0 var(--nav-inner-pad-x);
	margin: 0 0 10px;
}

HEADER ul#navbar li a {
	padding: 0.4rem 0.6rem !important;
	font-size: 0.92rem;
}

/* Submenu: flex + valid ul>li markup (no div inside ul). line-height:0 kills stray strut under one row. */
HEADER ul#subnavbar {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	column-gap: 0.85rem;
	row-gap: 0;
	margin: 0;
	padding: 0.22rem var(--nav-inner-pad-x) 0.26rem var(--nav-inner-pad-x);
	background: rgba(0, 0, 0, 0.22);
	border-top: 1px solid var(--surface-border);
	border-radius: 0 0 calc(var(--radius-lg) - 1px) calc(var(--radius-lg) - 1px);
	font-size: 0.82rem;
	line-height: 0;
}

/* Beat ul.flat-list * { display: inline } — flex children, no phantom line below one item */
HEADER ul#subnavbar.flat-list li {
	display: flex;
	align-items: center;
	margin: 0 !important;
	padding: 0;
	list-style: none;
	font-weight: bold;
	line-height: 1.25;
}

HEADER ul#subnavbar li a,
HEADER ul#subnavbar li .tab,
HEADER ul#subnavbar li .current-page {
	display: inline-block;
	padding: 0.28rem 0.55rem !important;
	margin: 0 !important;
	font-weight: normal;
	line-height: 1.25;
	vertical-align: top;
}

HEADER ul#navbar li a,
HEADER ul#subnavbar li a {
	border-radius: var(--radius-sm);
	transition: background 0.15s ease, color 0.15s ease;
}

HEADER ul#navbar li a.current-page {
	border-radius: var(--radius-sm);
}

@media screen and (width <=800px) {
	/* After global HEADER margin shorthand — tighten horizontal inset on small screens */
	HEADER {
		margin-left: max(var(--page-gutter-x), 16px);
		margin-right: max(var(--page-gutter-x), 16px);
	}
}

NAV {
	width: 100%;
	max-width: 14.5rem;
	padding: 0 0.75rem 0.5rem var(--nav-inner-pad-x);
	box-sizing: border-box;
}

NAV SECTION {
	border-radius: var(--radius-md);
	border: 1px solid var(--surface-border);
	background: var(--surface);
	overflow: hidden;
	margin-bottom: 0.85rem;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.22);
	backdrop-filter: blur(12px);
}

NAV SECTION H3.shm-toggler,
NAV SECTION > H3 {
	font-family: system-ui, "Segoe UI", Roboto, sans-serif;
	font-size: 0.68rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 0.55rem 0.85rem;
	margin: 0;
	background: var(--surface-elevated);
	color: var(--text-muted);
	border-bottom: 1px solid var(--surface-border);
	font-weight: 600;
}

NAV SECTION .blockbody {
	padding: 0.65rem 0.85rem;
	background: transparent;
	border: none;
}

NAV input[type="text"],
NAV input[type="search"],
NAV input[type="password"],
NAV select {
	border-radius: var(--radius-sm);
	border: 1px solid var(--surface-border) !important;
	background: rgba(0, 0, 0, 0.28) !important;
	color: var(--text) !important;
	padding: 0.45rem 0.6rem !important;
	box-sizing: border-box;
}

NAV input[type="submit"],
NAV button {
	border-radius: var(--radius-sm);
	margin-top: 0.35rem;
}

/* Post view: tags block in left nav (linked to main form via form="shm-post-edit-form") */
.shm-post-tags-sidebar {
	font-size: 0.82rem;
	line-height: 1.45;
}

.shm-post-tags-categories {
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.shm-tag-category-title {
	font-family: system-ui, "Segoe UI", Roboto, sans-serif;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--text);
	margin: 0 0 0.35rem;
	padding: 0;
}

.shm-tag-category[data-category="series"] .shm-tag-category-title {
	color: #d4a5ff;
}

.shm-tag-category[data-category="character"] .shm-tag-category-title {
	color: #8fd99a;
}

.shm-tag-category[data-category="artist"] .shm-tag-category-title {
	color: #ff9ba8;
}

.shm-tag-category[data-category="general"] .shm-tag-category-title {
	color: #9ec5ff;
}

.shm-tag-category-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.shm-post-tag-row {
	display: flex;
	flex-direction: row;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem;
	margin: 0;
	padding: 0.12rem 0;
	line-height: 1.35;
}

.shm-post-tag-row .tag {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.shm-post-tag-count {
	flex: 0 0 auto;
	font-size: 0.72rem;
	color: var(--tag-count);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* Tag editor under the image (main column, .edit mode) */
ARTICLE .image_info.form textarea.autocomplete_tags {
	width: 100%;
	min-height: 7rem;
	margin-top: 0.25rem;
	resize: vertical;
	box-sizing: border-box;
	font-family: inherit;
}

.shm-post-tags-sidebar-meta {
	margin-top: 0.5rem;
	padding-top: 0.45rem;
	border-top: 1px solid var(--surface-border);
	font-size: 0.78rem;
}

/* ext/girl_owner: Dalia / Claudia owner tags + browse filter */
.shm-girl-owner-browse-wrap {
	margin-top: 0.65rem;
	padding-top: 0.55rem;
	border-top: 1px solid var(--surface-border);
}

.shm-girl-owner-browse-label,
.shm-girl-owner-post-wrap > .shm-tag-category-title {
	font-family: system-ui, "Segoe UI", Roboto, sans-serif;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--text);
	margin: 0 0 0.4rem;
}

.shm-girl-owner-browse {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.shm-girl-owner-post-wrap {
	margin-top: 0.65rem;
	padding-top: 0.5rem;
	border-top: 1px solid var(--surface-border);
}

.shm-girl-owner-post-wrap form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	align-items: center;
}

.shm-girl-owner-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.35rem 0.65rem;
	border-radius: var(--radius-sm);
	border: 1px solid var(--surface-border);
	background: rgba(0, 0, 0, 0.22);
	color: var(--text);
	font-size: 0.8rem;
	font-family: inherit;
	cursor: pointer;
	transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.shm-girl-owner-btn:hover {
	background: rgba(255, 255, 255, 0.06);
	border-color: rgba(255, 255, 255, 0.18);
}

.shm-girl-owner-btn.is-active {
	border-color: rgba(126, 182, 255, 0.55);
	background: rgba(126, 182, 255, 0.18);
	box-shadow: inset 0 0 0 1px rgba(126, 182, 255, 0.25);
}

/* Autocomplete dropdown (ext/autocomplete): opaque panel, rounded — readable over any backdrop */
.autocomplete_completions {
	z-index: 99999 !important;
	margin: 0 !important;
	padding: 0.35rem 0 !important;
	border: 1px solid rgba(255, 255, 255, 0.14) !important;
	border-radius: var(--radius-md) !important;
	color: var(--text) !important;
	/* Solid fill so list stays legible (not glassy like --surface-elevated) */
	background: #161922 !important;
	box-shadow:
		0 0 0 1px rgba(0, 0, 0, 0.35),
		0 12px 40px rgba(0, 0, 0, 0.55);
	max-height: min(50vh, 18rem);
	overflow-y: auto;
	overflow-x: hidden;
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
	font-size: 0.92rem;
	line-height: 1.35;
}

.autocomplete_completions li {
	padding: 0.42rem 0.75rem !important;
	margin: 0 0.3rem !important;
	border-radius: var(--radius-sm) !important;
	cursor: default;
	transition: background 0.12s ease;
}

.autocomplete_completions li:hover {
	background: rgba(255, 255, 255, 0.06) !important;
}

.autocomplete_completions li.selected {
	background: rgba(126, 182, 255, 0.28) !important;
	color: var(--text) !important;
	box-shadow: inset 0 0 0 1px rgba(126, 182, 255, 0.35);
}

ARTICLE {
	margin-right: 1.25rem;
}

ARTICLE > SECTION {
	margin-bottom: 1rem;
	border-radius: var(--radius-md);
	border: 1px solid var(--surface-border);
	background: var(--surface);
	overflow: hidden;
	box-shadow: 0 6px 28px rgba(0, 0, 0, 0.25);
	backdrop-filter: blur(12px);
}

ARTICLE > SECTION#image-list + SECTION#paginator {
	margin-top: 0.35rem !important;
}

ARTICLE > SECTION#paginator {
	margin-bottom: 0.45rem !important;
}

ARTICLE > SECTION > H3 {
	font-family: system-ui, "Segoe UI", Roboto, sans-serif;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 0.55rem 1rem;
	margin: 0;
	background: var(--surface-elevated);
	border-bottom: 1px solid var(--surface-border);
	color: var(--text-muted);
	font-weight: 600;
}

ARTICLE > SECTION > .blockbody {
	background: transparent;
	border: none;
	padding: 1rem 1.1rem;
}

SECTION#image-list {
	background: none !important;
	border: none !important;
	box-shadow: none !important;
	backdrop-filter: none !important;
	margin: 0 !important;
}

SECTION#image-list > .blockbody {
	background: none !important;
	border: none !important;
	padding: 0 !important;
	box-shadow: none !important;
}

SECTION#handle_image_media,
SECTION[id="handle_image_media"] {
	background: none !important;
	border: none !important;
	box-shadow: none !important;
	backdrop-filter: none !important;
	margin: 0 0 1rem !important;
}

SECTION#handle_image_media > .blockbody,
SECTION[id="handle_image_media"] > .blockbody {
	padding: 0 !important;
	background: transparent !important;
	border: none !important;
	text-align: center;
}

#shm_post_media {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 100%;
}

/* Post view: fit mode — toggle lives in left nav, so less vertical chrome over the media */
#shm_post_media #main_image,
#shm_post_media .shm-main-image {
	max-width: min(100%, calc(100vw - 2rem));
	max-height: calc(100vh - 8.5rem);
	width: auto;
	height: auto !important;
	object-fit: contain;
	border-radius: var(--radius-md);
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
	vertical-align: middle;
}

#shm_post_media.shm-media--full #main_image,
#shm_post_media.shm-media--full .shm-main-image {
	max-height: none;
}

/* Page list / pagination: slim strip, not a tall card */
SECTION#paginator {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	backdrop-filter: none !important;
	margin: 0.4rem 0 0 !important;
}

SECTION#paginator > .blockbody {
	padding: 0.25rem 0.35rem !important;
	margin: 0 !important;
	background: transparent !important;
	border: none !important;
}

div#paginator {
	padding: 0.2rem 0 0.35rem !important;
	margin: 0 !important;
	font-weight: 500;
	font-size: 0.78rem;
	line-height: 1.35;
}

.paginator {
	margin: 0 !important;
	padding: 0 !important;
}

div#paginator a,
div#paginator b {
	padding: 0.2rem 0.45rem !important;
	margin: 1px 2px !important;
	font-size: inherit;
	font-weight: 500;
	border-radius: var(--radius-sm);
}

div#paginator a:hover {
	text-decoration: none;
}

.shm-image-list .thumb {
	display: block;
	line-height: 0;
}

.shm-image-list .thumb img,
.shm-image-list .thumb IMG {
	border: none !important;
	padding: 0 !important;
	background: transparent !important;
	border-radius: var(--radius-sm) !important;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
	object-fit: contain;
	width: auto !important;
	height: auto !important;
	max-width: var(--thumb-width) !important;
	max-height: var(--thumb-height) !important;
}

.shm-thumb-has_child img {
	border: 2px solid rgba(96, 220, 140, 0.75) !important;
	box-sizing: border-box;
}

.shm-thumb-has_parent img {
	border: 2px solid rgba(255, 200, 80, 0.85) !important;
	box-sizing: border-box;
}

.shm-thumb-has_child.shm-thumb-has_parent img {
	border-color: rgba(96, 220, 140, 0.75) rgba(255, 200, 80, 0.85) rgba(255, 200, 80, 0.85) rgba(96, 220, 140, 0.75) !important;
}

.shm-image-list .thumb:hover img {
	box-shadow: 0 6px 28px rgba(126, 182, 255, 0.25), 0 8px 32px rgba(0, 0, 0, 0.45) !important;
}

TABLE.form.image_info {
	width: 100%;
	max-width: 44rem;
	background: transparent;
}

TABLE.image_info,
TABLE.image_info.form {
	border-collapse: separate;
	border-spacing: 0;
}

TABLE.image_info TR {
	vertical-align: top;
}

TABLE.image_info TH {
	color: var(--text-muted);
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-weight: 600;
	padding: 0.5rem 0.75rem 0.5rem 0;
	border-bottom: 1px solid var(--surface-border);
	width: 6.5rem;
}

TABLE.image_info TD {
	padding: 0.5rem 0 0.65rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
	text-align: left;
}

TABLE.image_info TR:last-child TH,
TABLE.image_info TR:last-child TD {
	border-bottom: none;
}

TABLE.image_info TEXTAREA,
TABLE.image_info INPUT[type="text"] {
	border-radius: var(--radius-sm);
	border: 1px solid var(--surface-border);
	background: rgba(0, 0, 0, 0.25);
	color: var(--text);
	padding: 0.45rem 0.55rem;
}

SECTION#Informationmain > .blockbody {
	padding: 0.85rem 1rem;
}

.post_controls {
	padding-top: 0.25rem;
}

.post_controls FORM {
	background: rgba(0, 0, 0, 0.15);
	border: 1px solid var(--surface-border);
	border-radius: var(--radius-sm);
	padding: 0.5rem 0.65rem;
}

CODE {
	background: rgba(0, 0, 0, 0.35);
	color: #c8d4f0;
	border-radius: 6px;
	padding: 0.1em 0.35em;
}

#flash {
	background: rgba(126, 182, 255, 0.12);
	border: 1px solid rgba(126, 182, 255, 0.28);
	color: var(--text);
	border-radius: var(--radius-md);
}

FOOTER {
	border-top: 1px solid var(--surface-border);
	margin-top: 1.5rem;
	padding-top: 0.75rem;
}

table.zebra td {
	border: 1px solid rgba(255, 255, 255, 0.06);
}

* {
	font-family: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.setupblock,
.tagcategoryblock {
	border-radius: var(--radius-md);
	border-color: var(--surface-border);
	background: var(--surface);
}

#subtitle {
	color: var(--text-muted);
	width: auto;
	max-width: 40rem;
	margin: 0 auto 0.75rem;
	padding: 0.35rem 0.75rem;
	background: var(--surface);
	border: 1px solid var(--surface-border);
	border-radius: var(--radius-md);
}

/* ---------- Buttons & form actions (site-wide) ---------- */

button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
	appearance: none;
	-webkit-appearance: none;
	font: inherit;
	font-size: 0.82rem;
	font-weight: 500;
	line-height: 1.25;
	padding: 0.42rem 0.9rem;
	border-radius: var(--radius-sm);
	border: 1px solid var(--surface-border);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.09) 0%, rgba(0, 0, 0, 0.15) 100%);
	color: var(--text);
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

button:hover,
input[type="submit"]:hover:not(:disabled),
input[type="button"]:hover:not(:disabled),
input[type="reset"]:hover:not(:disabled) {
	border-color: rgba(126, 182, 255, 0.45);
	background: rgba(126, 182, 255, 0.14);
	box-shadow: 0 2px 10px rgba(126, 182, 255, 0.12);
}

button:active,
input[type="submit"]:active:not(:disabled),
input[type="button"]:active:not(:disabled),
input[type="reset"]:active:not(:disabled) {
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

button:disabled,
input[type="submit"]:disabled,
input[type="button"]:disabled,
input[type="reset"]:disabled {
	opacity: 0.42;
	cursor: not-allowed;
	box-shadow: none;
}

button:focus-visible,
input[type="submit"]:focus-visible,
input[type="button"]:focus-visible,
input[type="reset"]:focus-visible {
	outline: 2px solid var(--link-default);
	outline-offset: 2px;
}

.shm-btn-primary,
input[type="submit"].shm-btn-primary {
	background: rgba(126, 182, 255, 0.22);
	border-color: rgba(126, 182, 255, 0.45);
	color: #e8f0ff;
}

.shm-btn-primary:hover:not(:disabled),
input[type="submit"].shm-btn-primary:hover:not(:disabled) {
	background: rgba(126, 182, 255, 0.32);
	border-color: rgba(158, 200, 255, 0.55);
}

#image_delete_button,
input[type="submit"][value="Delete"],
input[type="submit"][value="Disapprove"] {
	background: rgba(255, 80, 100, 0.14);
	border-color: rgba(255, 120, 130, 0.45);
	color: #ffc8d0;
}

#image_delete_button:hover:not(:disabled),
input[type="submit"][value="Delete"]:hover:not(:disabled),
input[type="submit"][value="Disapprove"]:hover:not(:disabled) {
	background: rgba(255, 80, 100, 0.26);
	border-color: rgba(255, 140, 150, 0.6);
}

/* Search block: full-width field, full-width Search button below */
NAV FORM:has(.shm-search-field),
FORM:has(input.autocomplete_tags.shm-search-field) {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 0.45rem;
}

NAV FORM > P:empty,
FORM:has(.shm-search-field) > P:empty {
	display: none;
	margin: 0;
	padding: 0;
}

.shm-search-field {
	width: 100% !important;
	max-width: 100%;
	min-width: 0;
	flex: none;
	box-sizing: border-box;
}

FORM:has(.shm-search-field) input.shm-search-submit[type="submit"],
FORM:has(.shm-search-field) input[type="submit"].shm-search-submit {
	width: 100% !important;
	flex: none;
	box-sizing: border-box;
	margin-top: 0 !important;
}

/* Post Controls: each action as a compact pill */
.post_controls {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.post_controls FORM {
	display: block;
	margin-bottom: 0 !important;
}

.post_controls input[type="submit"] {
	width: 100%;
	text-align: center;
}

/* Image view Edit / Set */
TABLE.image_info input.view,
TABLE.image_info input.edit {
	min-width: 4.5rem;
	margin-right: 0.35rem;
}

/* File upload chooser */
input[type="file"]::file-selector-button {
	appearance: none;
	-webkit-appearance: none;
	font: inherit;
	font-size: 0.8rem;
	font-weight: 500;
	padding: 0.38rem 0.75rem;
	margin-right: 0.65rem;
	border-radius: var(--radius-sm);
	border: 1px solid var(--surface-border);
	background: rgba(126, 182, 255, 0.18);
	color: var(--text);
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}

input[type="file"]::file-selector-button:hover {
	background: rgba(126, 182, 255, 0.28);
	border-color: rgba(126, 182, 255, 0.45);
}

input[type="file"] {
	font-size: 0.8rem;
	color: var(--text-muted);
}

/* Post view: full-size toggle (left nav, above Tags) */
.shm-image-fit-sidebar {
	width: 100%;
}

button.shm-image-fit-toggle {
	display: block;
	width: 100%;
	margin: 0;
	box-sizing: border-box;
}

/* ——— Baby collections (Dalia / Claudia grids) ——— */
HEADER ul#navbar li a[href*="babies/dalia"],
HEADER ul#navbar li a[href*="babies/claudia"] {
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0.01em;
	color: var(--text-muted);
	background: rgba(255, 255, 255, 0.035);
	border: 1px solid rgba(255, 255, 255, 0.07);
	border-radius: 6px;
	padding: 0.3rem 0.5rem !important;
	margin: 0 0.12rem !important;
}

HEADER ul#navbar li a[href*="babies/dalia"]:hover,
HEADER ul#navbar li a[href*="babies/claudia"]:hover {
	color: var(--text);
	background: rgba(255, 255, 255, 0.06);
	border-color: rgba(255, 255, 255, 0.1);
}

HEADER ul#navbar li a[href*="babies/dalia"].current-page,
HEADER ul#navbar li a[href*="babies/claudia"].current-page {
	color: var(--link-default);
	background: var(--header-selected);
	border-color: transparent;
	font-weight: 600;
}

HEADER ul#navbar li a[href*="babies/manage"] {
	font-size: 0.78rem;
	font-weight: 500;
	color: var(--text-muted);
	padding: 0.28rem 0.45rem !important;
	margin: 0 0.12rem !important;
	opacity: 0.92;
}

HEADER ul#navbar li a[href*="babies/manage"]:hover {
	color: var(--text);
	opacity: 1;
}

.shm-baby-intro {
	color: var(--text-muted);
	margin: 0 0 1.25rem;
	max-width: 52rem;
	line-height: 1.5;
}

.shm-baby-empty {
	color: var(--text-muted);
	font-style: italic;
}

.shm-baby-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(10.75rem, 1fr));
	gap: 1.1rem 1rem;
	max-width: 1200px;
}

.shm-baby-card {
	display: block;
	text-decoration: none !important;
	color: inherit !important;
	border-radius: var(--radius-md);
	overflow: hidden;
	box-shadow: 0 4px 28px rgba(0, 0, 0, 0.4);
	border: 1px solid var(--surface-border);
	transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.shm-baby-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 10px 36px rgba(126, 182, 255, 0.14);
	border-color: rgba(126, 182, 255, 0.35);
}

.shm-baby-card-frame {
	position: relative;
	width: 100%;
	aspect-ratio: 2 / 3;
	background: var(--surface);
}

.shm-baby-card-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 15%;
}

.shm-baby-card-placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 0.75rem;
	font-size: 0.82rem;
	color: var(--text-muted);
	background: linear-gradient(165deg, var(--surface-elevated), var(--page));
}

.shm-baby-card-overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 2.1rem 0.7rem 0.55rem;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.4) 55%, transparent 100%);
	pointer-events: none;
}

.shm-baby-card-title {
	display: block;
	font-family: "Verdana", "Tahoma", sans-serif;
	font-size: 0.92rem;
	font-weight: 700;
	line-height: 1.28;
	color: #fff;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
	letter-spacing: 0.04em;
}

TABLE.shm-baby-manage-table {
	margin-top: 1.25rem;
	max-width: 56rem;
}

/*# sourceMappingURL=danbooru2.1775424516.9402371d6754a3049ef1ef26b58999ce.css.map */