/*--------------------------------------------------------------
chat box floating toggle button (g-page-v2 専用)
--------------------------------------------------------------*/
.gpv2-chat-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1da1f2;
  color: #fff;
  border: none;
  box-shadow: 0 6px 16px rgba(29, 161, 242, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3006;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.gpv2-chat-toggle:hover {
  background: #1a91da;
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(29, 161, 242, 0.5);
}
.gpv2-chat-toggle:active {
  transform: scale(0.95);
}
.gpv2-chat-toggle svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}
@media (max-width: 480px) {
  .gpv2-chat-toggle {
    right: 16px;
    bottom: 16px;
    width: 52px;
    height: 52px;
  }
}

/*--------------------------------------------------------------
chat box profile frame
--------------------------------------------------------------*/
#chat-box-profile-frame {
  display: block;
  position: fixed;
  top: 0px;
  padding: 0;
  margin: 0;
  left: -100vw;
  width: 100vw;
  height: 100vh;
  background-color: #252222;
  z-index: 3007;
  transition: left 0.6s ease-in-out;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
#chat-box-profile-frame::-webkit-scrollbar {
  display: none;
}
#chat-box-profile-frame.active {
  left: 0;
}
#chat-box-profile-frame .profile-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
#chat-box-profile-frame .profile-area .account-icon {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0;
  cursor: pointer;
  border: 2px solid #ccc;
  transition: border-color 0.3s;
}
#chat-box-profile-frame .profile-area .account-icon:hover {
  border-color: #0073aa;
}
#chat-box-profile-frame .profile-area .account-icon img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}
#chat-box-profile-frame .profile-area #profile-account {
  margin-top: 0.75rem;
  font-weight: bold;
  font-size: 14px;
}
#chat-box-profile-frame .profile-area #profile-text {
  margin-top: 0.25rem;
  font-size: 14px;
  color: #555;
}
#chat-box-profile-frame #profile-frame-close {
  background-color: #0073aa;
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  padding: 0.5rem 1.2rem;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s;
}
#chat-box-profile-frame #profile-frame-close:hover {
  background-color: #005d8f;
}

/*--------------------------------------------------------------
chat box post frame
--------------------------------------------------------------*/
.chat-box-post-frame {
  display: block;
  position: relative;
  top: 0px;
  padding: 0;
  margin: 0;
  left: 0;
  width: 100%;
  background-color: #252222;
  z-index: 3007;
  transition: left 0.6s ease-in-out;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.chat-box-post-frame::-webkit-scrollbar {
  display: none;
}
.chat-box-post-frame.active {
  left: 0;
}
.chat-box-post-frame #chat-box-message-input-frame {
  display: flex;
}
.chat-box-post-frame #chat-box-message-input-frame #chat-box-user-frame {
  display: block;
}
.chat-box-post-frame #chat-box-message-input-frame #chat-box-user-frame #btn-chat-box-image-select {
  margin: 0;
  padding: 0;
  width: 68px;
  height: 68px;
}
.chat-box-post-frame #chat-box-message-input-frame #chat-box-user-frame #btn-chat-box-image-select img {
  margin: 8px;
  padding: 0;
  width: 50px;
  height: 50px;
  max-width: none;
  border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
}
.chat-box-post-frame #chat-box-message-input-frame #chat-box-user-frame #chat-box-user-name {
  margin: 0;
  margin-top: 20px;
  padding: 0;
  height: 20px;
  font-size: 14px;
  text-align: center;
}
.chat-box-post-frame #chat-box-message-input-frame #chat-box-message-input {
  flex: 1;
  resize: none;
  min-height: 80px;
  padding: 0.75rem;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  line-height: 1.4;
  background-color: #f9f9f9;
  margin-top: 4px;
  margin-right: 4px;
}
.chat-box-post-frame #chat-box-message-input-frame #chat-box-message-input:focus {
  outline: none;
  border-color: #0073aa;
  background-color: #fff;
}
.chat-box-post-frame #chat-box-post-input-frame {
  text-align: center;
  margin: 8px;
}
.chat-box-post-frame #chat-box-post-input-frame #btn-chat-box-send-message {
  border-radius: 50vh;
  color: #00a8ca;
  background: rgb(15, 15, 15);
  padding: 4px;
  width: 200px;
  cursor: pointer;
  color: #ccc;
}
.chat-box-post-frame #chat-box-post-input-frame #btn-chat-box-send-message:hover {
  background: rgb(31, 30, 31);
}
.chat-box-post-frame #chat-box-image-upload-frame {
  text-align: center;
}
.chat-box-post-frame #chat-box-image-upload-frame label {
  display: inline-block;
  width: 48px;
  height: 48px;
  cursor: pointer;
}
.chat-box-post-frame #chat-box-image-upload-frame label svg {
  width: 100%;
  height: 100%;
  fill: #666;
  transition: fill 0.3s;
}
.chat-box-post-frame #chat-box-image-upload-frame label svg:hover {
  fill: #0073aa;
}
.chat-box-post-frame #chat-box-image-upload-frame #chat-box-file-name {
  margin-top: 0.5rem;
  font-size: 14px;
  color: #555;
}

/*--------------------------------------------------------------
chat box main frame
--------------------------------------------------------------*/
#chat-box-main-frame {
  display: block;
  position: fixed;
  top: 0px;
  padding: 0;
  margin: 0;
  left: -100vw;
  width: 100vw;
  height: 100vh;
  background-color: #252222;
  z-index: 3007;
  transition: left 0.6s ease-in-out;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
#chat-box-main-frame::-webkit-scrollbar {
  display: none;
}
#chat-box-main-frame.active {
  left: 0;
}
#chat-box-main-frame {
  background-color: rgba(13, 13, 14, 0);
}

.heart-wrapper {
  display: inline-block;
  margin-left: 5px;
  position: relative;
}

.heart-pop {
  animation: pop 0.5s ease-out forwards;
}

@keyframes pop {
  0% {
    transform: scale(3) translateY(0);
  }
  50% {
    transform: scale(0.5) translateY(0);
  }
  100% {
    transform: scale(1) translateY(0);
  }
}
.chat-box-container {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  background-color: #ffffff;
  width: 100%;
  max-width: 600px;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  border: 1px solid #eff3f4;
  box-sizing: border-box;
}
.chat-box-container *,
.chat-box-container *::before,
.chat-box-container *::after {
  box-sizing: border-box;
}
.chat-box-container p {
  margin: 0;
  line-height: 1.5;
}
.chat-box-container img {
  max-width: 100%;
  display: block;
}
.chat-box-container .navbar-head {
  background: #1da1f2;
  color: #fff;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.05em;
}
.chat-box-container .navbar-head div {
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}
.chat-box-container .navbar-head div:hover {
  background: rgba(255, 255, 255, 0.2);
}
.chat-box-container .navbar-head i {
  font-size: 18px;
}
.chat-box-container .chat-box-post-frame {
  background: #ffffff;
  padding: 20px;
  border-bottom: 1px solid #eff3f4;
}
.chat-box-container .chat-box-post-frame #chat-box-message-input-frame {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}
.chat-box-container .chat-box-post-frame #chat-box-user-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 60px;
  flex-shrink: 0;
}
.chat-box-container .chat-box-post-frame #chat-box-user-frame .account-icon {
  display: block;
  margin: 0;
  padding: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background-color: #eee;
  border: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: opacity 0.2s;
}
.chat-box-container .chat-box-post-frame #chat-box-user-frame .account-icon:hover {
  opacity: 0.8;
}
.chat-box-container .chat-box-post-frame #chat-box-user-frame .account-icon img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  display: block;
  border: none;
  margin: 0;
}
.chat-box-container .chat-box-post-frame #chat-box-user-frame #chat-box-user-name {
  font-size: 10px;
  color: #536471;
  margin-top: 4px;
  font-weight: 600;
  text-align: center;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-box-container .chat-box-post-frame textarea {
  flex-grow: 1;
  border: none;
  outline: none;
  resize: none;
  font-family: inherit;
  font-size: 16px;
  padding: 10px 0;
  min-height: 80px;
  color: #0f1419;
}
.chat-box-container .chat-box-post-frame textarea::-moz-placeholder {
  color: rgb(132.7755102041, 151.1632653061, 165.2244897959);
}
.chat-box-container .chat-box-post-frame textarea::placeholder {
  color: rgb(132.7755102041, 151.1632653061, 165.2244897959);
}
.chat-box-container .chat-box-post-frame #chat-box-post-input-frame {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid #eff3f4;
  padding-top: 12px;
}
.chat-box-container .chat-box-post-frame #chat-box-post-input-frame button {
  background: #1da1f2;
  color: #fff;
  border: none;
  padding: 8px 24px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 5px rgba(29, 161, 242, 0.3);
}
.chat-box-container .chat-box-post-frame #chat-box-post-input-frame button:hover {
  background: #1a91da;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(29, 161, 242, 0.4);
}
.chat-box-container .chat-box-post-frame #chat-box-post-input-frame button:active {
  transform: scale(0.98);
}
.chat-box-container #chat-box-window {
  background: #ffffff;
}
.chat-box-container #chat-box-window .post-table {
  width: 100%;
  border-collapse: collapse;
  border-bottom: 1px solid #eff3f4;
  transition: background-color 0.2s;
}
.chat-box-container #chat-box-window .post-table:hover {
  background-color: #f7f9fa;
}
.chat-box-container #chat-box-window .post-table td {
  padding: 0 16px 0 12px;
  vertical-align: top;
}
.chat-box-container #chat-box-window .post-table td[rowspan="3"] {
  width: 68px;
  padding: 16px 0 0 16px;
}
.chat-box-container #chat-box-window .post-table td[rowspan="3"] .user-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  -o-object-fit: cover;
     object-fit: cover;
  border: 1px solid rgba(0, 0, 0, 0.05);
}
.chat-box-container #chat-box-window .post-table tr:first-child td {
  padding-top: 16px;
}
.chat-box-container #chat-box-window .post-table tr:first-child td:nth-child(2) {
  font-size: 15px;
  font-weight: 700;
  color: #0f1419;
}
.chat-box-container #chat-box-window .post-table tr:first-child td:nth-child(2):hover {
  text-decoration: underline;
  cursor: pointer;
}
.chat-box-container #chat-box-window .post-table tr:first-child td:nth-child(3) {
  font-size: 13px;
  color: #536471;
  text-align: right;
  white-space: nowrap;
}
.chat-box-container #chat-box-window .post-table tr:first-child td:last-child {
  width: 30px;
  text-align: right;
}
.chat-box-container #chat-box-window .post-table tr:first-child td:last-child svg {
  fill: #536471;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.2s;
}
.chat-box-container #chat-box-window .post-table tr:first-child td:last-child svg:hover {
  background: rgba(29, 161, 242, 0.1);
  fill: #1da1f2;
}
.chat-box-container #chat-box-window .post-table tr:nth-child(2) td {
  padding-top: 4px;
  padding-bottom: 8px;
}
.chat-box-container #chat-box-window .post-table tr:nth-child(2) td p {
  font-size: 15px;
  color: #0f1419;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-box-container #chat-box-window .post-table tr:last-child td {
  padding-bottom: 16px;
}
.chat-box-container #chat-box-window .post-table tr:last-child td .like-button {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #536471;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  margin-left: -8px;
  border-radius: 99px;
  transition: all 0.2s;
}
.chat-box-container #chat-box-window .post-table tr:last-child td .like-button:hover {
  color: #f91880;
  background: rgba(249, 24, 128, 0.1);
}
.chat-box-container #chat-box-window .post-table tr:last-child td .like-button:hover .heart-wrapper img {
  transform: scale(1.2);
}
.chat-box-container #chat-box-window .post-table tr:last-child td .like-button .heart-wrapper {
  display: inline-flex;
  align-items: center;
}
.chat-box-container #chat-box-window .post-table tr:last-child td .like-button .heart-wrapper img.emoji {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/*--------------------------------------------------------------
  image-select
--------------------------------------------------------------*/
.image-select-frame {
  display: block;
  position: fixed;
  top: 0;
  left: -100vw;
  width: 100vw;
  height: 100vh;
  z-index: 3008;
  background-color: rgba(13, 13, 14, 0.6);
  backdrop-filter: blur(4px);
  transition: left 0.3s ease-out;
}
.image-select-frame.active {
  left: 0;
}

.image-select-frame {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  background-color: #ffffff;
  color: #0f1419;
  width: 100%;
  max-width: 400px;
  margin: 40px auto;
  border-radius: 16px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  border: 1px solid #eff3f4;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
  box-sizing: border-box;
}
.image-select-frame *, .image-select-frame *::before, .image-select-frame *::after {
  box-sizing: border-box;
}
.image-select-frame .navbar-head {
  background-color: #ffffff;
  border-bottom: 1px solid #eff3f4;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.image-select-frame .navbar-head svg:first-child {
  width: 32px;
  height: 32px;
  fill: #eff3f4;
  margin-right: 12px;
}
.image-select-frame .navbar-head #btn-image-select-close {
  width: 24px;
  height: 24px;
  fill: #eff3f4;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: background 0.2s, fill 0.2s;
  margin-left: auto;
}
.image-select-frame .navbar-head #btn-image-select-close:hover {
  background-color: rgba(15, 20, 25, 0.1);
  fill: #0f1419;
}
.image-select-frame .name-input-container {
  padding: 20px 20px 10px;
  background-color: #ffffff;
  flex-shrink: 0;
}
.image-select-frame .name-input-container label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #eff3f4;
  margin-bottom: 8px;
}
.image-select-frame .name-input-container input[type=text] {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #eff3f4;
  border-radius: 8px;
  font-size: 15px;
  color: #0f1419;
  outline: none;
  transition: border-color 0.2s, background-color 0.2s;
  background-color: #f7f9fa;
  font-family: inherit;
}
.image-select-frame .name-input-container input[type=text]::-moz-placeholder {
  color: white;
}
.image-select-frame .name-input-container input[type=text]::placeholder {
  color: white;
}
.image-select-frame .name-input-container input[type=text]:focus {
  border-color: #1da1f2;
  background-color: #ffffff;
}
.image-select-frame #image-select-gallery {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 16px;
  overflow-y: auto;
  flex-grow: 1;
}
.image-select-frame #image-select-gallery::-webkit-scrollbar {
  width: 6px;
}
.image-select-frame #image-select-gallery::-webkit-scrollbar-track {
  background: transparent;
}
.image-select-frame #image-select-gallery::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: content-box;
}
.image-select-frame #image-select-gallery img {
  width: 100%;
  aspect-ratio: 1/1;
  -o-object-fit: cover;
     object-fit: cover;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s;
  background-color: #f7f9fa;
}
.image-select-frame #image-select-gallery img:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1;
}
.image-select-frame #image-select-gallery img:active {
  transform: scale(0.95);
  border-color: #1da1f2;
}
@media (max-width: 480px) {
  .image-select-frame {
    width: 100%;
    height: 100vh;
    max-height: none;
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }
  .image-select-frame #image-select-gallery {
    grid-template-columns: repeat(4, 1fr);
    padding-bottom: 40px;
  }
}
