@font-face {
    font-family: 'rdr-lino';
    src: url(rdr-lino.woff2);
}

@font-face {
    font-family: 'hapna-slab-serif';
    font-weight: 100;
    src: url(hapna-slab-serif-light.woff2);
}
@font-face {
    font-family: 'hapna-slab-serif';
    font-weight: 400;
    src: url(hapna-slab-serif-regular.woff2);
}
@font-face {
    font-family: 'hapna-slab-serif';
    font-weight: 500;
    src: url(hapna-slab-serif-medium.woff2);
}
@font-face {
    font-family: 'hapna-slab-serif';
    font-weight: 600;
    src: url(hapna-slab-serif-demibold.woff2);
}
@font-face {
    font-family: 'hapna-slab-serif';
    font-weight: 700;
    src: url(hapna-slab-serif-bold.woff2);
}
@font-face {
    font-family: 'hapna-slab-serif';
    font-weight: 900;
    src: url(hapna-slab-serif-extrabold.woff2);
}

body {font-family: 'rdr-lino'; color:#fff; user-select: none;}

body,html {margin:0;padding:0;height:100%;}

body {
    max-width: 1920px;
    max-height: 1080px;
    visibility: hidden;
}

body.visible {
    visibility: visible;
}

body.not-redm {
    /*background-image: url("test.jpg");*/
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

h1, h2, h3 {font-family: 'rdr-lino';}

#moneyContainer {
    position: absolute;
    top: 20px;
    right: 40px;
    width: 200px;
    font-size: 28pt;
    text-align: right;
    text-shadow: 2px 2px black;
    opacity: 0;
    transition: opacity 0.5s ease-in-out; /* fade-out */

}

.visible #moneyContainer {
    opacity: 1;
    transition: opacity 0.0s; /* instantly show */
}

#moneyDollars {
    margin-left: 4px;
    margin-right: 4px;
}

#moneyCents {
    vertical-align: initial;
    font-size: 19pt;
    position: relative;
    transform: translate(0px, -9px);
    display: inline-block;
}

#moneyCents::after {
    content: "";
    box-shadow: 2px 2px #000;
    width: calc(100% - 4px);
    background-color: #fff;
    height: 2px;
    display: inline-block;
    color: transparent;
    z-index: -1;
    position: absolute;
    left: 2px;
    top: 27px;
}

#roller {

    width: 545px;

    position: absolute;
    /* opacity: 1.0; */
    left: 40px;
    z-index: 2;
    top: 0%;
    height: 600px;
    transition: all 0.2s ease-in-out;
    display:flex;
}

#roller.on {
    transition: all 0.2s ease-in-out;
    top: 100%;
    height: 0px;
}

@keyframes fadeOut {
    0% {opacity: 1.0;}
    90% {opacity: 1.0;}
    100% {opacity: 0.0;}
}

@keyframes fadeIn {
    from {opacity: 0.0;}
    to {opacity: 1.0;}
}

#roller div {
    background-image: url(menu_roller_off_2.png);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    filter: brightness(0%);
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    margin-top:-50px;
    animation-name: fadeOut;
    animation-duration: 0.2s;
}

#roller.on div {
    opacity: 1;
    animation-name: none;
}

.menu {
    /*background-image: url("textures/inkroller_1a.png");*/
    position: absolute;
    margin: 0%;
    width:545px;
    top: 30px;
    left: 40px;
    bottom: 30px;
    clip-path: inset(0 0 100% 0);
    transition: clip-path 0.2s ease-in-out;
    display: none;
    color: #e6e6e6;
}

.menu.visible {
    display: block;
    clip-path: inset(0 0 0% 0);
}

.menuBg {
    background-image: url("menu_ink_1a.png");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    filter: brightness(0%);
    width: 100%;
    height: 100%;
    position: relative;
    opacity: 1.0;
}

.menuHeader {
    background-image: url(menu_header_1a.png);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    width: 432px;
    height: 108px;
    vertical-align: middle;
    text-align: center;
    font-size: 30px;
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
}

.menuHeader h1 {
    display: table-cell;
    font-size: 42px;
    margin: 0;
    margin-left: auto;
    margin-right: auto;
    font-weight: 100;
    color: #fff;
    line-height: 0.9;
    margin-top: 6px;
}

.menuSubtitle {
    margin-left:auto;
    margin-right:auto;
    vertical-align: middle;
    text-align: center;      
    font-size: 24px;      
    margin-top: 10px;
    font-weight: normal;
    font-family: 'rdr-lino';
    margin-bottom: 0;
}

.menuBody {
    position: absolute;
    top:0;
    left:0;
    bottom:0;
    right:0;
    padding:60px;
    padding-top: 30px;
    padding-bottom: 30px;
    display: flex;
    flex-direction: column;
    font-family: 'hapna-slab-serif';
    font-weight: 500;
}

.menuBodyMainArea {
    height: calc(52px * 2);
    overflow: hidden;
    position: relative;
    transition: opacity 0.2s;
}

.fade-out {
    opacity: 0;
    transition: opacity 0.2s;
}

.menuPage {
    display: none;
}

.menuScrollerTop, .menuScrollerBottom { 
    display: flex;
}

.menuScrollerTop > div, .menuScrollerBottom > div{ 
    height: 24px;
    background-size: 100% 24px;
    background-repeat: repeat-x;
}

/* Scroller top */

.menuScrollerTop > div:nth-child(1) {
    background-image: url(scroller_left_top.png);
    flex-grow: 1;
}

.menuScrollerTop > div:nth-child(2) {
    background-image: url(scroller_line_up.png);
    width: 24px;
}

.menuScrollerTop > div:nth-child(3) {
    background-image: url(scroller_right_top.png);
    flex-grow: 1;
}

.menuScrollerTop.arrow div:nth-child(2) {
    background-image: url(scroller_arrow_top.png);
}

/* Scroller bottom */

.menuScrollerBottom > div:nth-child(1) {
    background-image: url(scroller_left_bottom.png);
    flex-grow: 1;
}

.menuScrollerBottom > div:nth-child(2) {
    background-image: url(scroller_line_down.png);
    width: 24px;
}

.menuScrollerBottom > div:nth-child(3) {
    background-image: url(scroller_right_bottom.png);
    flex-grow: 1;
    position: relative;
}

.menuScrollerBottom.arrow div:nth-child(2) {
    background-image: url(scroller_arrow_bottom.png);
}

.menuScrollerCount {
    position: absolute;
    right: 0;
    bottom: 0;
}


.menuItem {
    height: 55px;
    position: relative;
    z-index: 1;
    font-weight: 600;
    font-size:16pt;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor:pointer;
}

.menuItem > div {
    margin: 10px;
}

.menuItem::before {
    content: ' ';
    display: block;    
    background-image: url(selection_box_bg_1d.png);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    position: absolute;
    width:100%;
    height:90%;
    filter: brightness(25%);
    opacity: 0.5;
    z-index: -1;
}

.menuItem.selected::after {
    content: ' ';
    display: block;    
    background-image: url(item_slim_highlight.png);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    position: absolute;
    width:100%;
    height:100%;
    z-index: 1;
}

.menuItem .switch::before, .menuItem .switch::after {
    content: ' ';
    display: inline-block;    
    background-image: url(selection_arrow_left.png);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    /*position: absolute;*/
    width:20px;
    height:20px;
    /*filter: brightness(25%);
    opacity: 0.5;*/
    margin-bottom: -2px;
    margin-right:10px;
}

.menuItem .switch::after {  
    background-image: url(selection_arrow_right.png);
    margin-right:0px;
    margin-left:10px;
}

.menuDetail {
    flex-grow: 1;
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
    flex-direction: column;
}

.menuItemDescription {
    background-image: url(list_item_h_line_narrow.png);
    background-size: 100% 4px;
    background-repeat: no-repeat;
    /*margin-bottom: -20px;*/
    font-size: 15pt;
    text-align: center;
    vertical-align: middle;
    width: 100%;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e3e3e3;
}

.menuItem tick {
    display: inline-block;    
    background-size: 100% 100%;
    background-repeat: no-repeat;
    /*position: absolute;*/
    width:20px;
    height:20px;
    /*filter: brightness(25%);
    opacity: 0.5;*/
    margin-bottom: -2px;
    margin-right:10px;
    border: 2px solid;
}

.menuItem tick[on] {  
    background-image: url(tick.png);
}

.menuItem tick[off] {  
    background-image: url(cross.png);
}

.menu.compact .menuBg
{
    background-image: url(inkroller_1a.png);
}

.menu.compact .menuBody
{
    padding: 50px;
}

.menu.compact .menuHeader
{
    background-image: url(list_item_h_line_narrow.png);
    background-size: 100% 4px;
    background-position: 0 50px;
    height: 54px;
    margin-top:-40px;
}

.menu.compact .menuHeader h1
{
    font-size:24px;
    margin-top: 0px;
}

.menu.compact h2::before, .menu.compact h2::after
{
    content: "Q";
    font-family: 'hapna-slab-serif';
    font-weight: 700;
    margin: 10px;
    font-size: 18px;
    width:30px;
    height:30px;
    display: inline-block;
    background-color: #e6e6e6;
    color: #000;
    transform: translateY(-4px);
}

.menu.compact h2::after
{
    content: "E";
}

.menu.compact .menuBodyMainArea {
    margin-top: 10px;
    background-image: url(grid_cell.png);
    background-size: 105px 105px;
    background-position: 0px 0px;
    background-attachment: local;
    width: 420px;
    margin-left:10px;
}

.menu.compact .menuPage.grid
{
    margin-left:-5px;
}

.menu.compact .grid .menuItem
{
    width: 105px;
    height: 105px;
    float: left;
    margin-left: 5px;
    margin-right: -5px;
    display: block;
}

.menu.compact .grid .menuItem div {
    margin: 5px;
    text-align: center;
}

.menu.compact .grid .menuItem img {
    width:90px;
    height:90px;
    margin-top: 4px;
}

.menu.compact .grid .menuItem::before {
    /*background-image: url(inkroller_1a.png);*/
    background-image: none;
    height:100%;
}

.menu.compact .grid .menuItem.selected::after {
    background-image: url(item_square_highlight.png);
    top: 0px;
}

.menu.compact .grid .menuItem quantity {
    display: flex;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    position: absolute;
    bottom: 7px;
    right: 7px;
    width: 30px;
    height: 30px;
    padding-top: 0px;
    border: 2px solid;
    background-color: #ffffffb0;
    color: #000;
    border-radius: 100px;
    font-family: 'rdr-lino';
    justify-items: center;
    font-weight: 100;
    justify-content: center;
    align-items: self-end;
}

.menu.compact .grid .menuItem onHorse {
    display: inline-block;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    position: absolute;
    top: 7px;
    right: 7px;
    width: 50px;
    height: 50px;
    background-image: url(horse_equipped.png);
}

.menuNav {
    text-align: center;
    display: flex;
    align-items: center;
    justify-items: center;
    justify-content: center;
    gap: 10px;
}

.menuNav img {
    display: block;
    width:32px;
    opacity: 0.25;
}

.menuNav img.selected {
    opacity: 1.0;
}