/* X風SNS ライトモード */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #e0e7eb;
  color: #0f1419;
  -webkit-font-smoothing: antialiased;
}

.x-app {
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  border-left: 1px solid #eff3f4;
  border-right: 1px solid #eff3f4;
  min-height: 100vh;
}

/* --- ヘッダー --- */
.x-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #eff3f4;
}

.x-header-inner {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.x-logo {
  font-size: 1.5rem;
  color: #0f1419;
}

.x-logo-img {
  height: 28px;
  width: auto;
}

.x-search {
  flex: 1;
}

.x-search input {
  width: 100%;
  background: #eff3f4;
  border: 1px solid #eff3f4;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 0.85rem;
  font-family: inherit;
  color: #0f1419;
  outline: none;
}

.x-search input:focus {
  border-color: #1d9bf0;
  background: #fff;
}

.x-search input::placeholder {
  color: #536471;
}

.x-search-msg {
  display: none;
  font-size: 0.75rem;
  color: #536471;
  padding: 4px 16px 8px;
}

/* --- プロフィール --- */
.x-banner {
  height: 140px;
  background: #cfd9de;
}

.x-profile-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0 16px;
  margin-top: -40px;
}

.x-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #fff;
}

.x-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.x-follow-btn {
  margin-top: 48px;
  background: #0f1419;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 8px 20px;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: inherit;
}

.x-profile-info {
  padding: 12px 16px;
}

.x-display-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f1419;
}

.x-handle {
  color: #536471;
  font-size: 0.9rem;
}

.x-bio {
  margin-top: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #0f1419;
}

.x-profile-meta {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: #536471;
}

.x-profile-stats {
  margin-top: 12px;
  display: flex;
  gap: 20px;
  font-size: 0.85rem;
  color: #536471;
}

.x-profile-stats strong {
  color: #0f1419;
}

/* --- タブ --- */
.x-tabs {
  display: flex;
  border-bottom: 1px solid #eff3f4;
}

.x-tab {
  flex: 1;
  text-align: center;
  padding: 14px 0;
  font-size: 0.875rem;
  color: #536471;
  position: relative;
}

.x-tab.active {
  color: #0f1419;
  font-weight: 700;
}

.x-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 4px;
  background: #1d9bf0;
  border-radius: 2px;
}

/* --- タイムライン --- */
.x-timeline {
  border-bottom: 1px solid #eff3f4;
}

.x-post {
  border-bottom: 1px solid #eff3f4;
  padding: 12px 16px;
  transition: background 0.15s;
}

.x-post:hover {
  background: #f7f9f9;
}

.x-post-pinned-label {
  font-size: 0.75rem;
  color: #536471;
  margin-bottom: 4px;
  padding-left: 52px;
}

.x-post-inner {
  display: flex;
  gap: 12px;
}

.x-post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.x-post-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.x-post-content {
  flex: 1;
  min-width: 0;
}

.x-post-header {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
}

.x-post-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #0f1419;
}

.x-post-handle {
  color: #536471;
  font-size: 0.85rem;
}

.x-post-time {
  color: #536471;
  font-size: 0.85rem;
}


.x-post-text {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 8px;
  color: #0f1419;
}

.x-post-actions {
  display: flex;
  gap: 40px;
  font-size: 0.8rem;
  color: #536471;
}

/* --- ハッシュタグの色 --- */
.x-post-text a.x-hashtag {
  color: #1d9bf0;
  text-decoration: none;
}

/* --- 認証バッジ --- */
.x-verified {
  color: #1d9bf0;
  font-size: 0.85rem;
}

/* --- DMスクショ --- */
.x-dm-screenshot {
  border: 1px solid #eff3f4;
  border-radius: 12px;
  margin-top: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}

.x-dm-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #eff3f4;
  background: #f8f9fa;
}

.x-dm-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: #0f1419;
  display: block;
}

.x-dm-handle {
  font-size: 0.7rem;
  color: #536471;
}

.x-dm-body {
  padding: 12px;
}

.x-dm-body p {
  font-size: 0.8rem;
  color: #0f1419;
  line-height: 1.6;
  margin-bottom: 8px;
}

.x-dm-body p:last-child {
  margin-bottom: 0;
}

.x-post-img,
.x-dm-img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #eff3f4;
  margin-top: 8px;
  margin-bottom: 8px;
}

/* --- 引用ポスト --- */
.x-quote-post {
  border: 1px solid #eff3f4;
  border-radius: 12px;
  padding: 12px;
  margin-top: 8px;
  margin-bottom: 8px;
}

.x-quote-header {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}

.x-quote-header .x-post-name {
  font-size: 0.8rem;
}

.x-quote-header .x-post-handle {
  font-size: 0.8rem;
}

.x-quote-text {
  font-size: 0.8rem;
  color: #0f1419;
  line-height: 1.4;
}

/* --- アバタープレースホルダー --- */
.x-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

/* --- ハッシュタグヘッダー --- */
.x-hashtag-header {
  padding: 16px;
  border-bottom: 1px solid #eff3f4;
}

.x-hashtag-header h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f1419;
}

.x-hashtag-header p {
  font-size: 0.8rem;
  color: #536471;
  margin-top: 2px;
}

/* --- フッター --- */
.x-footer {
  text-align: center;
  padding: 24px 16px;
  font-size: 0.7rem;
  color: #aaa;
}

/* --- レスポンシブ --- */
@media (max-width: 600px) {
  .x-app {
    border: none;
  }

  .x-header-inner {
    padding: 8px 12px;
    gap: 8px;
  }

  .x-logo {
    font-size: 1.2rem;
  }

  .x-search input {
    font-size: 0.8rem;
    padding: 6px 10px;
  }

  .x-banner {
    height: 100px;
  }

  .x-avatar {
    width: 64px;
    height: 64px;
  }

  .x-profile-main {
    margin-top: -32px;
  }

  .x-profile-info {
    padding: 8px 12px;
  }

  .x-display-name {
    font-size: 1.1rem;
  }

  .x-profile-meta {
    flex-direction: column;
    gap: 4px;
  }

  .x-follow-btn {
    margin-top: 40px;
    padding: 6px 16px;
    font-size: 0.8rem;
  }

  .x-tabs {
    overflow-x: auto;
  }

  .x-tab {
    font-size: 0.8rem;
    padding: 10px 0;
    white-space: nowrap;
  }

  .x-post {
    padding: 10px 12px;
  }

  .x-post-avatar {
    width: 36px;
    height: 36px;
  }

  .x-post-header {
    flex-wrap: wrap;
    gap: 2px;
  }

  .x-post-name {
    font-size: 0.85rem;
  }

  .x-post-handle {
    font-size: 0.8rem;
  }

  .x-post-time {
    font-size: 0.8rem;
  }

  .x-post-text {
    font-size: 0.85rem;
  }

  .x-post-actions {
    gap: 24px;
    font-size: 0.75rem;
  }

  .x-post-img,
  .x-dm-img {
    border-radius: 8px;
  }

  .x-dm-body p {
    font-size: 0.75rem;
  }

  .x-quote-post {
    padding: 8px;
  }

  .x-quote-text {
    font-size: 0.75rem;
  }

  .x-hashtag-header {
    padding: 12px;
  }

  .x-hashtag-header h1 {
    font-size: 1.1rem;
  }

  .x-avatar-placeholder {
    width: 36px;
    height: 36px;
    font-size: 0.75rem;
  }

  .x-footer {
    font-size: 0.6rem;
  }
}
