@charset "UTF-8";

:root {
  --bg-main: #f7f7f7;
  --bg-card: #ffffff;
  --text-main: #2b2b2b;
  --text-sub: #666666;
  --text-muted: #888888;
  --border-color: #e5e7eb;
  --accent-color: #8c959f;
  --radius-lg: 14px;
  --radius-md: 10px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/*スクロールバーしね*/
html, body {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* レイアウト全体 */
.layout-container {
  display: flex; max-width: 1280px; margin: 0 auto; padding: 24px; gap: 28px; min-height: 100vh;
}

/* 左サイドバー */
.sidebar {
  width: 280px; flex-shrink: 0; display: flex; flex-direction: column; gap: 16px;
}

.sidebar-card {
  background: var(--bg-card); border-radius: var(--radius-lg); padding: 24px 20px;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(0,0,0,0.03);
}

.sidebar-divider {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-color); text-align: left;
}

.sidebar-section-title {
  font-size: 0.78rem; font-weight: 700; color: var(--text-muted); letter-spacing: 0.05em; margin-bottom: 6px;
}

.filter-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.filter-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 8px; border-radius: 6px; font-size: 0.88rem; color: var(--text-sub);
  cursor: pointer; transition: background 0.15s, color 0.15s;
}
.filter-item:hover { background: var(--bg-main); color: var(--text-main); }
.filter-item.active { background: var(--bg-main); color: var(--text-main); font-weight: 600; }

.year-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 5px 8px; border-radius: 6px; font-size: 0.88rem; color: var(--text-sub);
  cursor: pointer; font-weight: 600; transition: background 0.15s;
}
.year-toggle:hover { background: var(--bg-main); color: var(--text-main); }

.month-list {
  list-style: none; display: none; flex-direction: column; gap: 2px;
  padding-left: 10px; margin: 2px 0 6px 0;
}
.year-group.open .month-list { display: flex; }

.profile-box { text-align: center; }

.profile-icon {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
  margin: 0 auto 12px auto; display: block; border: 1px solid var(--border-color); background: #eee;
  box-shadow: 0 2px 5px rgba(0,0,0,0.06);
}
.profile-icon-fallback {
  width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 12px auto;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-color); background: #eee; font-size: 1.8rem; font-weight: bold; color: #555;
  box-shadow: 0 2px 5px rgba(0,0,0,0.06);
}

.profile-name { font-size: 1.15rem; font-weight: 700; margin-top: 13px; margin-bottom: -4px; }

.profile-id { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 10px; }

/* メッセージを送るボタン */
.send-btn-link {
  display: block; width: 100%; background: #c4c9d0; color: #fff; text-align: center;
  padding: 10px; border-radius: 8px; font-weight: 600; font-size: 0.9rem; margin-top: 14px;
  transition: 0.2s;
}
.send-btn-link:hover { opacity: 0.85; }

.social-links {
  display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 12px;
}
.social-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; background: var(--bg-card);
  border: 1px solid var(--border-color); border-radius: 50%;
  font-size: 1rem; color: #767676; opacity: 0.55; transition: all 0.2s;
}
.social-btn:hover { background: #d4d4d8; color: var(--text-main); opacity: 1; transform: translateY(-2px); }

.qr-box {
  margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border-color); text-align: center;
}

.qr-thumb { 
  display: inline-block; 
  padding: 7px; 
  background: #fff; 
  border: 1px solid var(--border-color); 
  border-radius: 8px; 
  cursor: pointer; 
}
.qr-thumb img, .qr-thumb canvas { 
  display: block; 
  width: 94px; 
  height: 94px; 
  opacity: 0.55; 
}
.qr-thumb:hover img, .qr-thumb:hover canvas { 
  opacity: 1; 
}

.qr-label { display: block; font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }

/* 管理者ログインボタン */
.admin-toggle-btn {
  width: 100%;
  padding: 9px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.admin-toggle-btn:hover {
  background: var(--bg-card);
  color: var(--text-main);
}

/* タグ：枠なし・薄い文字に変更 */
.msg-tag {
  background: transparent; 
  color: var(--text-muted); 
  border: none; 
  padding: 0; 
  font-size: 0.85rem; 
  font-weight: normal;
}

.admin-toolbar {
  display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border-color);
}
.admin-reply-form { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.admin-reply-textarea {
  width: 100%; padding: 8px; border: 1px solid var(--border-color); border-radius: 8px; font-family: inherit; font-size: 0.88rem; outline: none; resize: vertical; min-height: 60px; background: #fff;
}
.admin-reply-textarea:focus { border-color: #8c959f; }
.btn-danger { background: #dc3545; color: #fff; border: none; padding: 4px 10px; border-radius: 6px; font-size: 0.78rem; font-weight: 600; cursor: pointer; }
.btn-danger:hover { opacity: 0.85; }
.btn-sm { background: #8c959f; color: #fff; border: none; padding: 4px 10px; border-radius: 6px; font-size: 0.78rem; font-weight: 600; cursor: pointer; }
.btn-sm:hover { opacity: 0.85; }

.pagination {
  display: flex; justify-content: center; align-items: center; gap: 6px; margin: 24px 0;
}
.pagination a, .pagination span {
  padding: 6px 12px; background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: 8px; font-size: 0.85rem; color: var(--text-sub); text-decoration: none;
}
.pagination a:hover { background: var(--border-color); color: var(--text-main); }
.pagination .current { background: #8c959f; color: #fff; border-color: #8c959f; font-weight: 600; }

.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.4);
  z-index: 1000; align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--bg-card); border-radius: var(--radius-lg); padding: 24px;
  width: 100%; max-width: 320px; box-shadow: var(--shadow-md); border: 1px solid rgba(0,0,0,0.05); text-align: left;
}
.modal-title { font-size: 1rem; font-weight: 700; margin-bottom: 14px; border-bottom: 1px solid var(--border-color); padding-bottom: 8px; }
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-sub); margin-bottom: 5px; }
.form-control {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border-color); border-radius: 8px; font-size: 0.9rem; outline: none; background: #fcfcfc;
}
.form-control:focus { border-color: #8c959f; }
.btn-primary { background: #8c959f; color: #fff; border: none; padding: 7px 14px; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 0.85rem; }
.btn-secondary { background: #adb5bd; color: #fff; border: none; padding: 7px 14px; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 0.85rem; }

.main-content { flex: 1; min-width: 0; }
.search-container input {
  width: 100%; padding: 9px 12px; box-sizing: border-box; border: 1px solid var(--border-color);
  border-radius: var(--radius-md); font-size: 0.88rem; background: #fff; box-shadow: var(--shadow-sm); outline: none;
}
.search-container input:focus { border-color: #8c959f; }

.card {
  background: var(--bg-card); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(0,0,0,0.03); position: relative;
}
.card.hidden { display: none; }

.memo-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 0.85rem; color: var(--text-muted);
}
.memo-meta { display: flex; align-items: center; gap: 8px; }

.reply-box {
  display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-color);
}
.reply-icon {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border-color); background: #eee;
}
.reply-content { font-size: 0.9rem; color: var(--text-main); line-height: 1.5; }

.like-btn {
  background: transparent; border: none; color: #888888; padding: 2px 6px;
  border-radius: 6px; font-size: 0.85rem; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; transition: color 0.2s;
}
.like-btn:hover { color: #e11d48; background: rgba(225, 29, 72, 0.05); }
.like-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.memo-content-view { line-height: 1.7; word-break: break-all; font-size: 0.95rem; }

@media (max-width: 768px) {
  .layout-container { flex-direction: column; padding: 16px; gap: 16px; }
  .sidebar { width: 100%; }
}