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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #f5f5f5;
  color: #222;
  line-height: 1.5;
}

header {
  background: #fff;
  border-bottom: 1px solid #ddd;
  padding: 16px 20px;
  position: sticky;
  top: 0;
  z-index: 10;
  text-align: center;
}

header h1 {
  font-size: 20px;
}

.subtitle {
  color: #888;
  font-size: 13px;
  margin-top: 2px;
}

button {
  background: #1d9bf0;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 8px 24px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
}

button:hover {
  background: #1a8cd8;
}

button:disabled {
  background: #93ccf0;
  cursor: default;
}

/* Timeline */
main {
  max-width: 640px;
  margin: 0 auto;
  padding: 12px 16px;
}

.post {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.post-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.post-meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.post-avatar {
  font-size: 18px;
}

.persona-name {
  font-size: 15px;
  font-weight: bold;
}

.persona-name { color: #1f2937; }

time {
  font-size: 12px;
  color: #999;
  white-space: nowrap;
}

.post-body {
  font-size: 15px;
  line-height: 1.6;
  word-break: break-word;
  white-space: pre-wrap;
}

.post-source {
  margin-top: 6px;
  font-size: 12px;
  color: #999;
}

.post-source a {
  color: #999;
  text-decoration: none;
  border-bottom: 1px dotted #ccc;
}

.post-source a:hover {
  color: #666;
  border-bottom-color: #999;
}

.link-card {
  margin-top: 10px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

.link-card-anchor {
  display: flex;
  text-decoration: none;
  color: inherit;
}

.link-card-img {
  width: 120px;
  min-height: 80px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f0f0f0;
}

.link-card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  min-width: 0;
}

.link-card-title {
  font-size: 13px;
  font-weight: bold;
  color: #1f2937;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.link-card-desc {
  font-size: 12px;
  color: #666;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.link-card-site {
  font-size: 11px;
  color: #999;
}

.link-card:hover {
  border-color: #ccc;
  background: #fafafa;
}

.post-reply {
  border-left: 3px solid #1d9bf0;
}

.reply-label {
  display: block;
  font-size: 12px;
  color: #1d9bf0;
  margin-bottom: 4px;
}

footer {
  text-align: center;
  padding: 16px;
}

.empty-msg {
  text-align: center;
  color: #999;
  padding: 40px 16px;
  font-size: 15px;
}

/* Tab bar */
.tab-bar {
  display: flex;
  justify-content: center;
  gap: 0;
  max-width: 640px;
  margin: 0 auto;
  padding: 8px 16px 0;
}

.tab {
  flex: 1;
  background: #fff;
  color: #666;
  border: 1px solid #e0e0e0;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.tab.active {
  background: #1d9bf0;
  color: #fff;
  border-color: #1d9bf0;
}

.tab:hover:not(.active) {
  background: #f0f0f0;
}

/* Read articles */
#read-articles {
  max-width: 640px;
  margin: 0 auto;
  padding: 12px 16px;
}

.read-article-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 8px;
}

.read-article-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
}

.read-article-header time {
  margin-left: auto;
}

.read-article-title {
  display: block;
  font-size: 14px;
  font-weight: bold;
  color: #1d9bf0;
  text-decoration: none;
  margin-bottom: 4px;
}

.read-article-title:hover {
  text-decoration: underline;
}

.read-article-site {
  display: block;
  font-size: 12px;
  color: #999;
}

.read-article-growth {
  display: block;
  font-size: 12px;
  color: #e67e22;
  margin-top: 4px;
}

@media (max-width: 480px) {
  main {
    padding: 8px;
  }
  .composer {
    padding: 0 8px;
  }
  .post {
    border-radius: 8px;
    padding: 12px;
  }
}

