body {
    min-width: 300px;
    background-color: #fff;
    font-family: Meiryo;
}

.flash {
    z-index: 99999;
    position: absolute;
    right: 10px;
    top: 0px;
    border-radius: 0px 0px 6px 6px !important;
    color: white;
    -webkit-box-shadow: 2px 2px 3px -1px #8F8F8F;
    box-shadow: 2px 2px 3px -1px #8F8F8F;
}

.noselect {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.nodisplay {
    display: none;
}

.clearfix:before,
.clearfix:after {
    content: " ";
    display: table;
}

.clearfix:after {
    clear: both;
}

.custom-alert {
    background-color: #ff5656;
    color: white;
    margin-bottom: 5px;
    padding: 0px 10px
}

.custom-alert button {
    color: white;
    font-size: 1.3em;
    margin-right: 5px;
}

.form-control {
    background-color: white;
    border: 1px solid #ddd !important;
    padding: 5px !important;
    margin-bottom: 5px;
}

table.no-border tr td {
    border: none;
}

/* Main screen elements */

.doraemon-page {
    font-size: 22px;
    line-height: normal;
    color: #222;
}

#content-wrapper-div {
    position: fixed;
    height: 98%;
    width: 98%;
    margin: auto;
    padding: 20px 4%;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    text-align: center;
}

/* Rule for debugging */
#content-wrapper-div.cutout-guideline {
    border-radius: 0px 0px 50% 50% / 0px 0px 90% 90%;
    border: 1px solid white;
}

.title {
    margin-bottom: 20px;
    padding: 10px 20px;
    position: relative;
    border-radius: 15px;
    font-size: 2em;
    font-weight: bold;
    background-color: #00a0e9;
    color: white;
    text-align: center;
    border: 4px solid #00a0e9; /* cheat so furigana is not close to the edge */
}

.title.text-left {
  text-align: left;
}

.title .prefix-text {
    font-size: 0.8em;
}

.subtitle {
    display: inline-block;
    border-radius: 43px / 50%;
    background-color: #f8b62d;
    border-color: #f8b62d;
}

.message-box {
    position: relative;
    top: 25px;
    margin: 20px 0px;
    font-weight: bold;
    font-size: 2em;
    z-index: 1;
}

.btn.round-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    padding: 0px;
    font-size: 1em;
    font-weight: bold;
    color: #fff;
    background-color: #00a0e9;
    transition: none;
}

.btn.round-btn.btn-lg {
    width: 120px;
    height: 120px;
    font-size: 1.5em;
}

.btn.round-btn:focus {
    outline: 0;
}

#body-wrapper-div {
    height: calc(100% - 140px);
    padding: 0px 20px;
    display: flex;
}

.content-panel {
    flex: 0 0 50%;
}

.doraemon-panel {
    padding: 0;
}

#doraemon-img {
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
    display: inline-block;
    margin-top: -30px;
    margin-left: 24px;
}

.controls-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#controls-message-area {
    min-height: 120px;
    margin-top: 100px;
    margin-bottom: 20px;
}

#rec-indicator-wrapper-div {
    display: block;
    margin-bottom: 10px; /* to avoid overlap with copyright text */
    text-align: left;
}

#rec-indicator-img {
    pointer-events: none;
    transform: translateX(-50%);
    height: 25vh;
    z-index: -1;
}


/**
 * Tool Results Table
 */

#result-table {
    width: 100%;
    margin-bottom: 30px;
}

#result-table td {
    vertical-align: top;
    padding-bottom: 40px;
}

.result-td-img {
    width: 1px; /* make the other column take up all the free space */
}

.result-td-text {
    padding-left: 40px;
}

.tool-title {
    padding: 0px 20px;
    border: 4px solid #00a0e9;
    border-radius: 29px / 50%;
    background-color: #fff;
    font-size: 1.5em;
}

.tool-description {
    font-weight: bold;
    text-shadow:
        1px 0px 0px white,
        1px 1px 0px white,
        0px 1px 0px white,
        -1px 1px 0px white,
        -1px 0px 0px white,
        -1px -1px 0px white,
        0px -1px 0px white,
        1px -1px 0px white;
}

.tool-img {
    width: 360px;
}

.btn-td {
    text-align: right;
}

/**
 * Bootstrap's Modal Dialog Overrides
 */

.modal-backdrop.in {
    opacity: 1;
    background-color: white;
}

.doraemon-page .modal-dialog {
    height: calc(100% - 60px);
    width: 90%;
}
.doraemon-page .modal-content {
    height: 100%;
    border: 0px;
    background: none;
    -webkit-box-shadow: none;
    box-shadow: none;
}

.doraemon-page .modal-header.title {
    margin: 0px;
    border: 0px;
    border-radius: 15px 15px 0px 0px;
}

.doraemon-page .modal-body {
    height: calc(100% - 80px);
    padding: 40px 9%;
    border: 8px solid #00a0e9;
    border-top: 0px;
    border-radius: 0px 0px 50% 50% / 0px 0px 70% 70%;
    background: url('/static/img/results_bg.png') top left / 33% repeat;
    color: #00a0e9;
}

.doraemon-page .modal-body .title {
    color: #00a0e9;
}

/**
 * Small Screen Adjustments
 */


@media (max-width: 1440px) {
    .title, .message-box {
        font-size: 1.5em;
    }
}

@media (max-width: 1024px), (max-height: 600px) {
    .title, .message-box {
        font-size: 1em;
    }

    .btn.round-btn.btn-lg {
        width: 80px;
        height: 80px;
        font-size: 1em;
    }

    #controls-message-area {
        min-height: 80px;
        margin-top: 50px;
    }

    .subtitle {
        border-radius: 26px / 50%;
    }
}

@media (max-height: 768px), (max-width: 1100px) {
    .tool-img {
      width: 180px;
    }
}

.buffer {
    height: 20px;
}

.buffer-small {
    height: 10px;
}

.modelmanagement-nameinput {
    width: 100%;
}

.toolmanagement-button {
    font-size: 20px;
    padding: 2px 10px 0px 10px;
}

.toolmanagement-table {
    font-size: 16px;
}

.modelmanagement-filename {
    font-size: 16px;
}

/* Based on: https://codepen.io/timonwa/pen/dyaEVbp */
.loading-state {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .loading {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 6px solid #ddd;
    border-top-color: blue;
    animation: loading 1s linear infinite;
  }

  @keyframes loading {
    to {
      transform: rotate(360deg);
    }
  }

  .btn-lowercase {
    text-transform: none;
  }