* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

.app-container {
    width: 100%;
    max-width: 780px;
    padding: 0 14px;
}

.app-page {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#app-page-dictation, #app-page-dictation-testing, #app-page-bookmarks, #app-page-cloud-settings {
    display: none;
}

#app-page-dictation-testing {
    padding: 32px 0;
}

.input-wrapper {
    width: 100%;
    background-color: rgb(var(--mdui-color-surface-container));
    padding: 40px 28px;
    display: flex;
    gap: 20px;
    align-items: center;
}

mdui-text-field::part(label) {
    background: rgb(var(--mdui-color-surface-container));
    max-width: 64%;
}

mdui-text-field::part(container) {
    box-shadow: inherit;
}

mdui-text-field::part(container):focus-within {
    box-shadow: inherit;
}

mdui-text-field:focus-within::part(input), mdui-text-field:focus-within::part(icon) {
    color: rgb(var(--mdui-color-primary));
}

mdui-text-field::part(input) {
    scrollbar-width: none;
}

::selection {
    background-color: rgb(var(--mdui-color-primary));
    color: #fff;
}

.search-btn {
    box-shadow: none;
    display: none;
    opacity: 0;
    width: fit-content !important;
    transition-property: box-shadow, width, bottom, transform, opacity !important;
}

.result-wrapper {
    margin: 10px 0;
    line-height: 2;
    letter-spacing: 1px;
}

.result-word {
    font-size: 1.6rem;
    font-weight: 600;
}

#loading-modal {
    margin: auto;
    overflow: hidden;
    border: none;
    background-color: transparent;
    outline: none;
}

#loading-modal::backdrop {
    backdrop-filter: blur(3px);
}

.result-phonetic {
    font-style: italic;
    margin-bottom: 14px;
    font-size: .8rem;
}

.audio-wrapper {
    margin: 14px 0;
    display: none;
    gap: 10px;
}

.synonyms-wrapper, .sentences-wrapper, .relwords-wrapper, .phrases-wrapper {
    display: none;
    margin: 30px 0;
    font-size: .9rem;
}

.synonyms-wrapper, .relwords-wrapper {
    overflow-wrap: break-word;
}

a {
    margin: 0 10px;
    color: rgb(var(--mdui-color-primary));
}

.result {
    margin-bottom: 77px;
}

@media screen and (max-width: 936px) {
    #nav-bar { display: flex; }
    #nav-rail { display: none; }
    body { padding-left: 0 !important; padding-bottom: 80px !important;}
}

@media screen and (min-width: 936px) {
    #nav-rail { display: flex; }
    #nav-bar { display: none; }
    body { padding-left: 81px !important; padding-bottom: 0 !important; }
}

.dictations-list {
    width: 100%;
}

.dictations-list mdui-fab {
    width: fit-content !important;
}

.dictations-list mdui-collapse-item::part(body) {
    display: flex;
    justify-content: center;
    align-items: center;
}

.quiz-card {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 20px;
}

.quiz-actions-wrapper {
    display: flex;
    justify-content: space-between;
}

.quiz-input-wrapper {
    display: flex;
    gap: 16px;
    align-items: center;
}

#quiz-input {
    height: 3rem;
}
#quiz-submit-btn {
    height: calc(3rem - 2px);
}
#quiz-input::part(container) {
    border-radius: 2em;
}
#quiz-input:focus-within::part(container) {
    border: 2px solid rgb(var(--mdui-color-primary));
}
#quiz-input::part(input) {
    text-align: center;
    font-weight: 500;
    letter-spacing: 1px;
}
#quiz-input::part(input)::placeholder {
    opacity: .5;
}

.quiz-actions-wrapper * {
    height: 2em;
    width: auto;
    font-size: .8rem;
}

.speech-wrapper {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.definitions-wrapper {
    text-align: center;
    line-height: 1.5;
    font-size: .9rem;
}

.quiz-result-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.quiz-result {
    display: flex;
    justify-content: center;
}

.correct-indicator, .incorrect-indicator {
    display: none;
    gap: 14px;
}

.correct-indicator { color: #008000;}
.incorrect-indicator { color: rgb(var(--mdui-color-error));}

#correct-answer {
    font-size: .8rem;
}

.stats-card {
    display: flex;
    margin-bottom: 29px;
    padding: 10px;
    gap: 10px;
    font-size: .9rem;
}

.question-num {
    margin-right: auto;
}

#back-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
}

#word-amount-input, .form mdui-text-field {
    width: auto;
    background: transparent;
    box-shadow: unset;
    transform: scale(.8);
}

#word-amount-input::part(label), .form mdui-text-field::part(label) {
    background: transparent;
}

.result-card {
    display: none;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 35px;
    line-height: 1.5;
    color: rgb(var(--mdui-color-primary));
    font-style: italic;
    font-size: .8rem;
}

.bookmarks-header-wrapper, .dictations-header, .cloud-sett-header {
    padding: 30px 40px 19px 40px;
    width: 100%;
    font-size: 1.2rem;
}

.bookmarks-list {
    width: 100%;
}

.bookmarks-header-wrapper {
    display: flex;
    align-items: center;
    padding-left: 12px;
}

.bookmarks-header {
    font-size: 1rem;
}
.bookmarks-header-wrapper .headers {
    margin-right: auto;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    word-break: break-all;
}

.add-to-bookmarks-btn {
    display: none;
    font-size: .7rem;
}

.cloud-sett-wrapper .desc {
    font-size: .7rem;
    text-align: center;
    max-width: 70%;
}

.cloud-sett-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.cloud-sett-wrapper .actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#bookmarks-sync-progress {
    margin-right: 10px;
    width: 26px;
    height: 26px;
    display: none;
}

.bookmarks-subheader {
    width: 100%;
    font-size: .7rem;
    opacity: .7;
}

.load-wrapper {
    display: none;
    height: calc(100vh - 89px);
    justify-content: center;
    align-items: center;
}

#bookmark-new-badge {
    transform: translate(-5px, -10px);
    display: none;
}