/* General styling */
body {
    margin: 0;
    font-family: "Hiragino Maru Gothic ProN","Trebuchet MS",sans-serif;/*get Google substitute font*/
}
body * { box-sizing: border-box; }

table { border-spacing: 0; }
td { padding: 0; }
textarea { margin-top: 0;/*to fix Firefox weirdness*/ resize: none; }





/* Content styling */
/*~ Common styling */
#top, #postbg, #signbg, #post, #sidebar { position: absolute; }



/*~ Top bar (subscribe, credits, meet the developer) */
#top {
    width: calc(100vw - 252px); height: 36px;
    background-image: linear-gradient(to right,rgb(112,0,128),rgb(224,0,255));/*solid color fallback*/
}
#top .topitem { display: inline-block; line-height: 36px; padding: 0 9px; }
#top a { color: white; text-decoration: none; }
#top a:hover { text-decoration: underline; }



/*~ Signature background div*/
#signbg {
    top: 36px; width: 100vw; height: calc(100vh - 36px);/*Modernizr polyfill*/
    background-image: url("Graphics/1x/signature.png");/*browsers other than Safari don't like "cross-origin" images, til (this was originally http://prayag.hudsons.network/Graphics/signature.png*/
    background-size: contain;
    background-repeat: no-repeat;
}



/*~ Post container */
#post, #postbg {
    top: 36px; 
    width: calc(100vw - 252px);/*Modernizr polyfill*/
    height: calc(100vh - 36px);/*Modernizr polyfill*/
}
#post { overflow: auto; }
#postbg {
    background-image: linear-gradient(rgb(248,192,255),rgb(240,128,255)40%,rgb(240,128,255)60%,rgb(248,192,255));/*webkit, solid color fallback*/
    /*background-image: linear-gradient(to right,rgb(240,128,255),rgb(248,192,255)20%,rgb(248,192,255)80%,rgb(240,128,255));/*webkit, solid color fallback*/
}
#post #postcontent { width: 628px; margin: auto; }

#post #postcontent * { max-width: 100%; }
#post #postcontent .minor { font-size: small; color: rgb(112,0,128); }

#post #postcontent #postheader {
    padding: 8px;
    background-image: radial-gradient(farthest-side at bottom,rgba(224,0,255,.5),rgba(224,0,255,0));/*solid color fallback*/
}
#postheader * { margin: 0; }
#postheader #posttitle { font-size: 1.5em; font-weight: bold; }
#postheader .minor { text-align: right; }

#post #postcontent #postbody { padding: 8px 8px 0; }
#postbody * { margin: 0 0 8px; }
#postbody img { height: auto; }

#postbody #postinfo {
    margin-top: 16px; border: 2px solid black; padding: 8px;
    background-image: linear-gradient(rgba(255,255,255,0),rgba(255,255,255,.5));/*webkit, solid color fallback*/
}
#postinfo * { margin: 0; }
#postinfo table { width: 100%; }
#postinfo td { padding-top: 4px; }
#postinfo #abouttitle { font-size: 1.25em; font-weight: bold; }
#postinfo .detail {
    width: 75%; text-align: right; vertical-align: bottom;/*for mobile*/
}





/*~ Browse & comments sidebar */
#sidebar {
    right: 0; width: 252px; height: 100%;
    background-image: linear-gradient(rgb(112,0,128),rgb(224,0,255));/*solid color fallback*/
}
#sidebar #rssbtn, #sidebar #infobtn {
    display: block; position: absolute; height: 24px; top: 8px;
}
#sidebar #infobtn { right: 8px; }
#sidebar #rssbtn { right: 40px; } 

#sidebar .switcherbtn {
    display: block; position: absolute;
    top: 40px; width: 118px; height: 26px; border: solid white;
}
#sidebar .switcherbtn:hover { cursor: pointer; }
#sidebar #browsebtn { left: 8px; border-width: 2px 1px 0 2px; }
#sidebar #commentsbtn { right: 8px; border-width: 2px 2px 0 1px; }

#sidebar .sbbox {
    position: absolute; top: 66px; left: 8px;
    width: 236px; height: calc(100% - 74px);/*Modernizr polyfill*/
    border: 2px solid white; overflow: auto;
}

#sidebar #browsebox {
    padding-bottom: 16px; overflow: auto;
    background-color: rgb(0,0,64);
    background-image: url("Graphics/1x/browsebg.png");
}
#sidebar #browsebox a { color: inherit; text-decoration: none; }
#sidebar #browsebox .monthmarker {
    padding: 2px 8px; margin-top: 16px;
    border: solid rgb(0,0,64); border-width: 2px 0;
    font-size: small; font-weight: bold;
    background-image: linear-gradient(to right,rgba(255,255,255,.75),rgba(255,255,255,.5));/*webkit, solid color fallback*/
}
#sidebar #browsebox .entry {
    margin-top: 16px; border: solid rgb(0,0,64); border-width: 2px 0;
    background-image: linear-gradient(to right,rgb(192,192,255),rgb(96,96,128));/*webkit, solid color fallback*/
}
#sidebar #browsebox .entry * { padding: 4px 8px; }
#sidebar #browsebox .entrytitle { word-wrap: break-word; }
#sidebar #browsebox .entrydate {
    font-size: small; text-align: right; color: white;
    background-image: linear-gradient(to right,rgb(64,64,128),rgb(32,32,64));/*webkit, solid color fallback*/
}

#sidebar #commentsbox {
    background-color: rgb(0,64,0);
    background-image: url("Graphics/1x/commentsbg.png");
    overflow: hidden;
}

#sidebar #commentsbox #commentslist {
    height: calc(100% - 188px); padding-bottom: 16px; overflow: auto;
}
#commentslist .comment {
    margin-top: 16px; border: solid rgb(0,64,0); border-width: 2px 0;
    background-image: linear-gradient(to right,rgb(192,255,192),rgb(96,128,96));/*webkit, solid color fallback*/
}
#commentslist .comment * { padding: 4px 8px; }
#commentslist .cmtname {
    position: relative; height: 32px; line-height: 24px; overflow: hidden;
}
#commentslist .cmtname, #commentslist .cmtdate {
    color: white;
    background-image: linear-gradient(to right,rgb(64,128,64),rgb(32,64,32));/*webkit, solid color fallback*/
}
#commentslist .cmtname img {
    display: block; position: absolute; padding: 0;
    top: 6px; right: 6px; width: 20px; height: 20px;
}
#commentslist .cmttext, #commentslist .cmtdate { font-size: small; }
#commentslist .cmttext {
    word-wrap: break-word; max-height: 168px; overflow: auto;
}
#commentslist .cmtdate { text-align: right; height: 28px; line-height: 20px; }

#sidebar #commentsbox #commentsform {
    padding: 8px; height: 188px; font-size: small;
    color: white; border: solid white; border-width: 2px 0 0;
    background-image: linear-gradient(rgba(0,0,0,.5),rgba(0,255,0,.5));/*webkit, solid color fallback*/
}
#commentsform span { display: block; margin-bottom: 4px; font-weight: bold; }
#commentsform #cmtpost { display: none; }
#commentsform table { width: 100%; }
#commentsform table td { vertical-align: top; }
#commentsform .label { width: 72px; }
#commentsform .input * {
    display: block; margin-bottom: 4px; width: 100%;
    border: 1px solid black; border-radius: 0;/*for mobile Safari weirdness*/
}
#commentsform .input input { height: 18px; }
#commentsform .input textarea { height: 72px; }
#commentsform .submit button {
    display: block; width: 100%; height: 26px; padding: 0;
    border: 1px solid black; background: none;
}
#commentsform .submit button img { display: block; width: 100%; height: 100%; }
/* ~~Form styling is so annoying...~~ */





/* Responsive styling */
@media (max-width: 879px) {
    #sidebar { position: fixed; left: 100vw; }
    #top, #post, #postbg, #signbg { width: 100vw; }
}

@media (max-width: 627px) {
    #post #postcontent { width: 100%; }
}
