:root {
  --bg: #fff;
  --card: #fff;
  --text: #333;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont,
    "Hiragino Kaku Gothic ProN", "Meiryo", "Noto Sans JP", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* ヘッダー */
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #ddd;
  padding: 10px 20px;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-item {
  font-size: 14px;
  color: #333;
  cursor: pointer;
}

.logo {
  height: 32px;
}

.beta-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
  color: #666;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* 上部 */
.container {
  max-width: 1100px;
  margin: 90px auto 30px;
  padding: 0 20px;
}

.site-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}

.site-desc {
  font-size: 15px;
  margin-bottom: 12px;
}

.top-image {
  height: 220px;
  border-radius: 10px;
  background: url("/assets/images/top.png") center/cover no-repeat;
  margin-bottom: 10px;
}

/* タブ */
.tab-menu {
  margin: 0 20px 20px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #ccc;
  padding: 8px 0;
}

.tab-left span {
  margin-right: 20px;
  font-size: 15px;
  color: #444;
  cursor: pointer;
}

.tab-search {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tab-search input {
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  width: 200px;
}

.search-btn {
  background: none;
  border: none;
  cursor: pointer;
}

.search-note {
  font-size: 11px;
  color: #999;
}

/* レイアウト */
.layout {
  margin: 0 20px;
  display: flex;
  gap: 20px;
}

aside {
  width: 260px;
}

main {
  flex: 1;
}

/* サイドバー */
.profile,
.ad-box {
  background: var(--card);
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.06);
  padding: 16px;
  margin-bottom: 20px;
}

.avatar img {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

.profile-name {
  margin: 12px 0 6px;
  text-align: center;
}

.profile-text {
  text-align: center;
}

.profile hr {
  margin: 12px 0;
  border: none;
  border-top: 1px solid #eee;
}

.profile-info {
  font-size: 13px;
  color: #666;
}

.ad-box img {
  width: 100%;
  border-radius: 8px;
}

/* 記事 */
.post {
  background: var(--card);
  padding: 16px;
  border-radius: 10px;
  margin-bottom: 16px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.post-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.post-line {
  border: none;
  border-top: 1px solid #ddd;
  margin-bottom: 10px;
}

.post-date {
  font-size: 12px;
  color: #777;
  margin-bottom: 12px;
}

.post-sign {
  text-align: right;
  margin-top: 12px;
  color: #666;
}

.post-footer {
  text-align: right;
  font-size: 12px;
  color: #666;
}

/* ===== 記事内の画像（右寄せ・修正版） ===== */
.post-images {
  text-align: right;
}

.post-images img {
  display: block;
  width: 400px;
  height: auto;
  margin: 12px auto 8px 0;
}

/* フッター */
.footer {
  margin-top: 40px;
  padding: 20px 0;
  font-size: 13px;
  color: #666;
  text-align: center;
}

.copyright {
  text-align: right;
  padding-right: 20px;
}

/* ===== 検索オーバーレイ ===== */
#searchOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  z-index: 2000;
  pointer-events: none;
}

#searchOverlay.active {
  display: flex;
  pointer-events: auto;
}

.search-card {
  background: #000;
  color: #0f0;
  width: 90%;
  max-width: 600px;
  height: 70%;
  margin: 5% auto;
  padding: 16px;
  font-family: Consolas, "Courier New", monospace;
  position: relative;
}

#closeBtn {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: #0f0;
  font-size: 20px;
  cursor: pointer;
}

.search-console {
  margin-top: 32px;
  height: calc(100% - 32px);
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.5;
}

/* レスポンシブ */
@media (max-width: 800px) {
  .layout {
    flex-direction: column;
  }

  aside {
    width: 100%;
  }

  .tab-menu {
    flex-direction: column;
    gap: 10px;
  }

  .tab-search input {
    width: 100%;
  }

  /* スマホでは画像を中央寄せに戻す */
  .post-images img {
    margin: 12px auto;
    width: 100%;
    max-width: 400px;
  }
}
