:root {
  --main-color: #00acee;
  --hover-color: #f5f8fa; 
}

*, *::before, *::after {
     box-sizing: border-box;
    }

* {
    padding: 0;
    margin : 0;
}

html {
  scroll-behavior:smooth;
}
/* Darkmode */
body.dark-mode {
    --main-color: #1da1f2;
    --hover-color: rgba(255, 255, 255, 0.04);
    --bg-color: #121212;
    --text-color: #f5f5f5;
}
/* ✅ Darkmode時の文字色を白に */
body.dark-mode .favorite-wrapper span {
  color: #f5f5f5;
}
body.dark-mode .users-wrapper span {
    color: #f5f5f5;
}
body.dark-mode .articles-description p {
    color: #f5f5f5;
}
body.dark-mode .articles-description p small {
    color: #ddd;
}
/* 空の色 */
body.dark-mode #clouds {
    background: -webkit-linear-gradient(top, #ffcc70 0%, #ff6f61 30%, #6a0572 100%);
    background: -moz-linear-gradient(top, #ffcc70 0%, #ff6f61 30%, #6a0572 100%);
    background: -o-linear-gradient(top, #ffcc70 0%, #ff6f61 30%, #6a0572 100%);
    background: linear-gradient(to bottom, #ffcc70 0%, #ff6f61 30%, #6a0572 100%);
}
/* mobil icons */
/* ダークモード用スタイル */
body.dark-mode .mobile-nav {
    background: #1e1e1e;
    box-shadow: 0 0 3px rgba(255, 255, 255, 0.1);
}

body.dark-mode .mobile-nav-link {
    color: #f5f5f5;
}

body.dark-mode .mobile-nav-icon {
    color: #f5f5f5;
}

/* hover や active 状態も対応 */
body.dark-mode .mobile-nav-icon:hover,
body.dark-mode .mobile-nav-icon:active {
    color: var(--main-color); 
}
/* scroll  */
body.dark-mode .mobile-nav {
  background: #1e1e1e;
}
/* user name top */
body.dark-mode .articles-item p {
    color: #f5f5f5;
}
body.dark-mode .article-item p small {
    color: #cdcbcb;
}
/* user name */
body.dark-mode .articles-caption-inline .username a {
        color: #f5f5f5;
    }
/* snippet text */
body.dark-mode .articles-caption-inline .snippet-text {
    color: #f5f5f5;
}
/* read-more */
body.dark-mode .articles-caption-inline .read-more {
    color: #cdcbcb;
}

/* like */
body.dark-mode .liked .liked_heart {
    color: var(--main-color);
  }
/* left nav right border */
body.dark-mode .left {
    border-right: 0.5px solid rgba(255, 255, 255, 0.1);
}
/* 下線 */
body.dark-mode .following-feed-wrapper {
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.1); /* ごく薄い白線 */
}
/* right おすすめ User */
body.dark-mode .favorite-title span {
    color: #cdcbcb;
}
/* comment */
body.dark-mode .meta-username {
    color: #f5f5f5;
}
body.dark-mode .bubble p {
    color: #333;
}
body.dark-mode .avatar-wrapper a,
body.dark-mode .comment-bg {
        background:#121212;
    }

body.dark-mode .user-comment-text-box {
    background: #2a2a2a;
    }

body.dark-mode .user-comment-text-box:after {
    border-right: 20px solid #2a2a2a;
    }

body.dark-mode .author-comment-text-box {
    background: #355e3b; /* 落ち着いた緑系 */
    }

body.dark-mode .author-comment-text-box:after {
    border-left: 20px solid #355e3b;
    }

body.dark-mode .user-comment-text-box a,
    .author-comment-text-box a {
    color: #8ab4f8; /* Googleのdarkモードのリンク色風 */
    }

body.dark-mode .write-new textarea {
    background: #1e1e1e;
    color: #ddd;
    border-bottom: 0.5px solid #444;
    }

body.dark-mode .write-new img {
    background: #444;
    }

body.dark-mode .fa-lg {
    color: #ccc;
    }
body.dark-mode .comment-delete-btn-2 button i {
    color: gray;
    }

body.dark-mode .write-new button {
    background-color: var(--main-color);
    color: #fff;
    }

body.dark-mode .write-new span {
    color: #aaa;
    }
/* Hover Card */
body.dark-mode .hover-profile-username {
    color: #fff;
}
body.dark-mode .hover-profile-card {
    background-color: #2a2a2a;
}
body.dark-mode .hover-profile-bio {
    color: #f5f5f5;
}
body.dark-mode .hover-profile-follow {
    color: #ccc;
}
body.dark-mode .follow-count {
    color: #fff;
}
body.dark-mode .hover-user-trigger {
    color: #f5f5f5;
}
/* swiper side button */
body.dark-mode .custom-swiper-button {
    background-color: gray;
}
/* end-message circle */
body.dark-mode .gradient-border-inner {
    background: var(--bg-color);
}
/* stories */
body.dark-mode .stories-modal-content.modern {
  background-color: #222;
  border: 1px solid #444;
}
body.dark-mode .upload-label span {
    color: #f5f5f5;
}
body.dark-mode .upload-label:hover {
    background-color: #333;
}
body.dark-mode .story-input-wrapper {
  background-color: #000;
}
body.dark-mode .caption-wrapper textarea {
    background-color: #222;
    color: #f5f5f5;
    border: 1px solid #444;
}
body.dark-mode .story-username,
body.dark-mode .story-username-other,
body.dark-mode .story-username-other a {
    color: #f5f5f5;
}
/* stories view */
body.dark-mode .modal-content {
    background-color: #222;
}
body.dark-mode .story-time-wrapper span {
    color: gray;
}
body.dark-mode .author-name-wrapper p {
    color: #f5f5f5;
}
body.dark-mode .story-time-wrapper span {
    color: gray;
}
body.dark-mode .story-user-wrapper a {
    background-color: #121212;
}
body.dark-mode .story-ring-myself {
    background-color: #222;
}


/* Debug */
/* * {
  outline: 1px solid red;
} */

/* Main */
body {
    font-family: 
    "Arial", 
    "ヒラギノ角ゴ Pro W3",
    "Hiragino Kaku Gothic Pro",
    "Osaka",
    "メイリオ",
    "Meiryo",
    "MS Ｐゴシック",
    "MS PGothic",
    sans-serif;
    background-color: var(--bg-color, #fff);
    color: var(--text-color, #000);
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;    /* 縦スクロールは許可（これが必要） */
    touch-action: auto;  /* ← これもズーム有効化の鍵 */
}

a {
  color: var(--main-color);
}

a:hover {
  background-color: var(--hover-color);
}

/* header やボタンにも反映 */
.header-icon-circle {
  background-color: var(--bg-color);
}

button {
  color: var(--main-color);
  background-color: transparent;
  border: none;
}
.fas {
  color: var(--text-color);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
}

.container {
    display: flex;
    height: 100vh; /* 必要に応じて */
    max-width: 100%;
}

.global-tag {
    text-align:center;
    margin-bottom: 20px;
}


/* mobil header */
.mobile-nav-wrapper {
    top: 0;
    width: 100%;
    height: 50px;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
    background: #fff;
    display: flex;
    overflow-x: auto;
    z-index: 999;
    justify-content: space-between;
    transition: transform 0.3s ease-in-out;
}

/* ダークモード用 */
body.dark-mode .mobile-nav-wrapper {
    background: #1e1e1e;
    box-shadow: 0 0 3px rgba(255, 255, 255, 0.05);
}

/* スクロールイベント */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  transition: all 0.3s ease;
  z-index: 100;
}

/* 完全に非表示 */
.mobile-nav.nav-hidden {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

/* 半透明（下スクロール中） */
.mobile-nav.scrolled-down {
  opacity: 0.5;
  transform: translateY(0);
  pointer-events: auto;
}

/* 表示（上スクロール中） */
.mobile-nav.scrolled-up {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}


/* オプション：アイコンカラー調整 */
body.dark-mode .mobile-profile-container i,
body.dark-mode .fas.fa-search {
    color: #e0e0e0;
}

/* オプション：検索バー入力 */
body.dark-mode .mobile-search-input {
    background-color: #2b2b2b;
    color: #f5f5f5;
    border: none;
}

/* optional logo color override */
body.dark-mode .mobile-logo_1,
body.dark-mode .mobile-logo_2 {
    color: #e0e0e0;
}

/* end scroll event */
.mobile-nav-top-link {
    display       : flex;
    flex-direction: column;
    align-items   : center;
    justify-content: center;
    /* flex-grow: 1; */
    min-width      : 50px;
    overflow       : hidden;
    white-space    : nowrap;
    color          : gray;
    text-decoration: none ;
    -webkit-tap-highlight-color:transparent ;
    transition: background-color 0.1s ease-in-out ;
}

.mobile-profile-container {
    display       : flex ;
    justify-content: center;
    align-items    : center ;
}

.mobile-profile-container img {
    border-radius:50%;
    width        :30px;
    height       :30px;
}

.mobile-profile-container i {
    color      : #333;
    font-size  : 30px;
    -webkit-font-smoothing: antialiased;
    -webkit-text-stroke   : 1px #fff;
}

.mobile-wrapper_circle {
    font-family: 'Baloo Paaji 2', cursive;
    height:30px;
    width:30px;
    border-radius:50%;
    z-index:1;
    position:relative;
    background:var(--main-color);
    overflow: hidden;
}

.mobile-logo_1 {
    position:absolute;
    font-size:26px;
    color: #fff;
    transform: translateX(30%);
    -webkit-transform: translateX(30%);
    top: -14px;
}

.mobile-logo_2 {
    position:absolute;
    font-size:26px;
    color: #fff;
    transform: translateX(110%) ;
    -webkit-transform: translateX(110%);
 }


/* mobile nav */

.mobile-nav-top-link button
{
    background: none;
    border: none;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}


/* mobile placeholder */

input::placeholder,
input::-webkit-input-placeholder,
input::-moz-placeholder
{
  line-height: normal !important;
  vertical-align: middle;
}


/* Bottomボタンにトランジション追加（あれば） */
.mobile-create-circle {
  transition: opacity 0.3s ease;
}

/* left style icon */

/* Logo */
.wrapper_circle
{
    font-family: 'Baloo Paaji 2', cursive;
    height:70px;
    width:70px;
    border-radius:50%;
    z-index:1;
    border:double 10px #fff;
    position:relative;
    background:#555d66;
    margin-left: 8px;
    }

.logo_1
{
    position:absolute;
    top:-6px;
    left:10px;
    font-size:30px;
    color: #fff;
}

.logo_2
{
    position:absolute;
    top:10px;
    left:24px;
    font-size:30px;
    color: #fff;
}

.logo:hover
{
    background-color: unset!important;
}

li.logo {
    margin-top: 10px;
    margin-bottom: 23px;
}

/* left icons */
/* 左ナビ全体 */
.left {
  width: 20%;
  flex-shrink: 0;
  border-right: 0.5px solid #ddd;
  padding: 1rem;
  overflow-y: auto;
}

/*（スクロールしても追従） */
/* left icons wrapper */
.left-icons-wrapper {
    padding-left:6px;
    flex-direction: column;
    gap: 24px; /* アイコンの間のスペース */
}

/* 各リンク（アイコン + ラベル） */
/* 各項目をブロック状にする */

.icon-item {
    margin-bottom: 12px;  /* 各ボックスの間隔 */
}

/* aタグをflexで水平に並べてbox化 */
.icon-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;  /* fa-icon に合わせた幅 */
  height: 24px;
}
.icon-wrapper i {
    font-size: 1.4rem;  /* 少し大きめ */
}

.icon-link:hover {
    background-color: var(--hover-color, #f0f0f0); /* 好きな色に */
    color: rgb(29, 161, 242); /* hover時に色変化 */
}

/* ラベルの文字 */
.icon-label-text {
    font-size: 18px;
    font-weight: 580;
    white-space: nowrap;
}

/* アイコン */
.icon-link i {
    font-size: 23px;
}

/* create button */
.create-btn
{
    background: #1da1f2;
    color: #fff;
    font-size: 23px;
    border: none ;
    border-radius: 50%;
    width: 50px;
    height: 50px;
}


.create-btn:hover
{
    cursor: pointer ;
    background: rgba(0, 148, 255, 0.97);
}

.left-profile-pic {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* profile style */
.profile-pic
{
    border-radius:50%;
    width:40px;
    height:40px;
}

.profile-link
{
    display: flex ;
    justify-content: center ;
    justify-items: center ;
}

.profile-container
{
    display: flex ;
    justify-content: center;
    align-items: center ;
    color: rgb(101,119,134);
}

.icon-container
{
    display: flex ;
    justify-content: center ;
    align-items: center ;
    color:rgb(101,119,134);
    border-radius: 50%;
    position:relative;
}


.fa-ellipsis-h
{
    border-radius:50%;
    border: 2px solid rgb(20, 23, 26);
    width:30px;
    height:30px;
    display: flex ;
    justify-content: center ;
    align-items: center
}

.fa-ellipsis-h:hover
{
   border: 2px solid rgb(29, 161, 242) ;
}

.number{
    background:  #00acee;
    display: flex ;
    justify-content: center ;
    align-items: center ;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid #fff;
    position: absolute ;
    transform: translateX(67%) translateY(-150%);
     -webkit-transform: translateX(67%) translateY(-150%);
    z-index: 1;
}

.live_notify_badge
{
    font-size: 12px;
    color: #fff;
}

/* center and right */
/* 中央と右のスクロール領域 */
.center-and-right {
  display: flex;
  height: 100vh;
  overflow-y: auto; /* ✅ スクロールはここ */
  width: 80%;
  flex-grow: 1;
}

/* center style */
.center {
  width: 70%;
  padding: 3rem;
  flex-shrink: 0;
}

.center-header
{
    display: flex ;
    height: 53px;
    align-items: center ;
    justify-content: space-between ;
    padding-left:15px;
    padding-right:15px;
    cursor:pointer;
}

.header-name
{
    font-family: "Segoe UI", Meiryo, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.3125;
}

.header-icon-circle
{
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex ;
    justify-content: center ;
    justify-items: center ;
    align-items: center ;
}

.header-icon-circle:hover
{
    background: var(--hover-color);
    border-radius: 50px;
}

.header-icon i
{
    color: var(--main-color) ;
}

/* hero clouds */

.hero
{
    width: 100%;
    position: relative;
    overflow: visible;
}

#clouds{
    overflow:          hidden;
    padding:                0;
    background:       #c9dbe9;
    background:       -webkit-linear-gradient(top, #c9dbe9 0%, #fff 100%);
    background:       -linear-gradient(top, #c9dbe9 0%, #fff 100%);
    background:       -moz-linear-gradient(top, #c9dbe9 0%, #fff 100%);
    border-radius: 4px;
    }

.cloud {
    width:                 200px;
    height:                 60px;
    background:             #fff;
    border-radius:         200px;
    -moz-border-radius:    200px;
    -webkit-border-radius: 200px;
    position:           relative;
    }

.cloud:before, .cloud:after {
    content:                                '';
    position:                         absolute;
    background:                           #fff;
    width:                               100px;
    height:                               80px;
    position:                         absolute;
    top:                                 -15px;
    left:                                 10px;
    border-radius:                       100px;
    -moz-border-radius:                  100px;
    -webkit-border-radius:               100px;
    transform:                   rotate(30deg);
    -webkit-transform:           rotate(30deg);
    -moz-transform:              rotate(30deg);
    }

.cloud:after {
    width:           120px;
    height:          120px;
    top:             -55px;
    left:             auto;
    right:            15px;
    }


.top{
    animation         : moveclouds 15s linear infinite;
    -webkit-animation : moveclouds 15s linear infinite;
    -moz-animation    : moveclouds 15s linear infinite;
    -o-animation      : moveclouds 15s linear infinite;
    }


.mid_1 {
    left:                   280px;
    transform:         scale(0.6);
    -webkit-transform: scale(0.6);
    -moz-transform:    scale(0.6);
    opacity:                  0.6;

    animation        : moveclouds 25s linear infinite;
    -webkit-animation: moveclouds 25s linear infinite;
    -moz-animation   : moveclouds 25s linear infinite;
    -o-animation     : moveclouds 25s linear infinite;
    }

.mid_2 {
    left:                  -150px;
    top:                    100px;
    z-index:                    1;
    transform:         scale(0.8);
    -webkit-transform: scale(0.8);
    -moz-transform:    scale(0.8);
    opacity:                  0.8;

    animation        : moveclouds 20s linear infinite;
    -webkit-animation: moveclouds 20s linear infinite;
    -moz-animation   : moveclouds 20s linear infinite;
    -o-animation     : moveclouds 20s linear infinite;
    }

.mid_3 {
    left:                    470px;
    top:                     120px;
    transform:         scale(0.75);
    -webkit-transform: scale(0.75);
    -moz-transform:    scale(0.75);
    opacity:                   0.6;

    animation        : moveclouds 18s linear infinite;
    -webkit-animation: moveclouds 18s linear infinite;
    -moz-animation   : moveclouds 18s linear infinite;
    -o-animation     : moveclouds 18s linear infinite;
    }

.bottom {
    left:                  -250px;
    top:                    200px;
    transform:         scale(0.5);
    -webkit-transform: scale(0.5);
    -moz-transform:    scale(0.5);
    opacity:                  0.7;

    animation        : moveclouds 20s linear infinite;
    -webkit-animation: moveclouds 20s linear infinite;
    -moz-animation   : moveclouds 20s linear infinite;
    -o-animation     : moveclouds 20s linear infinite;
    }

@keyframes moveclouds {
    0% {margin-left  : 1000px;}
    100% {margin-left:-1000px;}
}

@-webkit-keyframes moveclouds {
    0% {margin-left  : 1000px;}
    100% {margin-left:-1000px;}
    }

@-moz-keyframes moveclouds {
    0% {margin-left  : 1000px;}
    100% {margin-left: -1000px;}
    }

@-o-keyframes moveclouds {
    0% {margin-left  : 1000px;}
    100% {margin-left: -1000px;}
    }

/* 期間限定 */
/* UFOスタイル */
#ufo, .ufo {
    position: absolute;
    top      : 80px;
    left     : 0;
    font-size: 40px;
    z-index  : 2;
    opacity  : 1;
    pointer-events: none;
    animation: ufo-fly 6s linear forwards;
    will-change: transform, opacity;
}

@keyframes ufo-fly {
    0%   { transform: translateX(0vw) scale(1); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateX(40vw) scale(1); opacity: 0; }
}

/*  Copyright (c) 2019 by Marco Barría (https://codepen.io/fixcl/pen/KhAqa) */
.bird{
  background:                     black; /* black */ /* #f8f8f8 */
  border-radius:        50% 50% 20% 20%;
  color:                           #fff; /* #fff */ /* black */
  line-height:                     20px;
  letter-spacing:                   2px;
  font-size:                      0.8em;
  text-align:                    center;
  position:                    relative;
  top:                            -70px; /* center 50% */
  left:                             34%; /* center 50% */
  margin-top:                     -20px;
  margin-left:                    -10px;
  width:                           15px;
  height:                          15px;
  animation        : bird 0.8s linear infinite;
  -o-animation     : bird 0.8s linear infinite;
  -webkit-animation: bird 0.8s linear infinite;
  -moz-animation   : bird 0.8s linear infinite;
  z-index:                            8;
 }

.bird:after, .bird:before{
  content:                           "";
  position:                    absolute;
  top:                              50%;
  left:                             50%;
}

/* bird wings */

.bird:after{
  border-radius:          100% 100% 0 0;
  box-shadow:     inset 0px 5px 0 black; /* black */ /* inset 0px 5px 0 rgb(244, 244, 244) */
  width:                          100px;
  height:                         100px;
  margin-top:                      -7px;
  margin-left:                    -50px;
  transform-origin:             100% 0%;
  transform        : 100% 0%;
  -webkit-transform: 100% 0%;
  -moz-transform   : 100% 0%;
  animation        : alas 3s linear infinite;
  -o-animation     : alas 3s linear infinite;
  -webkit-animation: alas 3s linear infinite;
  -moz-animation   : alas 3s linear infinite;
}

/* bird beak */

.bird:before{
  background:              #FFC37F;
  border-radius:    100% 0% 20% 0%;
  margin-top:                  3px;
  margin-left:                -4px;
  width:                       6px;
  height:                      6px;
  transform:           rotateZ(45deg);
  -webkit-transform:   rotateZ(45deg);
  -moz-transform:      rotateZ(45deg);
}

/* wings animation */

@keyframes alas {
  50%{
    transform:            rotateX(-1440deg);
    -webkit-transform:    rotateX(-1440deg);
    -moz-transform:       rotateX(-1440deg);
  }
}

/* bird animation */

@keyframes bird {
  40%{
    transform:           rotateZ(2deg) translateX(2px) translateY(10px) translateZ(0);
    -webkit-transform:   rotateZ(2deg) translateX(2px) translateY(10px) translateZ(0);
    -moz-transform:      rotateZ(2deg) translateX(2px) translateY(10px) translateZ(0);
    line-height:             16px;
    font-size:              0.6em;
  }
  80%{
    transform:        rotateZ(-2deg) translateX(5px) translateY(8px) translateZ(0);
    -webkit-transform:rotateZ(-2deg) translateX(5px) translateY(8px) translateZ(0);
    -moz-transform:   rotateZ(-2deg) translateX(5px) translateY(8px) translateZ(0);
  }
}

.title_wrapper
{
    position: absolute ;
    font-size: 33px;
    color: #fff;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    -webkit-transform: translate(-50%,-50%);
    -ms-transform: translate(-50%,-50%);
    width: 100%;
    text-align: center
}


.sub_title
{
    text-align: center ;
    font-size: 14px;
    color: #333;
    line-height: 1.7;
    letter-spacing:0.04em;
    padding-top: 10px;
}

.hero-btn
{
    text-align: center ;
    margin: 10px 0;
}

.hero-btn-word
{
    color: #333;
    font-size: 20px;
    padding-top: 10px;
}

.hero-btn a
{
    background: tomato ;
     background-color: #fff;
    border-radius: 28px;
    border: 1px solid #0084b4;
    display: inline-block;
    cursor: pointer;
    color: #08a2e9;
    font-family: sans-serif;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    padding: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.hero-btn a:hover
{
    background-color: #e8f5fd;
}

/* Stories */

.stories-wrapper {
  padding: 10px;
}

.stories-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    height: 116px;
    width: 100%;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.stories-scroll::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}
/* story icon */
.story-list {
  display: flex;
  gap: 2px;
  overflow-x: auto;
}
.story-user-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center; /* ここで中央揃えに */
    margin: 0 2px;
}
.story-user-wrapper a {
    background-color: #fff;
}
/* story-ring myself */
.story-ring-myself {
  padding: 2px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  width: 86px;
  height: 86px;
  box-sizing: border-box;
  background: #f3f3f3;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* story-ring other */
.story-ring {
  padding: 2px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  width: 86px;
  height: 86px;
  box-sizing: border-box;
  background: linear-gradient(135deg, #FFF720 10%, #3CD500 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.story-ring.read {
  background: gray;
  opacity: 0.6;
}
.story-username.read a {
    color: gray;
}

.story-user-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid white;
  object-fit: cover;
  background-color: #eee;
  display: block;
}

.add-icon {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background-color: #333;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    border-radius: 50%;
    border: 2px solid #fff;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-username {
  font-size: 0.8rem;
  margin-top: 6px;
  color: #333;
  white-space: nowrap;
  text-align: center;
}
.story-username-other {

    font-size: 1rem;
    margin-top: 5px;
    padding-bottom: 1px;
    color: #333;
    white-space: nowrap;
    text-align: center;
}
.story-username-other a {
  font-size: 0.8rem;
}


/* モーダル Stories 　Create */
.stories.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.6); /* 背景を暗くする */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.stories.modal.show {
  opacity: 1;
  pointer-events: all;
}
/* progress bar */
/* wrapperの調整 */
.progress-wrapper {
  margin-top: 10px;
}

/* progress全体 */
#uploadProgress {
  width: 100%;
  height: 8px;
  border-radius: 5px;
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
  background-color: white; /* 非進捗部分（fallback） */
}

/* Chrome / Safari */
#uploadProgress::-webkit-progress-bar {
  background-color: white; /* 背景（非進捗） */
  border-radius: 5px;
}

#uploadProgress::-webkit-progress-value {
  background-color: #4caf50; /* 緑色の進捗バー */
  border-radius: 5px;
}

/* Firefox */
#uploadProgress::-moz-progress-bar {
  background-color: #4caf50; /* 緑色の進捗バー */
  border-radius: 5px;
}

/* モーダル内コンテンツ */
.stories-modal-content.modern {
  background-color: #1e1e1e;
  color: #fff;
  padding: 2rem;
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 閉じるボタン */
.stories-modal-content .close {
    display: inline-block;
    width: 32px; /* 円のサイズ（適宜調整） */
    height: 32px;
    line-height: 32px; /* テキストを上下中央に揃える */
    text-align: center;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.6); /* 半透明の黒背景など */
    color: white;
    font-size: 20px;
    cursor: pointer;
    position: absolute; /* 必要に応じて右上固定など */
    top: 10px;
    right: 10px;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.stories-modal-content .close:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* モーダル全体のサイズ調整 */
.stories.modal {
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* モーダル内部コンテンツの調整 POST FORM */
/* モーダルの中央に配置 */
.stories-modal-content.modern {
    background-color: #fff;
    width: 90%;
    max-width: 500px;
    margin: auto;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* アップロード部分 */
.upload-label {
    display: block;
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
    color: #777;
}

.upload-label:hover {
    background-color: #f9f9f9;
    border-color: #aaa;
}

.upload-label input[type="file"] {
    display: none;
}

/* プレビューエリア */
.media-preview {
    margin-top: 15px;
    text-align: center;
}

.media-preview video {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin-top: 0.5rem;
  max-height: 250px;
  object-fit: cover;
}

/* キャプション入力 */
.caption-wrapper textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    font-size: 15px;
    resize: none;
    margin-top: 15px;
}

/* 投稿ボタン */
.stories-btn-wrapper {
    margin-top: 20px;
    text-align: center;
}

.btn-post {
    background: #3897f0;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-post:hover {
    background: var(--main-color);
}
/* Story view  user-circle & time Caption*/

.story-header-top {
    display: flex;
    align-items: center;
    padding: 8px;
}

.story-item {
    display: flex;
    align-items: center;
}

.story-avatar-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
    flex-shrink: 0;
}

.story-avatar-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    cursor: pointer;
}

.story-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
}

.story-time-wrapper {
    font-size: 12px;
    color: #999;
    margin-bottom: 2px;
}

.author-name-wrapper p {
    font-size: 14px;
    font-weight: bold;
    margin: 0;
    color: #333;
}

.story-caption-wrapper {
    max-height: 100px;
    overflow-y: auto;
    padding-right: 4px;
}

.story-caption {
    font-size: 14px;
    line-height: 1.5;
}
/*  video view */
.story-media-wrapper {
    width: 100%;
    max-width: 100%;
    max-height: 600px;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000; /* 黒背景があればそれっぽい */
}

.story-media-wrapper video {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain; /* トリミングしない */
}

/* caption */
.story-caption-wrapper {
    display: flex;
    margin: 10px;
}
.sotry-caption {
    font-size: 16px;
    color: #f5f5f5;
}
/* View modal Story */
.story-view-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  background-color: rgba(0, 0, 0, 0.6);
}

.story-view-modal.hidden {
  display: none;
}

.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.modal-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
}

.close-btn {
  position: absolute;
  top: 10px; right: 15px;
  font-size: 24px;
  cursor: pointer;
  z-index: 1000;
}
.story-delete-link {
    color: #333;
}
/* Toast message */
.toast-wrapper {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
}

.toast-message {
  display: none;
  background-color: #ff4d4f;
  color: white;
  padding: 12px 20px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  font-size: 14px;
  max-width: 400px;
  min-width: 200px;
  text-align: center;

  /* ✅ 改行設定 */
  white-space: normal;         /* 折り返し許可 */
  word-break: break-word;      /* 単語単位で折り返す（長いURLもOK） */
  overflow-wrap: anywhere;     /* 特に強制的に改行したいとき */
}
.toast-success {
  background-color: #46df6c; /* 薄い緑 */
  color: #fff; 
}

.toast-error {
  background-color: #e24d50; /* 薄い赤 */
  color: #fff;
}

/* Main プレビューエリアの調整 */
#preview {
  margin-top: 15px;
  text-align: center;
}

#preview video {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  object-fit: contain;
}

/* hover user profile */
.hover-user-trigger {
    color: #444;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.hover-wrapper {
  position: relative;
  display: inline-block;
}

.hover-profile-card {
  display: none;
  position: absolute;
  z-index: 999;
  width: 250px;
  background: white;
  border: 0.5px solid #ccc;
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Article main */
/* --- 表示制御用クラス（JSで付与）--- */
.hover-profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

/* --- プロフィール画像 --- */
.hover-profile-image {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 2px;
}
/* フォローボタンを画像の右横に配置 */
.hover-profile-follow-btn form {
  margin-left: 8px;
}

.follow-button {
  padding: 8px 10px;
  font-size: 12px;
  border-radius: 16px;
  border: 0.5px solid #ccc;
  background-color: black;
  cursor: pointer;
  transition: all 0.2s ease;
}

.follow-button .follow-text {
  color: white;
  font-size: 14px;
  font-weight: bold;
}

/* ✅ フォロー中（白背景） */
.follow-button.is-following {
  background-color: white;
  border: 1px solid #ccc;
}

.follow-button.is-following .follow-text {
  color: black;
}

/* --- ユーザー名 --- */
.hover-profile-username {
    color: #444;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0 0 4px;
    }

/* --- Bio --- */
.hover-profile-bio {
  font-size: 14px;
  color: #555;
  margin-bottom: 6px;
  line-height: 1.4;
  word-break: break-word;
}

/* --- フォロー／フォロワー --- */
.hover-profile-follow {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #555;
  margin-bottom: 8px;
}

.hover-profile-follow span {
  white-space: nowrap;
}

.follow-count {
  font-weight: 600;
  color: #222; /* ← 少し濃い黒 */
  margin-right: 4px;
}

/* --- フォローボタン --- */
.hover-profile-card .user_profile_btn {
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid #1da1f2;
  background-color: #fff;
  color: #1da1f2;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.hover-profile-card .user_profile_btn_unfollow {
  background-color: #e8f5fe;
  border-color: #ccc;
  color: #333;
}

/* articles */
.username a {
    font-size: 16px;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.following-feed-wrapper {
    width: min(470px, 100vw); /* ← vw（画面幅）にするのが一般的 */
    max-width: 100%;
    margin: 0 auto; /* 中央寄せ */
    border-bottom: 0.5px solid #efefef;
    transition: transform 0.3s ease;
}

.article-wrapper .following-feed-wrapper .following-articles > li {
    display: inline-block;
    vertical-align: middle;
    margin: 10px 2px;
    text-decoration: none;
}


/* .following-feed-wrapper:hover {
  background: var(--hover-color);
} */

.articles-item img
{
    height: 50px;
    width: 50px;
    border-radius: 50%;
}

.articles-item p {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 18px;
    font-weight: 550; /* Usernameを少し太く */
    line-height: 1.4;
    color: #262626;
    margin: 0;
}

.articles-item p small {
    font-weight: 400;
    font-size: 12px;
    color: #8e8e8e; 
    margin-left: 4px;
}

.following-articles
{
    padding-left: 8px;
    padding-top: 2px;
}

/*　Swiper image */
/* --- Swiper image wrapper --- */
/* Swiper image - 共通設定 */
.swiper-container {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.swiper-wrapper {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
}

/* 中央揃え */
.articles-thumb .swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  width: 100%;
  position: relative;
}

/* 通常カード用のzoom-container */
.articles-thumb .swiper-zoom-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: auto;  /* ✅ scroll OK */
}

/* 通常カード用の画像（pinch zoom対応） */
.articles-thumb .swiper-slide img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 2px;
  touch-action: manipulation;
  display: block;
}
/* large-card のスライド全体に高さを指定 */
.following-feed-wrapper.large-card .swiper-slide {
  height: 500px;
}

/* large-card 用の zoom-container */
.following-feed-wrapper.large-card .swiper-zoom-container {
  height: 100%;
  max-height: 500px;
}
/* large-card pagenation */
.following-feed-wrapper.large-card .swiper-pagination-bullets {
  bottom: 20px; /* 調整 */
}

/* large-card の画像（ズームを保ちつつレイアウト維持） */
.following-feed-wrapper.large-card .swiper-slide img {
  width: auto;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  border-radius: 2px;
  touch-action: manipulation;
}


/* --- SWiper 矢印ボタンスタイル --- */
/* ボタンの共通スタイル */
.custom-swiper-button {
    width : 23px;
    height: 23px;
    background-color: rgba(250, 246, 246, 0.971);
    opacity: 0.8;
    border-radius: 50%;
    color: #666666ab;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    top: 50%;
    transform: translateY(-50%);
    position: absolute;
    z-index: 10;
    cursor: pointer;
}

/* Font Awesome アイコンサイズ */
.custom-swiper-button i {
    font-size: 14px;
}

/* 位置調整 */
.swiper-button-prev {
    left: 8px;
}

.swiper-button-next {
    right: 8px;
}

/* デフォルトの ::after を非表示にする */
.swiper-button-prev::after,
.swiper-button-next::after {
    display: none;
}

/* --- Swiper pagination スタイル --- */
/* Swiper pagenation */
/* スワイパーのページネーションを nav の下に隠す */
.articles-thumb .swiper-pagination-bullets {
    bottom: 6px;
}

.articles-thumb .swiper-pagination-bullet {
    background-color: white;
    opacity: 0.7;
    z-index: 1;
}

.articles-thumb .swiper-pagination-bullet-active {
    background-color: #1c507a; /* アクティブ時は少し濃い青 */
    opacity: 1;
    z-index: 1;
}
/* username badge snippet  */

/* 基本レイアウト */
.articles-caption-inline {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 16px;
  color: #262626;
  padding: 8px 12px 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ユーザー名部分 */
.username-badge-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  white-space: nowrap;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* テキスト部分の最小高さを確保してUIが崩れないように */
.snippet-wrapper {
  overflow: hidden;
  transition: max-height 0.1s cubic-bezier(0.25, 1, 0.5, 1);
  max-height: 80px;
  overflow-anchor: none;
}

.snippet-text {
  word-break: break-word;
  cursor: pointer;
  min-height: 30px;
}
/* .snippet-text.expanded {
  max-height は JS が設定する
} */

/* 「続きを読む」リンク */
.read-more {
  font-size: 12px;
  color: #8e8e8e;
  text-decoration: none;
  white-space: nowrap;
  align-self: flex-start;
}

/* articles icons */
.articles-icon {
    display: flex;
    justify-content: space-between;  /* 左右に分ける */
    align-items: center;
    margin: 10px;
}

.articles-icon-left ul {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.articles-icon-wrapper {
    display: flex;
    align-items: center;
    height: 50px;
}

.articles-icon-wrapper i,
.articles-icon-right i {
    font-size: 23px;
    color: gray;
}

.liked .liked_heart {
    color: var(--main-color);
}

.articles-icon-right {
    margin-right: 10px;
}

.btn-bookmark {
    background: none;
    border: none;
    cursor: pointer;
}
.btn-book_mark i.fas.fa-bookmark {
    color: var(--main-color);
}

/* hover */
.articles-hover {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.articles-hover:hover {
    background: rgba(71, 157, 255, 0.12);
}

.articles-hover i {
    pointer-events: none;
    background: none;
    padding: 0;
    margin: 0;
    transition: color 0.2s ease;
}

.btn-like, .toggle-comment-btn {
    all: unset;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* counts */
.articles-sum
{
    display: inline-block;
    justify-content: center ;
    align-items: center ;
    margin-left: 3px;
    font-size: 14px;
    color: gray;
}

/* comment */
.comment-section {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 全コメント共通 */
.comment-bg
{
    background:  #E5EDF1;    
    display: flex;
    flex-direction: column; /* ← 縦並び */
    max-height: 300px; /* ← 高さ調整 */
    overflow-y: auto;  /* ← 縦スクロールを有効にする */
    padding-right: 5px; /* スクロールバーで内容が隠れないように */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE, Edge */
}
.comment-bg::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.comment-bg::-webkit-scrollbar {
    width: 6px;
}
.comment-bg::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}


.comment {
    margin-bottom: 24px;
    margin-top: 10px;
}

/* 吹き出しとアバターを横並び */
/* 横並びにする */
.comment-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.self-comment-row {
    justify-content: flex-end; /* ✅ 右寄せ */
    margin-right: 6px;
}

.bubble {
    margin-right: 10px;
    padding: 6px 12px;
    border-radius: 18px;
    position: relative;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 80%;
    text-align: left;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 色分け */
.other-comment .bubble {
    background-color: #fff;
}
.my-comment .bubble {
    background-color: #dcf8c6;
}

/* 吹き出し矢印 */
.other-comment .bubble::before {
    content: "";
    position: absolute;
    top: 3px;
    left: -15px;
    border: 12px solid transparent;
    border-right-color: #fff;
}
.my-comment .bubble::before {
    content: "";
    position: absolute;
    top: 3px;
    right: -15px;
    border: 12px solid transparent;
    border-left-color: #dcf8c6;
}

/* アバター＋名前＋時刻（縦並び） */
.avatar-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-left: 4px;
    width: 70px;
}
.avatar-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}
.avatar-wrapper a {
    background:  #E5EDF1;
}
.meta-row {
    display: flex;
    gap: 6px;
    color: #888;
    margin-top: 4px;
    margin-left: 2px;
}
.meta-username {
    font-size: 14px;
    font-weight: bold;
    color: #555;
}
.meta-time {
    padding-top: 4px;
    font-size: 0.7rem;
    color: #aaa;
}
.meta-row.self-meta {
    justify-content: flex-end;
    margin-right: 10px;
}


/* comment text area */
.write-new {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.write-new textarea {
    background:                  #fff;
    border:                        none;
    border-bottom:    0.5px solid #dbdbdb;
    color:                         #666;
    font-family: 'Open Sans' sans-serif;
    font-size:                      1em;
    height:                       80px;
    transition:       border-color 0.3s;
    width:                         100%;
    appearance:                    none;
    -webkit-appearance:            none;
    -moz-appearance:               none;
    padding:                  15px 20px;
    line-height:                   1.75;
    letter-spacing:              0.05em;
    box-sizing: border-box;
    }

.write-new textarea:focus{
    outline:                       none;
}

.write-new img {
    border-radius:        50%;
    background:       #eeeeee;
    width:               50px;
    height:              50px;
    overflow:          hidden;
    text-align:        center;
    }

.comment-btn-wrapper
{
    display: flex ;
    justify-content: space-between;
    margin:0px auto;
    justify-items: center ;
    align-items: center ;
    vertical-align: middle;
    padding-left: 10px;
    padding-right: 5px;
    padding-top: 10px;
    padding-bottom: 20px;
}

.write-new button
{
    background: none;
    border: none;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: var(--main-color);
    color:               #fff;
    font-weight:         bold;
    cursor:           pointer;
    padding: 13px;
    font-size: 16px;
    border-top-right-radius: 20px;
    border-bottom-right-radius: 20px;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
    margin-left: 10px;
}


.write-new button:hover
{
    opacity:0.7;
}

.write-new label,
.write-new .errorlist{
    display: none;
    }

.write-new span{
    position:   relative;
    top:            12px;
    font-size:      12px;
    }

/* スマホ対応 */
@media (max-width: 600px) {
  .user-comment-text-box,
  .author-comment-text-box {
    max-width: 90%;
    font-size: 13px;
  }

  .avatar img {
    width: 36px;
    height: 36px;
  }
  .write-new,
  .comment-btn-wrapper,
  .write-new textarea {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .write-new textarea {
    word-break: break-word;
    overflow-wrap: break-word;
  }

  body {
    overflow-x: hidden; /* ページ全体の横スクロール防止 */
    }
}
@media (max-width: 600px) {
  .write-new textarea,
  .write-new input,
  .write-new button {
    font-size: 16px !important;
  }
}
@media (max-width: 600px) {
  .comment-btn-wrapper {
    display: flex;
    justify-content: space-between; /* ← 右寄せに */
    align-items: center;
    padding-left: 20px;
    padding-right: 20px;
    gap: 10px;
  }

  .write-new button {
    width: auto;              /* ← 広がりすぎ防止 */
    margin-left: auto;        /* ← 右寄せ */
    margin-top: 0;
    padding: 10px 16px;
    font-size: 14px;
  }

  .write-new img {
    width: 40px;
    height: 40px;
  }
}
/* hashtag */
.hashtag-link {
    color: #007bff;
    text-decoration: none;
}

.hashtag-link:hover {
    text-decoration: underline;
}

/* right style */

/* .right {
  width: 30%;
  padding: 1rem;
  flex-shrink: 0;
} */
.right-wrapper {
  position: relative; /* ✅ stickyやfixedをやめる */
  margin-top: 0;
}

/* Search */
.searchs {
    display: flex;
    justify-content: center; 
    width: 100%;
    padding-left: 10px;      
}
.search-wrapper {
    width: 100%;
}
.global-tag p {
    font-size: 0.75em;
    color: gray;
}

.search-box {
    display: flex;
    justify-content: center;
}

.simple-search-form {
    position: relative;
    width: 100%;
    max-width: 300px;
}

.simple-search-form input[type="text"] {
    width: 100%;
    padding: 10px 36px 10px 12px;
    font-size: 14px;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    background-color: #fafafa;
    color: #262626;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.simple-search-form input[type="text"]:focus {
    border-color: #a8a8a8;
    background-color: #fff;
}

.search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #8e8e8e;
    pointer-events: none;
}
.search-footer {
    padding-bottom: 20px;
}
/* Loader animation */
#loader {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  margin-top: 20px;
  min-height: 100px;
  width: 100%;
  position: relative;
  text-align: center;
}

.spinner {
  width: 24px;
  height: 24px;
  animation: IGCoreSpinnerSpin12 1.2s steps(12) infinite;
}

/* アニメーション定義 */
@keyframes IGCoreSpinnerSpin12 {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Spinner SVG の中央配置 */
#loader svg.custom-style {
  width: 50px;
  height: 50px;
  animation: IGCoreSpinnerSpin12 1.2s steps(12) infinite;
}
/* end-message circle-check */
.end-icon-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}
.gradient-border {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-image: linear-gradient(135deg, #FFF720 10%, #3CD500 100%);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gradient-border-inner {
    width: 98%;
    height: 98%;
    border-radius: 50%;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.end-circle-check {
    display: flex;  /* ← 必須！ */
    align-items: center;
    justify-content: center;
    font-size: 30px;

    /* テキストにグラデーション */
    background: linear-gradient(135deg, #FFF720 10%, #3CD500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 下の「これ以上ありません」メッセージ */
.end-message {
  font-size: 0.9em;
  color: #777;
  margin-top: 10px;
}

/* おすすめアーティクル */
.favorite-articles
{
    width: 100%;
    margin-top: 72px;
}

.favorite-title
{
    padding: 10px ;
}
.favorite-title span {
    font-size: 14px;              /* または 13px */
    font-weight: 600;             /* セミボールド */
    color: #262626;               /* Instagramの標準テキスト色 */
    letter-spacing: 0.3px;        /* 若干の余白で視認性UP */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.4;
}

.favorite-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px 8px 10px;
}

.favorite-wrapper:hover{
    background: var(--hover-color);
    border-radius: 16px;
}
.favorite-wrapper a:hover {
  background-color: transparent;
  color: inherit;
  text-decoration: none;
}

/* favorite Items */
.favorite-category
{
    color: gray ;
    line-height: 2;
}

.favorite-items {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1; /* タイトル側が残り幅を使うように */
}

.favorite-items a {
    color: #333;
    text-decoration: none;
}

.favorite-items span {
    margin-left: 10px;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.favorite-thumb {
    margin-left: 12px;
    flex-shrink: 0;
}

.favorite-thumb img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%; /* 丸型に */
    box-shadow: 0 0 3px rgba(0,0,0,0.1);
}
/* さらに見る */
.favorite-info
{
    padding: 14px;
}

.favorite-info h5
{
    color: #00acee ;
    font-weight: 200;
}

/* おすすめユーザー */
.users
{
    width: 100%;
    height: auto;
    margin-top: 20px;
}
.users-wrapper {
  box-sizing: border-box;
  padding: 8px 10px;
}

.users-box {
    display: flex;
    align-items: center;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
    padding-left: 10px;
}

.users-items img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%; /* 丸くする */
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
}

.users-items span {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}
.users-wrapper:last-child
{
    border-bottom: none ;
}

.users-wrapper:hover
{
    background: var(--hover-color);
    border-radius: 16px;
}

/* Right item under */
.web-info, .web-info a
{
    text-align: center ;
    color: gray ;
    margin-top: 10px;
}

.web-info span
{
    font-size: 15px;
    padding-right: 10px;
}

.web-info span:hover
{
    text-decoration: underline;
}

.copyright p
{
    font-size: 14px;
    margin-top: 6px;
}


/* mobile nav */
.mobile-nav
{
    position: fixed ;
    bottom: 0;
    width: 100%;
    height: 55px;
    z-index: 10;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
    background: #fff;
    display: flex ;
    overflow-x: auto ;
}

.mobile-nav-link
{
    display: flex ;
    flex-direction: column ;
    align-items: center ;
    justify-content: center ;
    flex-grow: 1;
    min-width: 50px;
    overflow: hidden ;
    white-space: nowrap ;
    color: gray;
    text-decoration: none ;
    -webkit-tap-highlight-color:transparent ;
    transition: background-color 0.1s ease-in-out ;
}

 .mobile-nav-icon {
    font-size: 24px; /* 少し小さめに */
    color: #000;
    font-weight: 300; /* 効果は限定的（FontAwesomeには反映されないことも） */
    -webkit-text-stroke: 0 !important; /* 輪郭を除去してスッキリ */
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-nav-icon:hover
{
    color: var(--main-color);
}

.mobile-nav-icon:active
{
    color: var(--main-color);
}

.mobile-nav .live_notify_badge
{
    font-size: 10px;
}

/* 半透明（下スクロール時） */
.mobile-nav.scrolled-down {
  opacity: 0.3;
}

/* 元に戻す（上スクロール時） */
.mobile-nav.scrolled-up {
  opacity: 1;
}
/* hiden */
.mobile-nav.nav-hidden {
  opacity: 0;
  pointer-events: none;
}

/* mobile create */

.mobile-create-circle
{
    position:           fixed;
    width:               60px;
    height:              60px;
    background-color: var(--main-color);
    border-radius:        50%;
    bottom:              68px;
    right:               10px;
    z-index:               11;
    border:                 0;
    padding:                0;
    cursor:           pointer;
    transition:transform   .4s;
    outline:             none;
    box-shadow: 0 2.8px 2.2px rgba(0,0,0,.02),
    0 6.7px 5.3px rgba(0,0,0,.028),
    0 12.5px 10px rgba(0,0,0,.035),
    0 22.3px 17.9px rgba(0,0,0,.042),
    0 41.8px 33.4px rgba(0,0,0,.05),
    0 100px 80px rgba(0,0,0,.07);
}

.mobile-create-circle a
{
    color: #fff;
}

.mobile-create-circle i
{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    -webkit-transform: translate(-50%, -50%);
    -ms-transform: translate(-50%, -50%);
    font-size: 20px;
}

/* pagination */

ul{
    padding:                  0;
    list-style-type:       none;
    }

.pager{
    position:          relative;
    top:                   30px;
    padding:               30px;
    }

.pager .pagination {
  text-align:            center;
    }

.pager .pagination li {
  display:               inline;
  margin:                 0 2px;
  padding:                    0;
  display:         inline-block;
  width:                   50px;
  height:                  50px;
  text-align:            center;
  position:            relative;
  border-radius:           50px;
  border:        1px solid #fff;
    }

.pager .pagination li.pre,
.pager .pagination li.next{
  background:            #a3e4e4;
  color:                    #fff;
    }

.pager .pagination li a{
  vertical-align:            middle;
  position:                absolute;
  top:                            0;
  left:                           0;
  width:                       100%;
  height:                      100%;
  text-align:                center;
  display:                    table;
  text-decoration:             none;
  -webkit-transition: all 0.3s ease;
  -moz-transition:    all 0.3s ease;
  -o-transition:      all 0.3s ease;
  transition:        all  0.3s ease;
    }

.pager .pagination li.pre a,
.pager .pagination li.next a{
  color:                       #fff;
    }

.pager .pagination li a span{
  display:               table-cell;
  vertical-align:            middle;
    }

.pagination li a
{
    color: #333;
}

.pager .pagination li a:hover,
.pager .pagination li a.active{
  color:                                #fff;
  background:                        #dde68e;
  border-radius:                        10px;
  border-radius:                        50px;
  animation:         animScale 0.4s ease-out;
  transform-origin:                  50% 50%;
  -webkit-animation: animScale 0.4s ease-out;
  -webkit-transform-origin:          50% 50%;
  -moz-animation: animScale    0.4s ease-out;
  -moz-transform-origin:             50% 50%;
    }

@keyframes animScale {
  0% { transform: scale(0.8, 0.8); }
  40% { transform: scale(1.2, 1.2); }
  60% { transform: scale(1, 1); }
  80% { transform: scale(1.1, 1.1); }
  100% { transform: scale(1, 1); }
    }

@-webkit-keyframes animScale {
  0% { -webkit-transform: scale(0.8, 0.8); }
  40% { -webkit-transform: scale(1.2, 1.2); }
  60% { -webkit-transform: scale(1, 1); }
  80% { -webkit-transform: scale(1.1, 1.1); }
  100% { -webkit-transform: scale(1, 1); }
    }

@-moz-keyframes animScale {
  0% { -moz-transform: scale(0.8, 0.8); }
  40% { -moz-transform: scale(1.2, 1.2); }
  60% { -moz-transform: scale(1, 1); }
  80% { -moz-transform: scale(1.1, 1.1); }
  100% { -moz-transform: scale(1, 1); }
    }

/* global footer */

.global-footer{
    margin:     80px auto;
    padding-bottom: 20px;
    }

/* @media */
/* Icons box */
/* ipad 横 */
/* iPadサイズではラベルを非表示に */
@media screen and (max-width:1140px) {
    .title_wrapper {
        padding-bottom: 60px;
    }
}
@media screen and (max-width: 1000px) {
    
    .left {
        width: 15%;
        flex-shrink: 0; 
    }
    .center-and-right {
        width:85%;
    }
    .center {
        width:100%;
    }
    .right {
        width: 0;
    }
    .right-wrapper {
        display: none;
    }
    .icon-label-text {
        display: none;
    }
    li.logo {
        justify-content: center;
        justify-items: center;
        padding-left: 0;
    }
    .wrapper_circle {
        justify-content: center;
        justify-items: center;
        margin-left: 0;

    }
    .icon-label-text {
    display: none;
    }

    .left-icons-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-left: 0;
    }

    .icon-item {
    width: 100%;
    display: flex;
    justify-content: center;
    }

    .icon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    }

    .icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    }
    .web-info, .web-info a span{
        font-size: 12px;
    }
}

@media only screen and (max-width: 768px) {
    .left {
        width:15%;
    }
    .center-and-right {
        width: 85%;
    }
    .center {
    width: 100%;
    }
    .pager .pagination li{
    display: none;
    }
    .pager .pagination li.pre,
    .pager .pagination li.next{
    display:            inline-block;
    width:                      42px;
    height:                     42px;
    text-align:               center;
    margin:                   0 auto;
    }
    .pager .pagination li.pre a,
    .pager .pagination li.next a{
    width:                      100%;
    text-align:               center;
    }
    .following-feed-wrapper p {
    font-size: 14px; /* 12〜14px */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    color: #262626; 
    margin: 2px 0;
    }
    .hover-profile-card {
    display: none !important;
    pointer-events: none;
    visibility: hidden;
  }
}

/* スマホ */
@media screen and (max-width: 600px) {
  .articles-description h1 {
    font-size: 14px;
    line-height: 1.2;
    margin-bottom: 4px;
  }

  .articles-description p {
    font-size: 12px;
    line-height: 1.3;
    margin-bottom: 2px;
  }

  .articles-description small {
    font-size: 10px;
    color: #888; 
  }
  .left
    {
        display: none ;
    }
    .right
    {
        display: none ;
    }
    .center-header
    {
        display:none;
    }
    .center-and-right
    {
        width: 100%;
        margin-top: 0px;
    }
    .center {
        width: 100%;
        padding: 0;
    }
    .following-feed-wrapper {
        width:100%;
    }

    .mobile-nav
    {
        z-index: 10;
    }
    .title_wrapper
    {
        font-size: 20px;
    }
    .sub_title
    {
        margin-top: 20px;
    }
    .favorite-title span {
        font-size: 15px;
    }
    .username-badge-wrapper {
        font-size: 14px;
    }
    .username a {
        font-size: 14px;
    }
    .articles-caption-inline {
        font-size: 14px;
    }
}

/* scroll bar */
/* スマホ・タブレット（例: 768px 以下）ではスクロールバーを出さない */
@media (max-width: 768px) {
    html, body {
    height: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: auto;
    overscroll-behavior: none;
    scrollbar-width: none;
    }

    .center-and-right {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    }
    .center-and-right::-webkit-scrollbar {
    display: none;
    }
    /* Chrome, Safari */
    .center-and-right::-webkit-scrollbar {
    display: none;
    }

    /* Firefox */
    .center-and-right {
    scrollbar-width: none;
    -ms-overflow-style: none;
    }
    /* comment */
    /* Chrome, Safari */
    .comment-bg::-webkit-scrollbar {
    display: none;
    }

    /* Firefox */
    .comment-bg {
    scrollbar-width: none;
    -ms-overflow-style: none;
    }
}

/* スマホ（幅600px未満）専用のナビやUIパーツを、
大きな画面（タブレットやPC）では非表示 */
@media (min-width: 600px) {
    .mobile-nav-wrapper {
        display: none;
    }
    .mobile-nav {
        display: none;
    }
    .mobile-create-circle {
        display: none;
    }
}

/* --- レスポンシブ調整 Swiper--- */
@media screen and (max-width: 768px), (hover: none) and (pointer: coarse) {
    .swiper-button-prev,
    .swiper-button-next {
        display: none !important;
    }
}
/* Darkmode 自動切り替え */
@media (prefers-color-scheme: dark) {
    body:not(.dark-mode) {
    --main-color: #1da1f2;
    --hover-color: rgba(255, 255, 255, 0.04);
    --bg-color: #121212;
    --text-color: #f5f5f5;
    }

    body:not(.dark-mode) .mobile-nav-wrapper {
    background-color: #1e1e1e;
    }

    body:not(.dark-mode) #clouds {
    background: -webkit-linear-gradient(top, #ffcc70 0%, #ff6f61 30%, #6a0572 100%);
    background: -moz-linear-gradient(top, #ffcc70 0%, #ff6f61 30%, #6a0572 100%);
    background: -o-linear-gradient(top, #ffcc70 0%, #ff6f61 30%, #6a0572 100%);
    background: linear-gradient(to bottom, #ffcc70 0%, #ff6f61 30%, #6a0572 100%);
    }

    body:not(.dark-mode) .articles-icon-items-wrapper .tw i {
    color: #fff;
    }
    body:not(.dark-mode) .articles-icon-items-wrapper .fb i {
    color: #fff;
    }
    body:not(.dark-mode) .articles-hover i {
    color: #fff;
    }
    body:not(.dark-mode) .favorite-wrapper span {
    color: #f5f5f5;
    }
    body:not(.dark-mode) .users-wrapper span {
    color: #f5f5f5;
    }
    body:not(.dark-mode) .articles-description p {
    color: #f5f5f5;
    }
    body:not(.dark-mode) .articles-description p small {
    color: #ddd;
    }
    body:not(.dark-mode) .mobile-nav {
    background: #1e1e1e;
    box-shadow: 0 0 3px rgba(255, 255, 255, 0.1);
    }

    body:not(.dark-mode) .mobile-nav-link {
    color: #f5f5f5;
    }

    body:not(.dark-mode) .mobile-nav-icon {
    color: #f5f5f5;
    }

    body:not(.dark-mode) .mobile-nav-icon:hover,
    body:not(.dark-mode) .mobile-nav-icon:active {
    color: var(--main-color);
    }
    body:not(.dark-mode) .mobile-nav {
    background: #1e1e1e;
    }
    body:not(.dark-mode) .articles-item p {
    color: #f5f5f5;
    }
    body:not(.dark-mode) .article-item p small {
    color: #cdcbcb;
    }
    body:not(.dark-mode) .articles-caption-inline .username a {
        color: #f5f5f5;
    }
    body:not(.dark-mode) .articles-caption-inline .snippet-text {
        color: #f5f5f5;
    }
    body:not(.dark-mode) .articles-caption-inline .read-more {
    color: #cdcbcb;
    }
    body:not(.dark-mode) .liked .liked_heart {
    color: var(--main-color);
    }
    body:not(.dark-mode) .following-feed-wrapper {
        border-bottom: 0.5px solid rgba(255, 255, 255, 0.1); /* ごく薄い白線 */
    }
    body:not(.dark-mode) .favorite-title span {
    color: #cdcbcb;
    }
    body:not(.dark-mode) .left {
    border-right: 0.5px solid rgba(255, 255, 255, 0.1);
    }
    body:not(.dark-mode) .hover-profile-username {
    color: #fff;
    }
    body:not(.dark-mode) .hover-profile-card {
    background-color: #2a2a2a;
    }
    body:not(.dark-mode) .hover-profile-bio {
    color: #f5f5f5;
    }
    body:not(.dark-mode) .hover-profile-follow {
    color: #ccc;
    }
    body:not(.dark-mode) .follow-count {
    color: #fff;
    }
    body:not(.dark-mode)  .hover-user-trigger {
    color: #f5f5f5;
    }
    body:not(.dark-mode) .custom-swiper-button {
    background-color: gray;
    }
    body:not(.dark-mode) .gradient-border-inner {
    background: var(--bg-color);
    }
    body:not(.dark-mode) .stories-modal-content.modern {
    background-color: #222;
    border: 1px solid #444;
    }
    body:not(.dark-mode) .upload-label span {
    color: #f5f5f5;
    }
    body:not(.dark-mode) .upload-label:hover {
    background-color: #333;
    }
    body:not(.dark-mode) .story-input-wrapper {
    background-color: #000;
    }
    body:not(.dark-mode) .caption-wrapper textarea {
    background-color: #222;
    color: #f5f5f5;
    border: 1px solid #444;
    }
    body:not(.dark-mode) .story-username,
    body:not(.dark-mode) .story-username-other,
    body:not(.dark-mode) .story-username-other a {
    color: #f5f5f5;
    }
    /* stories view */
    body:not(.dark-mode) .modal-content {
    background-color: #222;
    }
    body:not(.dark-mode) .story-time-wrapper span {
    color: gray;
    }
    body:not(.dark-mode) .author-name-wrapper p {
    color: #f5f5f5;
    }
    body:not(.dark-mode) .story-time-wrapper span {
    color: gray;
    }
    body:not(.dark-mode) .story-user-wrapper a {
    background-color: #121212;
    }
    body:not(.dark-mode) .story-ring-myself {
    background-color: #222;
    }
}
/* comment box  */
/* === 🌙 Dark Mode 対応 === */
@media (prefers-color-scheme: dark) {
    .comment-bg {
        background:#121212;
    }
    .meta-username {
        color: #f5f5f5;
    }
     .bubble p {
        color: #333;
     }
    .avatar-wrapper a,
    .comment-bg {
        background:#121212;
    }

    .write-new textarea {
    background: #1e1e1e;
    color: #ddd;
    border-bottom: 0.5px solid #444;
    }

    .write-new img {
    background: #444;
    }

    .fa-lg {
    color: #ccc;
    }

    .write-new button {
    background-color: var(--main-color);
    color: #fff;
    }

    .write-new span {
    color: #aaa;
    }
}