* {
    box-sizing: border-box;
}
body {
    position: relative;
    min-height: 100vh;
    line-height: 1.7;
    margin: 0;
    background: linear-gradient(#eee, #fff 100px) #f7f7f7;
    font-family: sans-serif;
    font-size: 14px;
    color: #666;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="tel"],
input[type="password"],
select {
    height: 36px;
    background: #eee;
    border: 0;
    border-radius: 3px;
    padding-left: 5px;
    transition: 150ms;
    box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.03);
    outline: 0;
}
input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
select {
    background: #fff;
    box-shadow: 0 0 0 1.5px #5d94e2;
}

a {
    color: #41bad8;
}

.button,
.large-button {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 38px;
    background: #5d94e2;
    border: 0;
    border-radius: 18px;
    color: #fff;
    transition: 150ms;
    text-decoration: none;
}
.large-button.secondary {
    background: #747b84;
}
.button {
    padding-left: 1em;
    padding-right: 1em;
}
.large-button {
    width: 100%;
}
.button,
.large-button:active {
    background: #497ec7;
}
.button.secondary,
.large-button.secondary:active {
    background: #5b6571;
}

.spacer {
    flex: 1;
}

.hidden {
    display: none;
}

.common-header {
    background: #7074cc;
    padding: 12px 12px;
}
.common-header .logo {
    margin-bottom: 12px;
    font-size: 26px;
    text-align: center;
}
.common-header .logo a {
    color: #fff;
    text-decoration: none;
}
.common-header .main-menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}
.common-header .main-menu a {
    color: #fff;
    margin: 0 8px;
    font-size: 16px;
    text-decoration: none;
}

.common-footer {
    margin: 32px 12px 0;
    padding: 20px 2px;
    border-top: solid 1px #ddd;
}
.common-footer nav a {
    display: block;
    color: inherit;
    text-decoration: none;
    font-size: 15px;
}
.common-footer .copyright {
    margin-top: 20px;
    font-size: 13px;
    text-align: center;
}

.page-title {
    background: #cee6ff;
    margin-bottom: 20px;
    padding: 14px 10px 8px;
    text-align: center;
}
.page-title h1 {
    line-height: 1;
    margin: 0;
    font-size: 22px;
    font-weight: normal;
    color: #000;
}
.page-title .sub-title {
    font-size: 13px;
    color: #536c92;
}

.common-error-message {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 200px);
    margin-bottom: 12px;
    white-space: pre-line;
}

#container {
    max-width: 1000px;
    margin: auto;
}
main {
    display: block;
    margin: auto;
}
.page-content {
    padding: 0 12px;
}
.page-content.hidden {
    display: none;
}

.page-top-message {
    background: #d7eacc;
    border-radius: 4px;
    margin-top: 12px;
    padding: 12px 16px;
}

.placeholder {
    height: 100px;
    background: #ddd;
    border-radius: 8px;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.6);
    z-index: 100000;
    transition: 200ms;
}
.loading-overlay:not(.active) {
    opacity: 0;
    pointer-events: none;
}
.loading-circle-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 100px 0;
}
.loading-circle {
    width: 64px;
    height: 64px;
    border: solid 5px #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: loading-circle 0.5s infinite linear;

    &.black {
        border-color: #444;
        border-top-color: transparent;
    }
}
@keyframes loading-circle {
    from {
        transform: rotate(0);
    }
    to {
        transform: rotate(1turn);
    }
}

.common-dialog-container {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 20px 10px;
    backdrop-filter: blur(5px);
    transition: opacity 150ms;
}
.common-dialog-container .common-dialog {
    max-width: 500px;
    width: 100%;
    max-height: calc(100vh - 80px);
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    overflow-y: auto;
}
.common-dialog-container .common-dialog .dialog-title {
    margin-bottom: 3px;
    font-size: 18px;
}
.common-dialog-container .common-dialog .operations {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin-top: 18px;
}
.common-dialog-container .common-dialog .operations > *:not(:last-child) {
    margin-right: 12px;
}
.common-dialog-container .common-dialog .operations > .button {
    min-width: 80px;
}
.common-dialog-container:not(.visible) {
    opacity: 0;
    pointer-events: none;
}
.common-dialog-container.sync-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    align-items: flex-start;
}
.common-dialog-container.sync-background .common-dialog {
    max-height: unset;
    overflow-y: unset;
}

.common-message {
    padding: 12px 0;
}

.sign-in-panel {
    padding-top: 40px;
}

.common-form section {
    padding: 8px 0;
}
.common-form.splitted > section {
    padding: 16px 0;
    border-bottom: solid 1px #aaa;
}
.common-form section > .label {
    font-size: 90%;
}
.common-form section > .value :where(input, select) {
    width: 100%;
}
.common-form section > .value .note {
    padding-top: 3px;
    font-size: 80%;
    color: #4271b7;
}
.common-form section > .value .error {
    font-size: 80%;
    color: #d12b49;
}
.common-form section > .value .static-form-data {
    border: solid 1px #ddd;
    padding: 3px;
}
.common-form .operation {
    display: flex;
    justify-content: center;
    padding: 16px 0;
}
.common-form .operation .large-button {
    width: 90%;
}
.common-form .error-message {
    margin-top: 12px;
    color: #e5626d;
}
.common-form .error-message i {
    margin-right: 0.5em;
}
.common-form.boxed-label section > .label {
    width: fit-content;
    background: #666;
    color: #fff;
    padding: 1px 10px;
    border-radius: 3px 3px 0 0;
}

.charge-value-section {
    background: #e4f0fc;
    border-bottom: unset !important;
    border-radius: 5px;
    margin: 10px 0;
    padding: 20px 12px !important;
}

.vertical-menu {
    padding: 10px 0;
}
.vertical-menu > *:not(:last-child) {
    margin-bottom: 12px;
    text-decoration: none;
}

.wallpapers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px 0;
}
.wallpapers .wallpaper {
    position: relative;
    display: block;
    background: #eee;
    border: solid 1px #ddd;
    border-radius: 5px;
    margin-bottom: 12px;
    text-decoration: unset;
    color: inherit;
    aspect-ratio: 1 / 1.5;
}
.wallpapers .wallpaper:not(:last-child) {
    margin-bottom: 12px;
}
.wallpapers .wallpaper img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 5px;
    object-fit: cover;
}
.wallpapers .wallpaper .purchased {
    position: absolute;
    top: -4px;
    left: -4px;
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 6px;
    background: #e53757;
    border-radius: 3px;
    margin-right: 4px;
    color: white;
    font-weight: bold;
    font-size: 12px;
}

.category-section {
    background: #eee;
    border: solid 2px #666;
    margin: 24px 12px 48px;
    border-radius: 4px;
}
.category-section .category-header {
    background: #666;
    padding: 0 10px;
    color: #fff;
    font-size: 150%;
    text-align: center;
}
.category-section .category-footer {
    padding: 0 12px 12px;
}
.category-section .no-contents {
    padding: 40px 0;
    text-align: center;
    color: #777;
}
.category-section .wallpaper-container {
    padding: 0 10px;
}

.simple-pager {
    display: flex;
    align-items: center;
    padding: 8px 0;
}

.document-links {
    padding-top: 32px;
}
.document-links section {
    display: flex;
    align-items: flex-start;
    padding: 8px 6px;
}
.document-links section input {
    margin: 4px 12px 0 0;
}

.purchase-detail {
    background: #fff;
    border: solid 2px #ddd;
    border-radius: 12px;
    margin: 0 8px;
    padding: 16px 16px 8px;
}
.purchase-detail .purchase-detail-title {
    border-bottom: solid 3px #e280a3;
    margin-bottom: 8px;
    font-size: 19px;
}
.purchase-detail > .section {
    display: flex;
    align-items: center;
    padding: 12px 0;
}
.purchase-detail > .section:not(:last-child) {
    border-bottom: solid 1px #ddd;
}
.purchase-detail > .section > .label {
    width: 80px;
    margin-right: 20px;
    font-size: 90%;
}
.purchase-detail > .section > .value {
    flex: 1;
}

.sub-panel:not(.active) {
    display: none;
}

.credit-card-logos {
    background: #fff;
    border-bottom: solid 1px #aaa;
    padding: 10px 0;
    text-align: center;
}
.credit-card-logos img {
    width: 200px;
}

.common-checkbox-container {
    padding: 2px 5px;
}
.common-checkbox-container label {
    display: flex;
    align-items: flex-start;
    width: fit-content;
    padding: 6px 0;
}
.common-checkbox-container label input {
    margin-right: 0.5em;
}
.common-checkbox-container label span {
    line-height: 1.4;
}

#page-sign-up-plans .sections {
    padding: 10px 0;
}
#page-sign-up-plans .sections section {
    padding: 20px 0;
}
#page-sign-up-plans .sections section:not(:last-child) {
    border-bottom: solid 1px #ddd;
}
#page-sign-up-plans .sections section select {
    width: 100%;
    height: 32px;
    margin-top: 6px;
}
#page-sign-up-plans .static-plan:not(.active) {
    display: none;
}
#page-sign-up-plans .static-plan .static-plan-name {
    background: #ddd;
    border-radius: 3px;
    padding: 6px 8px;
}

#page-purchase .top-message {
    margin: 20px 0 10px;
}
#page-purchase .wallpaper-info {
    margin-bottom: 32px;
}

#page-sign-in-sms .sub-panel {
    padding: 80px 12px 42px;
}
#page-sign-in-sms input {
    width: 100%;
    margin: 6px 0;
}
#page-sign-in-sms .operations {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 50px;
}
#page-sign-in-sms .operations .large-button {
    width: 70%;
    margin-bottom: 20px;
}

#page-point-charges .point-charges .point-charge {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f7f7f7;
    border-radius: 6px;
    margin-bottom: 10px;
    padding: 8px 10px;
}
#page-point-charges .point-charges .point-charge .point {
    font-size: 16px;
    font-weight: bold;
    color: #17984d;
}
#page-point-charges .point-charges .point-charge .expires-at {
    font-size: 11px;
}
