* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'MS Pゴシック', 'IPAMonaPGothic', 'Mona', sans-serif;
  font-size: 12px;
  line-height: 1.4;
  background: #f0f0f0;
  color: #000;
}

a {
  color: #00f;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
}

.header {
  background: #000;
  color: #fff;
  padding: 4px 8px;
  text-align: center;
}

.logo {
  font-size: 14px;
  font-weight: bold;
}

.nav {
  background: #eee;
  padding: 4px 8px;
  border-bottom: 1px solid #ccc;
}

.nav a {
  margin-right: 16px;
}

.board-list, .thread-list {
  padding: 8px;
}

.board-item, .thread-item {
  padding: 4px 0;
  border-bottom: 1px solid #ddd;
}

.board-item:last-child, .thread-item:last-child {
  border-bottom: none;
}

.board-title, .thread-title {
  font-size: 13px;
  margin-bottom: 2px;
}

.board-info, .thread-info {
  font-size: 11px;
  color: #666;
}

.momentum-indicator {
  font-weight: bold;
}

.momentum-very-hot {
  color: #ff0000;
}

.momentum-hot {
  color: #ff6600;
}

.momentum-warm {
  color: #ff9900;
}

.momentum-cold {
  color: #666;
}

.post-count {
  font-weight: bold;
}

.last-post-time {
  color: #999;
}

.post {
  padding: 8px;
  border-bottom: 1px solid #ddd;
}

.post:last-child {
  border-bottom: none;
}

.post-header {
  font-size: 11px;
  margin-bottom: 4px;
  color: #666;
}

.post-number {
  font-weight: bold;
}

.post-name {
  margin: 0 4px;
}

.post-id {
  margin-left: 8px;
}

.post-content {
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
}

.anchor {
  color: #00f;
}

.code-block {
  background: #f5f5f5;
  padding: 8px;
  margin: 4px 0;
  overflow-x: auto;
  font-family: monospace;
  font-size: 11px;
}

.form {
  padding: 8px;
  background: #f9f9f9;
}

.form input,
.form textarea {
  width: 100%;
  padding: 4px;
  border: 1px solid #ccc;
  font-family: inherit;
  font-size: 12px;
  margin-bottom: 8px;
}

.form textarea {
  min-height: 80px;
  resize: vertical;
}

.btn {
  padding: 4px 12px;
  background: #fff;
  border: 1px solid #ccc;
  cursor: pointer;
  font-size: 11px;
}

.btn:hover {
  background: #f0f0f0;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}

.loading {
  text-align: center;
  padding: 20px;
  color: #666;
}

.error {
  color: #f00;
  padding: 8px;
  background: #fee;
  border: 1px solid #fcc;
  margin: 8px;
}

.anchor-popup {
  position: fixed;
  background: #fff;
  border: 2px solid #00f;
  padding: 8px;
  max-width: 500px;
  max-height: 400px;
  overflow-y: auto;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  font-size: 12px;
  line-height: 1.4;
}

.anchor-popup .post {
  padding: 0;
  border: none;
}

.section-title {
  background: #000;
  color: #fff;
  padding: 4px 8px;
  font-weight: bold;
  margin-top: 8px;
}

.favorites-section {
  margin-bottom: 16px;
}

.favorite-item {
  padding: 8px;
  border-bottom: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
}

.favorite-item:hover {
  background: #f9f9f9;
}

.favorite-link {
  flex: 1;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.favorite-star {
  color: #ffa500;
  font-size: 16px;
}

.favorite-title {
  color: #000;
  font-size: 12px;
  flex: 1;
}

.favorite-board {
  color: #666;
  font-size: 11px;
}

.btn-remove-favorite {
  background: none;
  border: none;
  color: #999;
  font-size: 20px;
  cursor: pointer;
  padding: 0 8px;
}

.btn-remove-favorite:hover {
  color: #f00;
}

.image-upload-section {
  margin: 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.image-btn {
  padding: 4px 12px;
  background: #fff;
  border: 1px solid #ccc;
  cursor: pointer;
  font-size: 11px;
}

.image-btn:hover {
  background: #f0f0f0;
}

.image-hint {
  font-size: 10px;
  color: #666;
}

.image-previews {
  margin: 8px 0;
}

.image-preview-item {
  position: relative;
  display: inline-block;
  margin: 4px;
}

.post-image {
  max-width: 100%;
  height: auto;
  margin: 8px 0;
  border: 1px solid #ddd;
}

.tex-helper {
  margin: 8px 0;
}

.tex-btn {
  padding: 4px 12px;
  background: #fff;
  border: 1px solid #ccc;
  cursor: pointer;
  font-size: 11px;
}

.tex-btn:hover {
  background: #f0f0f0;
}
