:root {
    /* Overall */
    --margins: 10px;
    --bg: color-mix(in srgb, rgb(161, 84, 63), rgb(54, 17, 0) 25%);
    --primary: #ffddc2;
    --border: 2px;
    --radius: 4px;
    --font: "PF Square Sans Pro", sans;

    /* Sections */
    --bg-trans: transparent;
    --shadow-x: 6px;
    --shadow-y: 6px;
    --shadow-blur: 0px;
    --shadow-color: rgba(0, 0, 0, 0.2);

    /* Section headers */
    --header-bg: color-mix(in srgb, #FF9C4D, black 15%);
    --header-text: white;

    /* Info */
    --button-bg: #4b2800;
    --button-text: white;
    --button-hover-bg: white;
    --button-hover-text: black;
}

@media (orientation: portrait) {
    div.main {
        width: 100%;
        justify-content: space-between;
        box-sizing: border-box;
    }

    body {
        background-color: var(--bg);
        color: var(--primary);
        box-sizing: border-box;
        margin: 0;
        padding: var(--margins);
        height: 100%;
        font-family: var(--font);
        background-position: center;
        background-repeat: no-repeat;
        background-attachment: fixed;
        border-radius: var(--radius);
    }
    section {
        background-color: var(--bg-trans);
        overflow: hidden;
        margin-bottom: calc(var(--margins) * 2);
        border: var(--border) solid var(--primary);
        border-radius: var(--radius);
        box-shadow: var(--shadow-x) var(--shadow-y) var(--shadow-blur) var(--shadow-color);
    }
    .sans {
        display: flex;
        flex-direction: column;
    }
    
    button {
        font-size: 16px;
    }
    .preview {
        height: 25rem;
    }
}

@media (orientation: landscape) {
    div.main {
        display: grid;
        grid-template-columns: repeat(2, 5fr) 3.7fr;
        grid-template-rows: 1fr;
        grid-column-gap: var(--margins);
        grid-row-gap: var(--margins);
        width: 100%;
        justify-content: space-between;
        box-sizing: border-box;
    }

    body {
        background-color: var(--bg);
        color: var(--primary);
        box-sizing: border-box;
        margin: 0;
        padding: var(--margins);
        background-image: url("images/logo.svg");
        background-position: center;
        background-repeat: no-repeat;
    }

    section {
        background-color: var(--bg-trans);
        display: flex;
        flex-direction: column;
        overflow: hidden;
        border: var(--border) solid var(--primary);
        border-radius: var(--radius);
        height: calc(100vh - (var(--margins) * 3));
        box-shadow: var(--shadow-x) var(--shadow-y) var(--shadow-blur) var(--shadow-color);
    }

    section .data {
        overflow: scroll;
    }
    
}

.angles {
    grid-area: 1 / 1 / 2 / 2;
}

.outfits {
    grid-area: 1 / 2 / 2 / 3;
}

.sans {
    grid-area: 1 / 3 / 2 / 4;
}

h1 {
    background-color: var(--header-bg);
    color: var(--header-text);
    margin: 0;
    padding: 10px;
    font-size: 16px;
    border-bottom: var(--border) solid;
    font-family: var(--font);
    text-align: center;
}

h2 {
    text-align: center;
    margin: 10px 0px;

}

h3 {
    margin: 0;
    text-align: center;
    font-family: var(--font);
    padding: 5px;
    font-size: 20px;
    border-bottom: 1px dotted;
}

h5 {
    font-family: var(--font);
    margin: 0;
}

.tableSeparator {
    margin: 0;
    text-align: center;
    padding: 5px;
    font-weight: bold;
    font-size: 16px;
    border-bottom: 1px dotted;
}

#title {
    display: flex;
    justify-content: center;

}

ul {
    margin: 0;
    padding-left: 15px;
}

#title h2 {
	width: 100%;
	font-family: var(--font);
	font-size: 2.4em;
	margin: 12px 0 -6px 0;
}

#title img {
    padding: 10px;;
}
.selector {
    display: flex;
    width: 100%;
    font-size: 18px;
    padding: 20px;
    color: inherit;
    text-decoration: none;
    justify-content: space-between;
    box-sizing: border-box;
}

.preview {
	flex: 1;
	overflow: auto;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	margin: 24px 0;
}

img.bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    width: 100%;
    height: 100%;
    background-color: var(--primary);
}

.selector b {
    font-family: var(--font);
    font-size: 1.4em;
}

.selector button {
    display: block;
}

.selector button:hover {
    transform: scale(1.05);
}

.selector button:active {
    transform: scale(0.95);
}

table {
    font-size: 14px;
    width: 100%;
}

td {
    border-bottom: 1px dotted;
    font-family: var(--font);
    font-size: 0.95em;
    font-weight: 500;
}

th {
	font-family: var(--font);
	border-right: 1px dotted;
	border-bottom: 1px dotted;
    font-size: 1.1em;
	text-align: right;
	padding-right: 3px;
	vertical-align: top;
}

.rowfit {
    width: 1%;
    white-space: nowrap;
}

.hasTooltip {
    border-bottom: 1px dashed white;
}

section.sans {
    display: flex;
    justify-content: initial !important;
}

.hex {
	font-family: "Ubuntu Mono", monospace;
	text-align: center;
	padding: 0 4px 0 4px;
    font-weight: bold;
}

.mono {
    font-size: 10px;
}


table tr td {
    border-right: 1px dotted;

}

td button {
    background-color: var(--button-bg);
    color: var(--button-text);
    border: 0;
    border-radius: var(--radius);
}

button:hover {
    background-color: var(--button-hover-bg);
    color: var(--button-hover-text);
}

button:active {
    background-color: black;
    color: white;
}

.selector button {
	background-color: var(--primary);
	color: var(--bg);
	border: 0;
	border-radius: var(--radius);
	padding: 6px 12px;
}

h6 {
    margin: 2px;
}
h6 a {
    font-size: 0.8em;
    padding-left: 5px;
    font-family: var(--font);
    font-weight: normal;
    font-style: italic;
    color: var(--primary);
    float: right;
    padding: 6px 8px 0 0;
}

h6 a:hover {
    color: #ff8600;
}

.toggle {
    display: inline;
    position: absolute;
    top: 60px;
    left: 20px;
}

.toggle form {
    font-family: var(--font);
    font-size: 10px;
}

.toggle form input {
    width: 10px;
    height: 10px;
}

/* my own bullshit */

#dataSection {
    font-size: 1.3em !important;
}

table {
    font-size: 0.75em !important;
    font-weight: 600;
}

table > thead > tr > th, td {
    line-height: 24px;
}

td > ul > li {
    line-height: 18px;
}

#title > h2 {
    -webkit-text-stroke: 0.15em #EB6F4C;
    paint-order: stroke fill;
}

/* ---------------- */