:root {
    text-autospace: normal;
}

@media (orientation: portrait) {
    .desktop-only { display: none; }
}

@media (orientation: landscape) {
    .mobile-only { display: none; }
}

html {
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* Internet Explorer 10+ */
}

body {
    max-width: 500px;
    margin: auto;
    padding: 0;
    font-family: 'Roboto', sans-serif;
}

a {
    all: unset;
}

.full_width {
    width: 100%;
}

.avatar {
    border-radius: 50%;
}

.column_list {
    margin: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.row {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

.headline {
    padding-left: 16px !important;
    padding-right: 16px !important;
}

.code{
    font-family: monospace;
    font-size: smaller;
    word-break: break-word;
}

#cards_carousel {
    margin: 1rem 0 2rem 0;
    max-width: 100%;
    overflow-x: auto;
    display: flex;
    gap: 1rem;
    padding: 0 5rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* Internet Explorer 10+ */
}

.recommend_character_card {
    height: 58vh;
    aspect-ratio: 1 / 1.5;
    object-fit: cover;
    border-radius: 1rem;
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

#rank_selector {
    margin: 1rem;
}

#character_card_list .item {
    height: 5rem;
    padding: 0 1rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    border-radius: 1rem;
    background-color: rgb(var(--mdui-color-surface-container-low));
}

#character_card_list .item .avatar {
    width: 3rem;
    height: 3rem;
}

#character_card_list .item .info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

#character_card_list .item .info .name {
    margin: 0 !important;
}

#character_card_list .item .info .detail {
    margin: 0 !important;
    font-size: small;
    color: rgb(var(--mdui-color-outline));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.chat_card::part(icon) {
    width: 3rem;
    height: 3rem;
}

.chat_card::part(description) {
    color: rgb(var(--mdui-color-outline));
    margin-top: 0.25rem;
    font-size: small;
}

.message_headline {
    padding-left: 8px !important;
    padding-right: 16px !important;
}

.message_headline_name {
    font-size: large;
    margin: 5px;
}

.center_icon {
    width: 150px;
    height: 150px;
    margin-bottom: 50px;
}

.user_basic_info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    margin: 32px;
}

#user_info_avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
}

.user_info {
    flex: 1 1 auto;
}

#user_info_name {
    font-size: 28px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 6em;
}

#user_info_id {
    color: rgb(var(--mdui-color-outline));
    margin: 0;
}

#user_setting_list {
    margin: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.setting_card {
    height: 82px;
    padding: 0 16px;
    display: flex;
    flex-direction: row;
    align-items: center;
    border-radius: 16px;
    background-color: rgb(var(--mdui-color-surface-container-low));
    gap: 16px;
}

.setting_card_icon {
    font-size: 32px;
    line-height: 38px;
}

.setting_card_text {
    display: flex;
    flex-direction: column;
    justify-content: start;
}

.setting_card_name {
    font-size: medium;
    margin: 0;
}

.setting_card_detail {
    font-size: smaller;
    color: rgb(var(--mdui-color-outline));
    margin: 0;
}

.character_info_page {
    margin: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.character_info_avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 !important;
}

.character_info_name {
    margin: 0 !important;
}

.character_info_subtitle {
    margin: 0 !important;
    font-size: large !important;
}

.character_info_tags {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.character_info_introduction {
    font-size: small;
}

.start_chat_button {
    width: 100%;
}

.login_fail_alert {
    color: rgba(var(--mdui-color-error));
    font-size: small;
    text-align: center;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.login_title {
    margin-bottom: 0 !important;
}

.dialog_danger_button {
    background-color: rgb(var(--mdui-color-error)) !important;
    color: rgb(var(--mdui-color-on-error)) !important;
}

.character_info_buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
    width: 100%;
}

.no_data_hint {
    margin-top: 64px;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: large;
    text-align: center;
    color: rgb(var(--mdui-color-secondary));
}

.no_data_icon {
    font-size: 20vh;
    color: rgb(var(--mdui-color-secondary-container));
}

#navirail_user_avatar,
#headline_user_avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

mdui-menu {
    min-width: 200px;
}

.register_page {
    display: flex;
    gap: 16px;
    flex-direction: column;
    margin: 32px
}

.introduction {
    margin-top: 16px;
}

.textfield_error_helper {
    color: rgb(var(--mdui-color-error))
}

.register_step_title {
    margin-bottom: 16px !important;
}

.action_bar {
    display: flex;
    flex-direction: row;
    gap: 16px;
    justify-content: space-between;
    margin-top: 16px;
}

.action_bar_button {
    flex-grow: 1;
}

.email_verification_code_box {
    display: flex;
    align-items: center;
    gap: 16px;
}

.register_complete_page {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin: 32px;
}

#loading_circle {
    width: 24px;
}

#input_bar_send_button {
    display: flex;
    align-items: center;
}

.message_page #banner {
    position: fixed;
    top: 64px;
    box-sizing: border-box;
    z-index: 999;

    width: 100%;
    max-width: 500px;
    background-color: rgb(var(--mdui-color-error-container));

    display: flex;
    gap: 1em;
    justify-content: center;
}

.message_page #banner .text{
    color: rgb(var(--mdui-color-on-error-container));
    text-align: center;
    font-weight: bold;
}

.message_page #banner .action{
    color: rgba(var(--mdui-color-on-error-container),0.8);
    text-align: center;
    text-decoration: underline;
    font-size: 0.95em;
}

.error_message {
    background-color: rgba(var(--mdui-color-error-container), 0.5);
    color: rgb(var(--mdui-color-error));
    padding: 8px 16px;
    border-radius: 16px;
    font-size: small;
}

#choice:not(:empty) {
    padding: 8px 16px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap-reverse;
    gap: 8px;
}

.message_page {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.my_credit_info {
    display: flex;
    align-items: end;
    gap: 8px;
}

.credit_page {
    margin: 24px;
}

.credit_info {
    display: flex;
    align-items: end;
    justify-content: space-between;
}

.credit_info .hint {
    color: rgb(var(--mdui-color-secondary));
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    font-size: smaller;
}

.goods {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: space-around;
    margin: 16px 0;
}

.ware {
    background-color: rgb(var(--mdui-color-surface-container-low));
    padding: 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    flex-direction: column;
    flex-grow: 1;
    width: 35%;
}

.ware h2 {
    margin-top: 0 !important;
    margin-bottom: 0
}

.ware p {
    font-size: smaller;
    margin-bottom: 8px;
    color: rgb(var(--mdui-color-secondary))
}

.credit_page .other_button {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
}

.mdui-drawer .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 2301;
}

.mdui-drawer .overlay.open {
    opacity: 1;
    visibility: visible;
}

.mdui-drawer .drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgb(var(--mdui-color-surface-container-low));
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s;
    z-index: 2302;
    padding: 24px;
    padding-bottom: 48px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mdui-drawer .drawer.open {
    transform: translateY(0);
}

.drawer_content {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 16px;
    text-align: center;
    justify-content: center;
}

.drawer_content h2 {
    margin-bottom: 0;
    margin-top: 0;
}

.drawer_content p {
    margin-top: 0;
    margin-bottom: 0;
    color: rgb(var(--mdui-color-secondary));
    font-size: smaller;
}

.drawer_content .payment {
    width: 100%;
    color: #FFF
}

.drawer_content .payment img {
    width: 24px
}

.mdui-drawer .close_drawer {
    position: fixed;
    top: 0.5em;
    right: 0.5em;
    color: rgb(var(--mdui-color-secondary-container))
}

.charge_success_title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgb(var(--mdui-color-primary));
    font-size: larger;
}

.recent_chat {
    background-color: rgb(var(--mdui-color-surface-container));
    border-radius: 16px;
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 16px;
    width: 100%;
    margin: 0 16px;
}

.recent_chat .avatar {
    width: 3rem;
    height: 3rem;
}

.recent_chat .info {
    max-width: 40%;
}

.recent_chat .name {
    text-align: left;
    color: rgb(var(--mdui-color-on-primary-container)) !important;
    font-size: medium !important;
}

.recent_chat .detail {
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
}

.drawer_content img {
    margin-bottom: 0;
}

.drawer_content #back_to_chat_list {
    width: 100%;
}

.chip {
    padding: 0 0.875rem;
    border-radius: var(--mdui-shape-corner-small);
    background-color: rgb(var(--mdui-color-surface));
    border: .0625rem solid rgb(var(--mdui-color-outline));
    color: rgb(var(--mdui-color-on-surface));
    font-size: var(--mdui-typescale-label-large-size);
    line-height: 30px;
}

#credit_log_list, #order_list{
    margin: 16px;
}

.credit_log_value {
    font-size: 18px;
}

.setting_list {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin: 32px;
}

.setting_list .item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    max-width: 100%;
}

.setting_list .item .text {
    min-width: 0;
}

.setting_list .item .current_value {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.setting_list .item .current_value .text {
    color: rgb(var(--mdui-color-secondary))
}

.setting_list .item .text .name {
    font-size: large;
}

.setting_list .item .text .detail {
    color: rgb(var(--mdui-color-secondary));
    font-size: smaller;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
}

.sideDrawer {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sideDrawer .title {
    display: flex;
    align-items: center;
}

.sideDrawer #modelList {
    display:flex;
    flex-direction:column;
    gap:16px;
}

.listTitle {
    display: flex;
    justify-content: space-between;
    font-size: smaller;
    padding: 0.5rem 1.5rem 0.5rem 1rem;
    color: rgb(var(--mdui-color-secondary))
}

.listItemDescription {
    font-size: smaller
}

.creditMultiplier {
    font-size: 20px;
}

.info_row {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.user_info_avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    margin: 0 !important;
}

.edit_user_info .name {
    width: 100%;
    display: flex;
    align-items: center;
    gap:8px;
    color:rgb(var(--mdui-color-secondary));
}

.edit_user_info .name .text {
    font-size: 24px;
    color:rgb(var(--mdui-color-on-secondary-container));
}

.editable_info {
    width: 100%;
    display: flex;
    align-items: center;
    gap:8px;
    color:rgb(var(--mdui-color-secondary));
}

.editable_info .title {
    font-size: medium;
    min-width: 4em;
}

.editable_info .text {
    font-size: medium;
    color:rgb(var(--mdui-color-on-secondary-container));
}

.order_info_page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
    padding: 24px;
}

.order_info_page p{
    margin: 0;
}

.order_info_page mdui-card {
    width: 100%;
    padding: 12px;
}

.order_info_page #price_card{
    padding: 16px;
    padding-top: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #FFF;
}

.order_info_page .gray_card{
    background: linear-gradient(to right, #29323c, #485563);
}

.order_info_page .pending_payment{
    background: linear-gradient(to right, #FFB347, #FF6347);
}

.order_info_page .top_up_completed{
    background: linear-gradient(to right, #038f52, #219795);
}

.order_info_page .refund_in_progress{
    background: linear-gradient(to right, #09203f, #537895);
}

.order_info_page .error{
    background: linear-gradient(to right, #874da2, #c43a30);
}


.order_info_page #price_card #order_price{
    font-size: 3em;
}

.order_info_page #info_table table {
    width: 100%;
}
.order_info_page #info_table table td {
    border: none;
    padding: 0.5em 0;
    min-width: 5em;
    max-height: 3em;
    overflow: hidden;
    word-break: break-word;
}

.order_info_page #debug_info_title{
    display: flex;
    justify-content: space-between;
}

.order_info_page #debug_info_content{
    margin-top: 8px;
}

.order_info_page #services {
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
    font-size: smaller;
    color: rgb(var(--mdui-color-primary));
    display: flex;
    justify-content:space-between;
}

.bottom_button_bar{
    display: flex;
    flex-direction: row-reverse;
    gap: 8px;
}

.order_info_page .bottom_button_bar #pay, .order_info_page .bottom_button_bar #cancel_refund{
    flex: 1;
}

.switch_line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%
}

.edit_order_page {
    margin: 1rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.edit_order_page #attachments_line {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.edit_order_page #attachments_line .item {
    width: 5rem;
    height: 5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgb(var(--mdui-color-secondary))
}

.edit_order_page #attachments_line .item img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}