* {
    box-sizing: border-box;
}


body {
    margin: 0;
    background: #dceaf2;

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Helvetica Neue",
        "Yu Gothic",
        "Meiryo",
        sans-serif;

    color: #333;
}


#talk-screen {
    width: 100%;
    max-width: 600px;
    min-height: 100vh;

    margin: 0 auto;

    padding: 30px 15px 80px;
    padding-top: 80px;
}


h1 {
    margin: 0 0 30px;

    font-size: 18px;
    font-weight: normal;

    text-align: center;
}


#talk-area {
    display: flex;
    flex-direction: column;

    gap: 12px;
}


/* =========================
   吹き出し共通
   ========================= */

.message {
    display: flex;
    width: 100%;

    animation: appear .2s ease;
}


.message.left {
    justify-content: flex-start;
}


.message.right {
    justify-content: flex-end;
}


.bubble {
    max-width: 75%;

    padding: 10px 14px;

    border-radius: 16px;

    font-size: 15px;
    line-height: 1.7;

    word-break: break-word;
}


/* 左：白 */

.left .bubble {
    background: #fff;
}


/* 右：緑 */

.right .bubble {
    background: #c8e8c0;
}


/* =========================
   既読
   ========================= */

.read {
    margin-left: 5px;

    align-self: flex-end;

    color: #777;

    font-size: 10px;

    white-space: nowrap;
}


/* =========================
   タップ表示
   ========================= */

#tap-guide {
    position: fixed;

    bottom: 20px;
    left: 0;

    width: 100%;

    text-align: center;

    color: #888;

    font-size: 11px;
    letter-spacing: 2px;

    pointer-events: none;
}


/* =========================
   表示アニメーション
   ========================= */

@keyframes appear {

    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}


/* =========================
   写真ダミー
   ========================= */

.fake-photo {
    width: 180px;
    height: 140px;

    background: #eef1f3;

    border: 1px solid #d5dadd;

    border-radius: 12px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    color: #888;
}


.fake-photo-icon {
    font-size: 30px;
    margin-bottom: 8px;
}


.fake-photo-label {
    font-size: 12px;
}


/* =========================
   地の文
   通常モード
   ========================= */

.story-text {
    width: 100%;

    padding: 10px 20px;

    text-align: center;

    color: #666;

    font-size: 13px;
    line-height: 1.8;

    white-space: pre-wrap;
}


/* =========================
   小説モード
   ========================= */

#talk-screen.novel-mode .story-text {

    padding: 14px 20px;

    text-align: left;

    color: #4f5558;

    font-size: 17px;

    line-height: 2;

    white-space: pre-wrap;
}


/* =========================
   小説モード
   強調
   【big】
   ========================= */

.story-emphasis {

    width: 100%;

    padding: 20px 10px;

    text-align: center;

    color: #333;

    font-size: 28px;

    font-weight: bold;

    line-height: 1.5;

    animation: appear .2s ease;
}


/* =========================
   メッセログ一覧へ戻る
   ========================= */

.back-link {
    position: fixed;

    top: 20px;
    left: 24px;

    color: #777;

    text-decoration: none;

    font-size: 14px;

    z-index: 10;
}


.back-link:hover {
    color: #333;
}


.back-top {
    display: block;

    width: 100%;
    max-width: 600px;

    margin: 0 auto 25px;

    color: #777;

    text-decoration: none;

    font-size: 14px;
}


.back-top:hover {
    color: #333;
}