:root {
    --page-bg: #f6f7f9;
    --surface: #ffffff;
    --surface-muted: #f3f4f6;
    --text-primary: #141414;
    --text-secondary: #5d6470;
    --text-soft: #8a929d;
    --border-color: #e5e7eb;
    --accent: #ff2f7d;
    --accent-2: #f6a11a;
    --button-primary-bg: #101114;
    --button-primary-hover-bg: #2a2d33;
    --button-primary-text: #ffffff;
}

#userInfoModal {
    --button-primary-bg: #F657B5;
    --button-primary-hover-bg: #EB45A9;
    --button-primary-text: #FFFFFF;
    --button-secondary-bg: rgba(247, 244, 247, 0.88);
    --button-secondary-hover-bg: rgba(240, 236, 240, 0.92);
    --button-secondary-text: #54515a;
}

#userInfoModal .modal-button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
}

* {
  box-sizing: border-box;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Noto Sans JP', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background:
    linear-gradient(90deg, rgba(255, 47, 125, 0.08), rgba(246, 161, 26, 0.06) 45%, rgba(29, 155, 240, 0.06)),
    var(--page-bg);
  color: var(--text-primary);
}
html,
body {
  width: 100%;
  overflow-x: hidden;
}
a {
  color: inherit;
}
.profile-shell {
  width: 100%;
  max-width: 450px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--surface);
  box-shadow: 0 22px 70px rgba(20, 20, 20, 0.12);
}
.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: #1d9bf0;
  clip-path: polygon(50% 0%, 61% 12%, 77% 7%, 84% 23%, 100% 30%, 91% 47%, 100% 64%, 83% 72%, 78% 90%, 60% 86%, 50% 100%, 39% 87%, 22% 92%, 16% 75%, 0% 68%, 9% 51%, 0% 34%, 17% 27%, 22% 9%, 40% 14%);
  color: white;
  font-size: 8px;
  font-weight: 600;
  line-height: 1;
}
.profile-header {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border-color);
}
.profile-summary {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}
.profile-avatar-ring {
  position: relative;
  display: block;
  width: 96px;
  height: 96px;
  padding: 3px;
  border-radius: 50%;
  background: conic-gradient(from 210deg, #ff2f7d, #f6a11a, #ffdd55, #ff2f7d);
  text-decoration: none;
}
.profile-avatar {
  display: block;
  width: 100%;
  height: 100%;
  border: 3px solid white;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
  background: var(--surface-muted);
}
.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  gap: 6px;
  text-align: center;
}
.profile-stat strong {
  display: block;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.15;
}
.profile-stat span {
  display: block;
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 0.72rem;
  line-height: 1.25;
  word-break: keep-all;
}
.profile-bio {
  margin-top: 14px;
}
.profile-name-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 3px;
}
.profile-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
}
.profile-age {
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 700;
}
.profile-name-row .verified-badge {
  flex: 0 0 auto;
  align-self: center;
  margin-left: 1px;
  margin-right: 2px;
}
.profile-meta {
  margin: 0 0 7px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.45;
  text-shadow: none;
}
.profile-description {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.88rem;
  line-height: 1.65;
}
.profile-hobby-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 11px;
}
.hobby-tag {
  display: inline-flex;
  align-items: center;
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.2;
}
.profile-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.profile-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background 0.18s ease;
}
.profile-action-button .material-icons {
  margin-right: 5px;
  font-size: 1rem;
  line-height: 1;
}
.start-chat-button {
  background: #ff4f9a;
  border-color: #ff4f9a;
  color: #fff;
}
.start-chat-button:hover {
  background: #ef3f8c;
  border-color: #ef3f8c;
}
.feed-link-button {
  background: transparent;
  border-color: #dfe3e8;
  color: #333842;
}
.feed-link-button:hover {
  background: #f5f7f9;
}
.profile-filter-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--border-color);
}
.profile-filter-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 800;
}
.profile-filter-tab .material-icons {
  font-size: 19px;
}
.profile-filter-tab[aria-selected="false"] {
  color: var(--text-soft);
  box-shadow: none;
}
.profile-filter-tab[aria-selected="true"] {
  box-shadow: inset 0 -2px 0 var(--text-primary);
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  background: var(--border-color);
}
.profile-grid-tile {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #d9dde3;
  color: white;
  text-decoration: none;
}
.profile-grid-tile.is-hidden {
  display: none;
}
.profile-grid-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.profile-grid-tile:hover img {
  transform: scale(1.045);
  opacity: 0.9;
}
.profile-grid-tile--situation::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.01) 48%, rgba(255, 255, 255, 0.05)),
    rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(2.8px) saturate(1.02);
  backdrop-filter: blur(2.8px) saturate(1.02);
  pointer-events: none;
}
.profile-grid-tile--situation img {
  filter: blur(2.8px) saturate(0.98) brightness(0.99);
  transform: scale(1.03);
}
.profile-grid-tile--situation:hover img {
  opacity: 1;
  transform: scale(1.05);
}
.profile-more-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 16px 14px 22px;
  background: #ffffff;
}
.profile-more-actions[hidden] {
  display: none;
}
.profile-more-button {
  min-width: 156px;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text-primary);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(20, 24, 32, 0.08);
}
.profile-more-button[hidden] {
  display: none;
}
.profile-more-button:disabled {
  cursor: default;
  opacity: 0.62;
  box-shadow: none;
}
.profile-grid-icon {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
}
.profile-grid-tile--video .profile-grid-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.96);
  color: rgba(42, 45, 50, 0.64);
  font-size: 16px;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}
.profile-post-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: stretch;
  justify-content: center;
  padding: 18px 12px;
  background: rgba(0, 0, 0, 0.68);
}
.profile-post-modal.is-open {
  display: flex;
}
.profile-post-modal-panel {
  width: min(100%, 450px);
  max-height: calc(100vh - 36px);
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text-primary);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.38);
  display: flex;
  flex-direction: column;
}
.profile-post-modal-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 42px;
  padding: 4px 8px;
  border-bottom: 1px solid var(--border-color);
}
.profile-post-modal-close {
  position: fixed;
  top: max(calc(env(safe-area-inset-top, 0px) + 16px), 22px);
  right: max(calc(env(safe-area-inset-right, 0px) + 16px), calc((100vw - 450px) / 2 + 20px));
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-primary);
  box-shadow: 0 2px 12px rgba(20, 20, 20, 0.16);
  cursor: pointer;
}
.profile-post-modal-close:hover {
  background: var(--surface-muted);
}
.profile-post-modal-close .material-icons {
  font-size: 22px;
}
.profile-post-modal-feed {
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
}
.profile-post-feed-item {
  border-bottom: 1px solid var(--border-color);
  background: #ffffff;
}
.profile-post-feed-item:last-child {
  border-bottom: 0;
}
.profile-post-feed-item .feed-post-header {
  padding: 7px 14px;
  background: #ffffff;
}
.profile-post-feed-item .feed-poster {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
  color: inherit;
  text-decoration: none;
}
.profile-post-feed-item .feed-poster-avatar-link {
  flex: 0 0 auto;
  display: block;
  color: inherit;
  border-radius: 50%;
  overflow: hidden;
  text-decoration: none;
}
.profile-post-feed-item .feed-poster-avatar {
  display: block;
  width: 32px;
  height: 32px;
  border: 1px solid #e7dde2;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  background: #f8f3f5;
}
.profile-post-feed-item .feed-poster-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.profile-post-feed-item .feed-poster-name-row {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.profile-post-feed-item .feed-poster-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #171417;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-post-feed-item .feed-poster-official-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  background: #1d9bf0;
  clip-path: polygon(50% 0%, 61% 12%, 77% 7%, 84% 23%, 100% 30%, 91% 47%, 100% 64%, 83% 72%, 78% 90%, 60% 86%, 50% 100%, 39% 87%, 22% 92%, 16% 75%, 0% 68%, 9% 51%, 0% 34%, 17% 27%, 22% 9%, 40% 14%);
  color: #ffffff;
  font-size: 7px;
  font-weight: 700;
  line-height: 1;
  align-self: center;
}
.profile-post-feed-item .feed-poster-separator {
  flex: 0 0 auto;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}
.profile-post-feed-item .feed-poster-date {
  flex: 0 0 auto;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.profile-post-feed-item .feed-poster-chat-badge {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  max-width: 100%;
  gap: 3px;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: #6f7680;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.profile-post-feed-item .feed-poster-chat-badge-icon {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}
.profile-post-feed-item .feed-poster-chat-badge-count {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}
.profile-post-modal-media {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  background: #f1f2f4;
}
.profile-post-modal-media img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 74vh;
  object-fit: contain;
  background: transparent;
}
.profile-post-modal-media video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 74vh;
  object-fit: contain;
  background: #000000;
}
.profile-post-modal-media [hidden] {
  display: none;
}
.profile-post-modal-body {
  display: grid;
  gap: 12px;
  padding: 7px 14px 16px;
}
.profile-post-modal-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 9px 14px 0;
}
.profile-post-like-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #151216;
  cursor: pointer;
}
.profile-post-like-button .material-icons {
  font-size: 27px;
}
.profile-post-like-button[aria-pressed="true"] {
  color: #ed4956;
}
.profile-post-like-count {
  min-width: 2ch;
  color: #2f282d;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.profile-post-feed-item .feed-scene-entry-button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  margin-left: auto;
  padding: 6px 0 6px 8px;
  border: 0;
  color: #6f6269;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, transform 0.15s ease;
}
.profile-post-feed-item .feed-scene-entry-button:hover {
  color: #8c3f66;
}
.profile-post-feed-item .feed-scene-entry-button:active {
  transform: translateX(1px);
}
.profile-post-feed-item .feed-scene-entry-icon {
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}
.profile-post-modal-caption .feed-caption-author {
  color: #171417;
  font-weight: 900;
  text-decoration: none;
}
.profile-post-modal-caption {
  margin: 0;
  color: #2f282d;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
  white-space: pre-line;
}
.profile-post-modal-more {
  display: flex;
  justify-content: center;
  padding: 14px;
  background: #ffffff;
}
.profile-post-modal-more[hidden] {
  display: none;
}
.app-info-footer {
    box-sizing: border-box;
    width: min(100%, 450px);
    margin: 0 auto;
    padding: 28px 16px calc(env(safe-area-inset-bottom, 0px) + 30px);
    background: #ffffff;
    color: var(--text-primary);
    border-top: 0;
    border-radius: 0 0 12px 12px;
    box-shadow: none;
}
.app-info-footer .welcome-description {
    width: 100%;
    margin: 30px 0 0;
    padding-top: 20px;
    color: var(--text-secondary);
    font-size: 0.72rem;
    line-height: 1.7;
    text-align: center;
}
.app-info-footer .welcome-description:first-child,
.app-info-footer :is(.other-tags-section, .related-tags-section, .all-tags-section)[hidden] + .welcome-description,
.app-info-footer :is(.other-tags-section, .related-tags-section, .all-tags-section):has(.tags-container:empty) + .welcome-description {
    margin-top: 0;
    padding-top: 0;
}
.app-info-footer .welcome-description h2 {
    margin: 0 0 10px;
}
.app-info-footer .welcome-description p {
    margin: 0;
}
.app-info-footer .welcome-description a {
    color: var(--text-primary);
    font-weight: 700;
    text-decoration: underline;
}
.app-info-footer .welcome-description a:hover {
    color: var(--primary-accent, var(--accent));
}
.app-info-footer :is(.other-tags-section, .related-tags-section, .all-tags-section) + :is(.other-tags-section, .related-tags-section, .all-tags-section) {
    margin-top: 30px;
}
.app-info-footer :is(.other-tags-section, .related-tags-section, .all-tags-section) {
    width: 100%;
}
.app-info-footer :is(.other-tags-section, .related-tags-section, .all-tags-section):has(.tags-container:empty) {
    display: none;
}
.app-info-footer :is(.other-tags-section, .related-tags-section, .all-tags-section) h2 {
    margin: 0 0 12px;
    color: var(--text-primary);
    font-size: 0.86rem;
    font-weight: 800;
    text-align: left;
}

.app-info-footer .tags-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 10px;
}
.app-info-footer .tag-link {
    padding: 6px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background-color: #f7f7f8;
    color: var(--text-primary);
    font-size: 0.8em;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}
.app-info-footer .tag-link:hover {
    background-color: #f7f7f8;
    border-color: #e5e7eb;
    color: var(--text-primary);
}
.app-info-footer .h1-logo-img {
  width: auto;
  height: 46px;
  max-width: 80%;
}
@media (max-width: 520px) {
  .app-info-footer {
    border-radius: 0;
  }
}
@media (max-width: 380px) {
  .profile-summary {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 13px;
  }
  .profile-avatar-ring {
    width: 82px;
    height: 82px;
  }
  .profile-stat strong {
    font-size: 0.9rem;
  }
  .profile-stat span {
    font-size: 0.66rem;
  }
}
