:root {
    --s1: #f3982d; --s2: #dc5800;
    --cBG: #393939; --offX: 0;
}

html, body {
    background-color: var(--cBG);
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;

    color: #fff;
}

a {
    color: var(--s2);
}

.frame {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    width: 80%;
    max-width: 605px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 40px;

    padding: 20px 20px 40px 20px;
}

header {
    display: flex;
    flex-direction: column;

    margin-bottom: 20px;
}

h1 {
    text-align: center;
}

img {
    margin: auto;
}

header > span {
    margin: 0.5em auto;
}

input {
    background: transparent;
    border: 0;
    outline: 0;
    border-bottom: 4px solid var(--s2);

    padding: 0.5em;
    font-size: 1em;
    color: var(--s1);
    box-sizing: border-box;
}
input:focus {
    border-bottom: 4px solid var(--s1);
    caret-color: var(--s1);
}

.hide {
    display: none;
}
.invis {
    visibility: hidden;
}

header > img {
    width: 100px;
    height: 100px;
}

.ct {
    text-align: center;
}

.code_row {
    position: relative;
    display: inline-flex;
    flex-wrap: wrap;
}
.code_row > div {
    display: inline-flex;
    gap: 5px;
}

.code_row > div > div {
    border-bottom: 4px solid var(--s2);

    padding: 0.5em;
    font-size: 1em;
    color: var(--s1);
    box-sizing: border-box;

    width: 40px;
    height: 40px;
}

.code_row > div:before,
header > span > span:before {
    display: inline-flex;
    align-items: center;
    content: "\2014";
}

html[dir='ltr'] .code_row > div:before,
html[dir='ltr'] header > span > span:before {
    margin-left: 5px;
}
html[dir='rtl'] .code_row > div:before,
html[dir='rtl'] header > span > span:before {
    margin-right: 5px;
}

.code_row > div:first-child:before,
header > span > span:first-child:before {
    display: none;
}

.code_row > input {
    position: absolute;
    display: inline;
    width: 40px;
    height: 40px;
    text-align: center;

    /* Doesn't need RTL-specific override*/
    left: var(--offX);
    top: var(--offY);
}

button {
    display: block;
    padding: 0.5em 1em;
    margin: 0.5em 0;
}

@media only screen and (max-height: 600px) {
    header.shrink {
        margin-bottom: 20px;
    }
    header.shrink > h1 {
        display: none;
    }
    header.shrink > img {
        width: 48px;
        height: 48px;
    }
}

@media only screen and (max-height: 400px) {
    header {
        margin-bottom: 20px;
    }

    header > h1 {
        font-size: medium;
    }
    header.shrink > h1 {
        display: none;
    }

    header > img {
        width: 48px;
        height: 48px;
    }
}
