        /* すべての要素に box-sizing: border-box; を適用 */
        *, *::before, *::after {
            box-sizing: border-box;
        }

        body {
            font-family: sans-serif;
            background-color: #f0f2f5;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: calc(var(--vh, 1vh) * 100);
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        h2 {
            text-align: center;
            margin-bottom: 20px;
            color: #333;
        }
        a {
            display: block;
            padding: 15px 20px;
            text-decoration: none;
            color: #333;
            /* border-bottom: 1px solid #eee; */
        }
        .success {
            color: #333;
            margin-bottom: 15px;
            text-align: center;
        }
        .error {
            color: #d9534f;
            margin-bottom: 15px;
            text-align: center;
        }

        #main-container {
            width: 95%;
            min-width: 340px;
            height: calc(var(--vh, 1vh) * 100 - 10px);
            background-color: #fff;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            padding-bottom: env(safe-area-inset-bottom);
        }

        #return-to-conversation {
            margin-bottom: 20px;
            text-align: center;
        }


        #header {
            background-color: #007bff;
            color: white;
            padding: 15px;
            height: 55px;
            font-size: 1.2em;
            display: flex;
            justify-content: flex-start;
            align-items: center;
            position: relative;
            flex-shrink: 0;
        }

        #header-title {
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            width: 100%;
            text-align: center;
        }
        #menu-button {
            font-size: 1.2em;
            cursor: pointer;
            user-select: none;
            z-index: 10;
            padding: 0 10px;
            line-height: 1;
        }
        #account-button {
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            display: block;
            width: 40px;
            height: 40px;
            /* border-radius: 50%;
            overflow: hidden; */
            cursor: pointer; /* クリック可能であることを示す */
            z-index: 10;
        }
        /* #account-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            border-radius: 50%;
        } */
        #account-image, .no-image.small {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            overflow: hidden;
            border: 2px solid #ccc;
            background-color: #e2e8f0;
        }

        .notification-dot {
            position: absolute;
            top: -1px;      /* 右上に少し食い込む程度に調整 */
            right: -1px;
            width: 13px;    /* スマホで見やすいよう少し大きく */
            height: 13px;
            background-color: #ff3b30; 
            border: 2px solid #007bff; /* ヘッダーの青色で縁取り */
            border-radius: 50%;
            z-index: 20;    /* アイコンより上に表示 */
        }

        .no-image.small i {
            font-size: 20px;
            color: #94a3b8;
        }

        .unread-badge {
            background-color: #ff3b30;
            color: white;
            font-size: 0.8em;
            padding: 2px 7px;
            border-radius: 10px;
            font-weight: bold;
            line-height: 1.3;
            margin-left: 8px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .popup-container {
            display: none; /* 初期状態では非表示 */
            position: fixed;
            z-index: 200;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            justify-content: center;
            align-items: center;
        }
        .popup-container.show {
            display: flex;
        }
        .popup-content {
            background-color: #fff;
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            width: 90%;
            max-width: 400px;
        }
        .popup-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 1.2em;
            font-weight: bold;
            /* border-bottom: 1px solid #ccc; */
            padding-bottom: 5px;
            margin-bottom: 5px;
        }
        #account-icon {
            right: 15px;
            top: 50%;
            display: block;
            width: 64px;
            height: 64px;
            border-radius: 50%;
            overflow: hidden;
            z-index: 10;
        }
        .close-popup {
            font-size: 1.2em;
            color: #aaa;
            cursor: pointer;
        }
        .close-popup:hover {
            color: #666;
        }
        .popup-body {
            line-height: 1.5;
            word-wrap: break-word;
            overflow-wrap: break-word;
        }

        .popup-body ul.profile {
            list-style: none;
            padding: 0 0 5px 0;
            margin: 0;
            border-bottom: 1px solid #333;
        }
        .popup-body li.profile-item {
            padding: 0 5px 5px 5px;
            color: #333;
        }
        .popup-body li.profile-item.name {
            font-size: 1.2em;
        }
        .popup-body li.profile-item.id {
            font-size: 0.8em;
        }
        .popup-body li.profile-item a {
            padding: 0;
            display: block;
            text-decoration: none;
            color: #333;
        }
        .popup-body li.profile-item a:hover {
            background-color: #f5f5f5;
        }

        .popup-body ul.menu {
            list-style: none;
            padding: 5px 0;
            margin: 0;
            border-bottom: 1px solid #333;
        }
        .popup-body li.menu-item {
            padding: 10px;
            color: #333;
        }
        .popup-body li.menu-item a {
            padding: 0;
            display: block;
            text-decoration: none;
            color: #333;
            border: none;
        }
        .popup-body li.menu-item a:hover {
            background-color: #f5f5f5;
        }
        .popup-body a {
            text-decoration: none;
            color: #333;
        }
        #terms_and_policy {
            margin: 20px;
            padding: 0;
            display: block;
            text-align: center;
        }
        #terms_and_policy a {
            padding: 0;
            display: inline;
        }




        #side-menu {
            position: fixed;
            top: 0;
            left: -100vw;
            width: 100vw;
            /* height: 100vh; */
            height: calc(var(--vh, 1vh) * 100);
            background-color: #fff;
            box-shadow: 4px 0 12px rgba(0, 0, 0, 0.1);
            transition: left 0.3s ease-in-out;
            z-index: 100;
            overflow-y: auto;
            padding-top: 60px;
        }
        #side-menu.open {
            left: 0;
        }
        #side-menu-container {
            /*
            * 親要素（#side-menu）の高さを基準として、
            * 上部のパディングと「閉じる」ボタンの領域を除いた
            * 高さを計算します。
            */
            height: calc(var(--vh, 1vh) * 100 - 60px - env(safe-area-inset-bottom));
            overflow-y: auto;
        }
        #side-menu ul {
            list-style: none;
            padding: 0;
            margin: 0;
        }
        #side-menu li p {
            display: block;
            padding: 15px 20px;
            color: #333;
            border-bottom: 1px solid #eee;
        }
        #side-menu li a {
            display: block;
            padding: 15px 20px;
            text-decoration: none;
            color: #333;
            border-bottom: 1px solid #eee;
        }
        #side-menu li a:hover {
            background-color: #f5f5f5;
        }
        .close-button-container {
            position: absolute;
            top: 15px;
            right: 20px;
        }
        .back-button {
            font-size: 1.5em;
            color: #666;
            cursor: pointer;
            line-height: 1;
            user-select: none;
        }
        /* .full-screen-content {
            position: fixed;
            top: 0;
            left: -100vw;
            width: 100vw;
            height: 100vh;
            background-color: #fff;
            transition: left 0.3s ease-in-out;
            z-index: 110;
            display: flex;
            flex-direction: column;
        }
        .full-screen-content.open {
            left: 0;
        }
        .screen-header {
            background-color: #007bff;
            color: white;
            padding: 15px;
            font-size: 1.2em;
            display: flex;
            align-items: center;
            gap: 20px;
        }
        .screen-header .back-button {
            margin-left: auto;
            color: white;
        }
        .screen-body {
            margin: 15px;
            flex: 1;
            display: flex;
            flex-direction: column;
        } */

        .no-image {
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: #e2e8f0;
            color: #94a3b8;
        }
        .no-image.medium {
            width: 64px;
            height: 64px;
            font-size: 32px;
        }
