.patient-card-list {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;

    gap: 16px;

    height: calc(100dvh - 150px);
    overflow-y: scroll;
    padding: 16px 64px;

    box-shadow: 0px 0px 16px 0 #000000;
}

.patient-card {
    width: 192px;
    height: 210px;

    box-shadow: 2px 2px 4px 0 black;
    border: 0.5px solid black;
    border-radius: 8px;

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

    cursor: pointer;
}

.patient-card:hover {
    box-shadow: inset 2px 2px 4px 0 black;
}

.patient-card .patient-id {
    font-size: 32px;
}

.patient-card .patient-name {
    font-size: 30px;
    font-weight: bold;
}

.patient-card .patient-age {
    font-size: 24px;
}

.patient-card .patient-age .patient-male {
    color: rgb(0, 90, 255);
    font-weight: bold;
    font-size: inherit;

    background-color: white;
}

.patient-card .patient-age .patient-female {
    color: rgb(255, 75, 0);
    font-weight: bold;
    font-size: inherit;

    background-color: white;
}

.situation-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 32px;
    z-index: 10;
}

.situation {
    background-color: #EDEDED;
    width: 100%;
    height: 100%;
    z-index: 20;

    box-shadow: 0 0 32px 0 black;
    border-radius: 4px;

    padding: 32px;

    display: flex;
    flex-direction: column;
    align-items: center;
}

#situation-title {
    font-size: 32px;
    font-weight: bold;
}

#situation-text {
    font-size: 18px;
    white-space: pre-wrap;
}

#situation-img {
    max-width: 100%;
    max-height: 100%;
}

#situation-close {
    box-shadow: 1px 1px 2px 0 black;
    border-radius: 8px;
    padding: 24px 16px;

    margin-top: auto;

    cursor: pointer;
}

#situation-close:hover {
    box-shadow: inset 1px 1px 2px 0 black;
}


.patient-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 32px;
    z-index: 10;
}

.patient-view {
    background-color: #EDEDED;
    width: 100%;
    height: 100%;

    margin: 0 auto;
    max-width: 1080px;


    box-shadow: 0 0 32px 0 black;
    border-radius: 4px;

    padding: 32px;

    display: flex;
    flex-direction: column;
    align-items: center;
}

.triage {
    margin-top: auto;
    display: flex;
    width: 100%;

    gap: 32px;
}

.triage div {
    width: 25%;
    height: 128px;

    border: 1px solid black;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 32px;
    font-weight: bold;

    box-shadow: 1px 2px 2px black;

    cursor: pointer;
}

.triage div:hover {
    box-shadow: inset 1px 2px 2px black;
}

.triage-0 {
    background-color: black;
    color: white;
}

.triage-1 {
    background-color: rgb(255, 75, 0);
    color: white;
}

.triage-2 {
    background-color: rgb(255, 241, 0);
    color: black;
}

.triage-3 {
    background-color: rgb(3, 175, 122);
    color: white;
}

.patient-header {
    border: 0.5px solid black;
    height: 88px;
    width: 100%;
    display: flex;
    column-gap: 16px;

    align-items: flex-start;

    background-color: white;
    padding: 8px 16px;
}

.patient-header .face {
    object-fit: contain;
    border: 1px solid black;
    width: 72px;
    height: 72px;
    padding: 4px;
}

.patient-header .name {
    display: flex;
    height: 72px;
    font-size: 32px;
    font-weight: bold;
    align-items: center;
}

.patient-header .sex {
    font-weight: bold;
}

.patient-header .triage-view {
    width: 48px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;

    margin: 12px 0 12px auto;

    border: 1px solid black;

    border-radius: 50%;
    font-weight: bold;
    font-size: 24px;
}

.time-wrapper {
    height: 72px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

#patient-view-close {
    border: 1px solid black;
    box-shadow: 2px 2px 4px 0 black;
    border-radius: 2px;
    height: 48px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 96px;
    margin: 12px 0 12px 0;
    cursor: pointer;
}

#patient-view-close:hover {
    box-shadow: inset 2px 2px 4px 0 black;
}

.top-info {
    display: flex;
    justify-content: space-around;
}

#whole-time, #syourei-suu {
    margin: 16px 0;
    font-size: 24px;
    font-weight: bold;
}

.patient-content {
    margin: 8px 0;
    width: 100%;
    display: flex;
    flex-grow: 1;
    flex-basis: 0;
    column-gap: 8px;
    overflow-y: hidden;
}

.patient-content .left{
    border: 0.5px solid black;
    width: 220px;
    padding: 8px;
    background-color: white;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.patient-content .left > div:nth-child(2) {
    margin-left: 22px;
}

.patient-content .left > div:nth-child(3) {
    margin-left: 44px;
}

.patient-content .left > button {
    margin-left: 80px;
}

#additional-anchors {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.patient-content .right {
    border: 0.5px solid black;
    background-color: white;
    padding: 8px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    flex-basis: 0;
    overflow-y: scroll;
}

.patient-content .right .date-right {
    background-color: rgb(255, 202, 128);
    margin-top: 8px;
    padding-left: 4px;
}

.patient-content .right .user-name {
    background-color: rgb(119, 217, 168);
    padding: 0 4px;
    margin-top: 8px;
    margin-left: 4px;

    display: inline-block;
}

.patient-content .right .article-wrapper {
    margin-top: 8px;
    margin-left: 8px;
    border: 0.5px solid black;

    display: flex;
}

.patient-content .right .article-wrapper .article-time {
    text-decoration: underline;
}

.patient-content .right .article-wrapper .article-info {
    padding: 8px;
    width: 192px;
    flex-shrink: 0;
}

.patient-content .right .article-wrapper .article {
    padding: 8px;
    border-left: 0.5px dashed black;
}

#findings {
    border-spacing: 8px 0;
}

.findings-wrapper{
    display: flex;
    margin-bottom: 8px;
}

.findings-wrapper+.findings-wrapper {
    display: none;
}

.findings-wrapper:has(input:checked)+.findings-wrapper {
    display: flex;
}

.findings-wrapper label{
    display: flex;
    flex-direction: column;
    border: 1px black solid;
    width: 160px;
    height: 96px;
    justify-content: center;
    align-items: center;
    box-shadow: 1px 1px 4px 0 black;
}

.findings-wrapper label:hover{
    box-shadow: inset 1px 2px 2px black;
}

.findings-wrapper label:has(input:checked) {
    box-shadow: inset 1px 2px 2px black;
}


.findings-wrapper input[type=checkbox] {
    display: none;
}

.findings-wrapper label span {
    display: inline-block;
}

.findings-wrapper label span:first-child {
    font-size: 32px;
    font-weight: bold;
}

.findings-wrapper label:has(input:checked) span:first-child {
    font-size: 32px;
}

.findings-wrapper label:has(input:checked) span:nth-child(2) {
    display: none;
}

.findings-wrapper label+div{
    display: none;
}

.findings-wrapper label:has(input:checked)+div{
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    font-weight: bold;
}

.anchor-button {
    background-color: transparent;
    border: none;
    outline: none;
    padding: 0;
    appearance: none;
    display: inline-block;

    cursor: pointer;
}

.left-checkbox {
    display: none;
}

.left-checkbox-label::before {
    content: "＋";
    width: 16px;
    height: 16px;
    border: solid 1px #b0c4de;
    background-color: #FFF;
    border-radius: 4px;

    cursor: pointer;
}

/* チェック済み */
.left-checkbox:checked + .left-checkbox-label::before {
    content: "ー";
}

.patient-content .left div:has(.left-checkbox:checked) ~ * {
    display: none !important;
}

.show-result {
    margin: 8px 0;
    padding: 0 16px;
    border: 0.5px solid black;
    box-shadow: 1px 1px 2px black;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #e74c3c;
    animation: bg-color 5s infinite;
    color: white;
    font-weight: bold;
}

.show-result:hover {
    box-shadow: inset 1px 1px 2px black;
    background-color: white;
    animation: none;
}

@keyframes bg-color {
  0% {
    background-color: #e74c3c;
  }
  20% {
    background-color: #f1c40f;
  }
  40% {
    background-color: #1abc9c;
  }
  60% {
    background-color: #3498db;
  }
  80% {
    background-color: #9b59b6;
  }
  100% {
    background-color: #e74c3c;
  }
}

.result-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 32px;
    z-index: 10;
}

.result-view {
    background-color: #EDEDED;
    width: 100%;
    height: 100%;
    z-index: 20;

    box-shadow: 0 0 32px 0 black;
    border-radius: 4px;

    padding: 32px;

    display: flex;
    flex-direction: column;
    align-items: center;
}

.result-rank {
    font-size: 64px;
}

.result-time {
    font-size: 32px;
}

.result-button {
    font-size: 32px;
}

.result-table {
    text-align: center;
    border-spacing: 0;
    box-shadow: 0 0 4px 0 black;
}

.result-table tr:nth-child(even) {
    background-color: #FFFFFF;
}

.result-table tr:nth-child(odd) {
    background-color: #DDDDDD;
}

.result-table td{
    padding: 4px 16px;
}

@media screen and (max-width: 1200px) and (max-height: 850px) {
    .findings-wrapper label{
        width: 160px;
        height: 64px;
    }
    .findings-wrapper label span:first-child {
        font-size: 24px;
    }
    .triage div {
        width: 25%;
        height: 96px;
    }
}

@media screen and (max-width: 850px) and (min-width: 500px) and (max-height: 500px){
    .triage {
        margin-bottom: 16px !important;
    }
}


@media screen and (max-width: 850px) and (min-width: 500px) {
    .patient-wrapper {
        padding: 8px;
    }

    .patient-view {
        background-color: #EDEDED;
        width: 100%;
        height: 100%;

        margin: 0 auto;
        max-width: 1080px;


        box-shadow: 0 0 32px 0 black;
        border-radius: 4px;

        padding: 4px;

        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .patient-header {
        border: 0.5px solid black;
        height: 96px;
        width: 100%;
        display: block;


        background-color: white;
        padding: 4px;

        position: relative;
    }

    .patient-header .face {
        object-fit: contain;
        border: 1px solid black;
        width: 72px;
        height: 72px;
        padding: 4px;
    }

    .patient-header .name {
        display: flex;
        height: 16px;
        font-size: 16px;
        font-weight: bold;
        align-items: center;

        position: absolute;
        top: 4px;
        left: 80px;
    }

    .patient-header .sex {
        font-weight: bold;

        position: absolute;
        top: 24px;
        left: 80px;
    }

    .patient-header .age {
        font-weight: bold;

        position: absolute;
        top: 24px;
        left: 128px;
    }

    .patient-header .triage-view {
        width: 48px;
        height: 48px;
        display: flex;
        justify-content: center;
        align-items: center;

        margin: 0;

        border: 1px solid black;

        border-radius: 50%;
        font-weight: bold;
        font-size: 24px;

        position: absolute;
        top: 4px;
        right: 104px;
    }

    .time-wrapper {
        position: absolute;
        bottom: 4px;
        right: 4px;

        height: auto;
        display: flex;
        flex-direction: row;
        justify-content: space-around;
    }

    .time-wrapper div {
        padding: 4px;
    }

    #patient-view-close {
        position: absolute;
        top: 4px;
        right: 4px;

        border: 1px solid black;
        box-shadow: 2px 2px 4px 0 black;
        border-radius: 2px;
        height: 48px;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 96px;
        margin: 0;
        cursor: pointer;
    }

    .patient-content {
        margin: 4px 0;
        width: 100%;
        display: flex;
        flex-grow: 1;
        flex-basis: 0;
        column-gap: 8px;
        overflow-y: hidden;
    }

    .patient-content .left{
        border: 0.5px solid black;
        width: 170px;
        padding: 4px;
        background-color: white;

        display: flex;
        flex-direction: column;
        align-items: flex-start;
        display: none;
    }

    .patient-content .left > div:nth-child(2) {
        margin-left: 4px;
    }

    .patient-content .left > div:nth-child(3) {
        margin-left: 8px;
    }

    .patient-content .left > button {
        margin-left: 35px;
    }

    #additional-anchors {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .patient-content .right {
        border: 0.5px solid black;
        background-color: white;
        padding: 4px;
        display: flex;
        flex-direction: column;
        flex-grow: 1;
        flex-basis: 0;
        overflow-y: scroll;
    }

    .patient-content .right .date-right {
        background-color: rgb(255, 202, 128);
        margin-top: 0px;
        padding-left: 4px;
    }

    .patient-content .right .user-name {
        background-color: rgb(119, 217, 168);
        padding: 0 4px;
        margin-top: 4px;
        margin-left: 2px;

        display: inline-block;
    }

    .patient-content .right .article-wrapper {
        margin-top: 4px;
        margin-left: 4px;
        border: 0.5px solid black;

        display: flex;
    }

    .patient-content .right .article-wrapper .article-time {
        text-decoration: underline;
    }

    .patient-content .right .article-wrapper .article-info {
        padding: 8px;
        width: 128px;
        flex-shrink: 0;
    }

    .patient-content .right .article-wrapper .article {
        padding: 8px;
        border-left: 0.5px dashed black;
    }

    .findings-wrapper label{
        font-size: 24px;
        width: 72px;
        height: 48px;
    }
    .findings-wrapper label span {
        font-size: 20px !important;
    }
    .findings-wrapper .kidoukakuho {
        font-size: 16px !important;
    }
    .findings-wrapper label span:nth-child(2) {
        display: none;
    }
    .findings-wrapper label:has(input:checked)+div{
        font-size: 20px;
    }

    .triage {
        margin-top: auto;
        display: flex;
        width: 100%;

        gap: 8px;

        margin-bottom: 128px;
    }

    .triage div {
        width: 25%;
        height: 64px;

        border: 1px solid black;

        display: flex;
        justify-content: center;
        align-items: center;

        font-size: 20px;
        font-weight: bold;

        box-shadow: 1px 2px 2px black;

        cursor: pointer;
    }
}

@media screen and (max-width: 500px) {
    header .logo {
        font-size: 20px;
    }
    #whole-time, #syourei-suu {
        margin: 16px 0;
        font-size: 16px;
        font-weight: bold;
    }

    .patient-card-list {
        padding: 16px 0;
        justify-content: space-around;
    }

    .patient-card {
        width: 192px;
        height: 96px;

        box-shadow: 2px 2px 4px 0 black;
        border: 0.5px solid black;
        border-radius: 8px;

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

        cursor: pointer;
    }

    .patient-card .patient-id {
        font-size: 20px;
    }
    .patient-card .patient-name {
        font-size: 24px;
    }
    .patient-card .patient-age {
        font-size: 16px;
    }

    .patient-wrapper {
        padding: 8px;
    }

    .patient-view {
        background-color: #EDEDED;
        width: 100%;
        height: 100%;

        margin: 0 auto;
        max-width: 1080px;


        box-shadow: 0 0 32px 0 black;
        border-radius: 4px;

        padding: 4px;

        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .patient-header {
        border: 0.5px solid black;
        height: 96px;
        width: 100%;
        display: block;


        background-color: white;
        padding: 4px;

        position: relative;
    }

    .patient-header .face {
        object-fit: contain;
        border: 1px solid black;
        width: 48px;
        height: 48px;
        padding: 4px;
    }

    .patient-header .name {
        display: flex;
        height: 16px;
        font-size: 16px;
        font-weight: bold;
        align-items: center;

        position: absolute;
        top: 4px;
        left: 56px;
    }

    .patient-header .sex {
        font-weight: bold;

        position: absolute;
        top: 24px;
        left: 56px;
    }

    .patient-header .age {
        font-weight: bold;

        position: absolute;
        top: 24px;
        left: 100px;
    }

    .patient-header .triage-view {
        width: 48px;
        height: 48px;
        display: flex;
        justify-content: center;
        align-items: center;

        margin: 0;

        border: 1px solid black;

        border-radius: 50%;
        font-weight: bold;
        font-size: 24px;

        position: absolute;
        top: 4px;
        right: 104px;
    }

    .time-wrapper {
        position: absolute;
        bottom: 4px;
        right: 4px;

        height: auto;
        display: flex;
        flex-direction: row;
        justify-content: space-around;
    }

    .time-wrapper div {
        padding: 4px;
    }

    #patient-view-close {
        position: absolute;
        top: 4px;
        right: 4px;

        border: 1px solid black;
        box-shadow: 2px 2px 4px 0 black;
        border-radius: 2px;
        height: 48px;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 96px;
        margin: 0;
        cursor: pointer;
    }

    .patient-content {
        margin: 4px 0;
        width: 100%;
        display: flex;
        flex-grow: 1;
        flex-basis: 0;
        column-gap: 8px;
        overflow-y: hidden;
    }

    .patient-content .left{
        border: 0.5px solid black;
        width: 170px;
        padding: 4px;
        background-color: white;

        display: flex;
        flex-direction: column;
        align-items: flex-start;
        display: none;
    }

    .patient-content .left > div:nth-child(2) {
        margin-left: 4px;
    }

    .patient-content .left > div:nth-child(3) {
        margin-left: 8px;
    }

    .patient-content .left > button {
        margin-left: 35px;
    }

    #additional-anchors {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .patient-content .right {
        border: 0.5px solid black;
        background-color: white;
        padding: 4px;
        display: flex;
        flex-direction: column;
        flex-grow: 1;
        flex-basis: 0;
        overflow-y: scroll;
    }

    .patient-content .right .date-right {
        background-color: rgb(255, 202, 128);
        margin-top: 0px;
        padding-left: 4px;
    }

    .patient-content .right .user-name {
        background-color: rgb(119, 217, 168);
        padding: 0 4px;
        margin-top: 4px;
        margin-left: 2px;

        display: inline-block;
    }

    .patient-content .right .article-wrapper {
        margin-top: 4px;
        margin-left: 4px;
        border: 0.5px solid black;

        display: flex;
    }

    .patient-content .right .article-wrapper .article-time {
        text-decoration: underline;
    }

    .patient-content .right .article-wrapper .article-info {
        padding: 8px;
        width: 128px;
        flex-shrink: 0;
    }

    .patient-content .right .article-wrapper .article {
        padding: 8px;
        border-left: 0.5px dashed black;
    }

    .findings-wrapper label{
        font-size: 24px;
        width: 72px;
        height: 48px;
    }
    .findings-wrapper label span {
        font-size: 20px !important;
    }
    .findings-wrapper .kidoukakuho {
        font-size: 16px !important;
    }
    .findings-wrapper label span:nth-child(2) {
        display: none;
    }
    .findings-wrapper label:has(input:checked)+div{
        font-size: 20px;
    }

    .triage {
        margin-top: auto;
        display: flex;
        width: 100%;

        gap: 8px;

        margin-bottom: 128px;
    }

    .triage div {
        width: 25%;
        height: 64px;

        border: 1px solid black;

        display: flex;
        justify-content: center;
        align-items: center;

        font-size: 20px;
        font-weight: bold;

        box-shadow: 1px 2px 2px black;

        cursor: pointer;
    }

    .result-wrapper {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        padding: 8px;
        z-index: 10;
    }

    .result-view {
        background-color: #EDEDED;
        width: 100%;
        height: 100%;
        z-index: 20;

        box-shadow: 0 0 32px 0 black;
        border-radius: 4px;

        padding: 8px;

        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .result-rank {
        font-size: 24px;
    }

    .result-time {
        font-size: 16px;
    }

    .result-button {
        font-size: 16px;
    }

    .result-table {
        text-align: center;
        border-spacing: 0;
        box-shadow: 0 0 4px 0 black;
    }

    .result-table tr:nth-child(even) {
        background-color: #FFFFFF;
    }

    .result-table tr:nth-child(odd) {
        background-color: #DDDDDD;
    }

    .result-table td{
        padding: 4px 16px;
    }

    .situation-wrapper {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        padding: 8px;
        z-index: 10;
    }

    .situation {
        background-color: #EDEDED;
        width: 100%;
        height: 100%;
        z-index: 20;

        box-shadow: 0 0 32px 0 black;
        border-radius: 4px;

        padding: 16px;

        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

