* {
    box-sizing: border-box
}

:root {
    --brand-color: #00D2C2;
    --draft-color: #eee;
    --light-gray: #f4f4f4;
    --medium-gray: #e0e0e0;
    --dark-gray: #888;
    --text-color: #333
}

body {
    font-family: "Segoe UI","Helvetica Neue",Helvetica,Arial,"Meiryo","Hiragino Kaku Gothic ProN","Noto Sans JP",sans-serif;
    margin: 0;
    background-color: var(--light-gray);
    color: var(--text-color);
    touch-action: manipulation
}

a {
    color: var(--brand-color);
    text-decoration: none
}

img {
    max-width: 100%;
    height: auto
}

.button {
    display: inline-block;
    padding: 10px 15px;
    border: none;
    background-color: var(--brand-color);
    color: #fff;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    text-align: center
}

.button:hover {
    opacity: 0.9
}

.h2 {
    color: var(--brand-color);
    font-weight: normal;
    margin: 0.7em auto 0.4em 0;
    font-size: 1.4rem
}

@media(max-width:991px) {
    .visible-992up {
        display: none !important
    }
}

@media(max-width:743px) {
    .visible-744up {
        display: none !important
    }
}

@media(max-width:599px) {
    .visible-600up {
        display: none !important
    }
}

@media(min-width:600px) {
    .visible-599under {
        display: none !important
    }
}

.ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh
}

header {
    background-color: #fff;
    padding: 10px 20px;
    border-bottom: 1px solid var(--medium-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000
}

.logo img {
    height: 25px;
    width: auto;
    display: inline-block
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px
}

.search-form {
    display: flex
}

.search-form input {
    border: 1px solid var(--medium-gray);
    background-color: #fff;
    border-right: none;
    padding: 6px;
    margin: 0;
    border-radius: 5px 0 0 5px
}

.search-form button {
    background: var(--light-gray);
    border: 1px solid var(--medium-gray);
    padding: 6px 8px;
    margin: 0;
    border-radius: 0 5px 5px 0;
    cursor: pointer
}

.header-nav,.header-nav * {
    vertical-align: middle
}

.header-nav a {
    display: inline-block
}

.header-myprofile-link,.header-myprofile-link * {
    vertical-align: middle;
    display: inline-block
}

.header-myprofile-link img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ccc
}

.header-myprofile-link span {
    font-size: 0.8rem;
    width: 95px
}

.header-notification img {
    width: 32px;
    height: 32px
}

.main-container {
    display: flex;
    flex-grow: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding-left: 250px
}

.sidebar {
    width: 250px;
    flex-shrink: 0;
    padding: 20px;
    background-color: #fff;
    border-right: 1px solid var(--medium-gray);
    min-height: 100vh;
    position: fixed;
    left: 0;
    z-index: 999
}

.main-content {
    flex-grow: 1;
    padding: 20px
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-weight: 500
}

.sidebar-menu a.active,.sidebar-menu a:hover {
    background-color: var(--light-gray);
    color: var(--brand-color)
}

.sidebar-menu a.inactive {
    color: var(--dark-gray)
}

footer {
    text-align: center;
    padding: 10px 20px;
    background-color: #fff;
    border-top: 1px solid var(--medium-gray);
    font-size: 14px;
    color: var(--dark-gray)
}

footer nav {
    text-align: right
}

footer p {
    margin: 0.3em auto
}

.icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    vertical-align: middle
}

.icon-sm {
    width: 20px;
    height: 20px
}

.feed-container {
    max-width: 100%;
    width: 600px;
    margin: 0 auto
}

.post-item {
    background-color: #fff;
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 20px;
    cursor: pointer
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px
}

.post-author-link {
    display: inline-block
}

.post-author-link,.post-author-link * {
    vertical-align: middle
}

.post-author-link .author-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 10px;
    border: 1px solid #ccc
}

.post-author-link .author-name {
    font-size: 1.3rem
}

.post-content p {
    margin: 0 0 15px 0;
    white-space: pre-wrap;
    word-break: break-word
}

.post-images {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(150px,1fr));
    gap: 10px
}

.post-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px
}

.post-footer {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    color: var(--dark-gray);
    font-size: 0.95rem;
    align-items: center
}

.post-footer span {
    white-space: nowrap
}

.modal-post-header {
    justify-content: space-between
}

.modal-post-header .post-createDt {
    font-size: 1.3rem;
    color: var(--dark-gray)
}

.modal-post-header .post-author-link {
    font-size: 0.9rem;
    max-width: 55%;
    overflow: hidden;
    white-space: nowrap
}

.modal-post-header .post-author-img,.modal-post-header .post-author-link .author-img {
    width: 30px;
    height: 30px;
    margin-right: 7px
}

.modal-post-header .post-author-name,.modal-post-header .post-author-link .author-name {
    font-size: 0.9rem
}

.myjournal-top-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--brand-color);
    padding: 17px 20px;
    width: 100%
}

.myjournal-top-box img {
    width: 50px;
    height: 50px
}

.myjournal-top-box > div {
    color: #fff;
    font-size: 1.6rem;
    text-align: center
}

.myjournal-top-box > div > span {
    display: inline-block;
    margin: 0 auto;
    text-align: left
}

.create-post-btn {
    cursor: pointer
}

.myjournal-title-box {
    padding: 17px 20px;
    background-color: #fff;
    width: 100%;
    margin-bottom: 10px
}

.myjournal-title-box h3 {
    color: var(--brand-color);
    margin: 0;
    font-size: 1.6rem;
    font-weight: normal
}

.myjournal-title-box p {
    margin: 3px 0 0;
    color: var(--dark-gray);
    vertical-align: middle
}

.myjournal-title-box p > span {
    display: inline-block;
    max-width: calc(100% - 50px);
    vertical-align: middle
}

#myjournal-title_edit-a {
    float: right;
    white-space: nowrap;
    display: inline-block;
    text-align: right;
    min-width: 32px
}

#myjournal-title_edit-a > span {
    color: var(--brand-color);
    text-decoration: underline;
    white-space: nowrap;
    display: inline-block
}

#myjournal-title_more-a {
    white-space: nowrap;
    display: inline-block;
    color: var(--dark-gray);
    min-width: 42px;
    text-align: right;
    vertical-align: middle;
    text-decoration: underline
}

.myjournal-item {
    background-color: #fff;
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 10px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center
}

.myjournal-item-draft {
    background-color: var(--draft-color)
}

.myjournal-date {
    color: var(--brand-color);
    text-align: center;
    font-size: 1.2rem;
    min-width: 40px
}

.myjournal-date > span {
    display: block;
    font-size: 2rem
}

.myjournal-text-box {
    width: calc(100% - 170px)
}

.myjournal-text-box p {
    margin: 0 auto 4px;
    color: var(--text-color);
    font-weight: bold
}

.onlyme-row {
}

.onlyme-row > div {
    display: inline-block
}

.onlyme-row > div:first-child {
    width: calc(100% - 72px)
}

.onlyme-row .onlyme {
    width: 65px;
    text-align: right
}

.onlyme-row .onlyme > span {
    display: inline-block;
    text-align: center;
    white-space: nowrap;
    font-size: 0.9rem;
    padding: 5px;
    line-height: 1em;
    border-radius: 8px;
    color: var(--dark-gray);
    background-color: var(--light-gray)
}

.myjournal-img > div {
    width: 80px;
    height: 80px
}

.myjournal-img > div img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    padding: 10px 0
}

.modal-content,#iframeModal .modal-content-container {
    background-color: #fff;
    margin: 5% auto;
    width: 90%;
    max-width: 900px;
    border-radius: 8px;
    display: flex;
    max-height: 85vh
}

.modal-post-view,.modal-comments-view {
    padding: 25px;
    overflow-y: auto
}

.modal-post-view {
    min-height: 50vh;
    width: 55%;
    border-right: 1px solid var(--medium-gray)
}

.modal-comments-view {
    width: 45%
}

.close-btn {
    background-color: var(--brand-color);
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    line-height: 1em;
    width: 40px;
    height: 40px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    padding: 0 0 7px
}

#iframeModal .modal-content-container {
    overflow: hidden;
    height: 85vh
}

.comment-form-container {
    padding: 15px 0;
    border-top: 1px solid var(--medium-gray);
    margin-top: 15px
}

.comment-form-container textarea {
    width: 100%;
    border: 1px solid var(--medium-gray);
    border-radius: 5px;
    padding: 10px;
    font-size: 14px
}

.comment-form-container button[type="submit"] {
    display: inline-block;
    margin-top: 2px
}

.comment-item {
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--light-gray)
}

.comment-item:last-child {
    border-bottom: none
}

.comment-author-link,.reply-author-link {
    display: flex;
    align-items: center
}

.comment-author-link .author-img,.reply-author-link .author-img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 6px
}

.comment-author-link .author-name,.reply-author-link .author-name {
    font-size: 0.9rem
}

.comment_or_reply_dt {
    display: block;
    color: var(--dark-gray);
    font-size: 0.8rem
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 5px
}

.comment-header strong {
    font-size: 14px
}

.comment-body {
    margin-left: 38px;
    font-size: 15px;
    color: var(--text-color)
}

.comment-body > p {
    margin: 0.2em 0
}

.comment-actions {
    margin-left: 38px;
    margin-top: 8px;
    display: flex;
    gap: 15px
}

.comment-actions .action-link {
    font-size: 12px;
    color: var(--dark-gray);
    cursor: pointer;
    font-weight: 500
}

.reply-item {
    margin-left: 38px;
    margin-top: 15px
}

.reply-form {
    margin-left: 38px;
    margin-top: 10px;
    text-align: right
}

.reply-form textarea {
    width: 100%;
    font-size: 14px;
    border: 1px solid var(--medium-gray);
    border-radius: 5px;
    padding: 5px
}

.reply-form button {
    margin: 2px 0 auto auto !important;
    font-size: 12px;
    padding: 5px 10px
}

.like-btn {
    cursor: pointer;
    user-select: none
}

.like-btn .icon-heart-filled {
    display: none
}

.like-btn .icon-heart-empty {
    display: inline-block
}

.like-btn.liked {
    color: #FF4081;
    font-weight: bold
}

.like-btn.liked .icon-heart-filled {
    display: inline-block
}

.like-btn.liked .icon-heart-empty {
    display: none
}

.thumbnail-img {
    cursor: pointer;
    transition: opacity 0.2s ease
}

.thumbnail-img:hover {
    opacity: 0.85
}

.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px
}

.lightbox-overlay img {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.5)
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    z-index: 2001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.15);
    transition: background-color 0.2s
}

.lightbox-close:hover {
    background-color: rgba(255,255,255,0.3)
}

.modal-thumb-img {
    cursor: pointer;
    transition: opacity 0.2s ease
}

.modal-thumb-img:hover {
    opacity: 0.85
}

@media (max-width:992px) {
    .main-container {
        padding-left: 200px
    }

    .sidebar {
        width: 200px
    }

    .feed-container {
        width: 480px
    }

    .myjournal-text-box {
        width: calc(100% - 150px)
    }

    .myjournal-img > div {
        width: 70px;
        height: 70px
    }

    input,textarea,select {
        font-size: 16px !important
    }
}

@media (max-width:743px) {
    .header-right .header-nav span {
        display: none
    }

    .main-container {
        padding-left: 0;
        flex-direction: column
    }

    .sidebar {
        min-height: 10px;
        z-index: auto;
        position: static;
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--medium-gray);
        display: flex;
        flex-direction: column
    }

    .sidebar-menu {
        display: flex;
        justify-content: space-around;
        align-items: center;
        border-bottom: 2px solid var(--light-gray)
    }

    .sidebar-menu a {
        padding: 10px;
        margin: 0
    }

    .sidebar-menu a .menu-text {
        display: none
    }

    .sidebar-menu a.active,.sidebar-menu a:hover {
        background-color: transparent;
        border-radius: 0
    }

    .sidebar-menu a.active {
        border-bottom: 3px solid var(--brand-color)
    }

    .login-container {
        padding: 20px
    }

    .modal-content,#iframeModal .modal-content-container {
        flex-direction: column;
        max-height: 90vh;
        margin: 5% auto
    }

    .modal-post-view,.modal-comments-view {
        width: 100%;
        border: none
    }

    .modal-post-view {
        border-bottom: 1px solid var(--medium-gray)
    }
}

@media(max-width:639px) {
    .main-content {
        padding: 20px 2vw
    }

    .feed-container {
        width: 100%
    }

    .post-footer {
        gap: 0;
        justify-content: space-around
    }

    .myjournal-top-box img {
        width: 40px;
        height: 40px
    }

    .myjournal-top-box > div {
        width: calc(100% - 80px);
        font-size: 4.8vw
    }

    .myjournal-title-box {
        padding: 17px 13px
    }

    .myjournal-title-box h3 {
        font-size: 4.8vw
    }

    .myjournal-date > span {
        font-size: 1.8em
    }

    .myjournal-date {
        font-size: 1.1em
    }

    .myjournal-text-box {
        width: calc(100% - 140px)
    }

    .myjournal-img > div {
        width: 60px;
        height: 60px
    }
}

@media(min-width:600px) {
    .sp { display:none !important; }
}

@media(max-width:599px) {
    .header-right {
        gap: 10px
    }

    .search-form input {
        width: 120px
    }

    .myjournal-date > span {
        font-size: 1.6em
    }

    .myjournal-date {
        font-size: 1em
    }

    .myjournal-text-box {
        width: calc(100% - 107px)
    }

    .onlyme-row > div:first-child {
        width: calc(100% - 52px)
    }

    .onlyme-row .onlyme {
        width: 45px
    }

    .myjournal-img > div {
        width: 50px;
        height: 50px
    }
}

@media(max-width:389px) {
    .logo img {
        height: 23px
    }

    .search-form input {
        width: 110px
    }
}