@charset "UTF-8";

:root {
  --bg-main: #1a1c23;
  --bg-card: #f1f5f9;
  --text-main: #334155;
  --text-sub: #475569;
  --text-muted: #64748b;
  --border-color: rgba(51, 65, 85, 0.15);
  --accent-color: #3b82f6;
  --accent-hover: #2563eb;
  --radius-lg: 14px;
  --radius-md: 10px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
}

* {
  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: #1a1c23;
  background-image: url('../files/wall.png'); 
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  color: #f8fafc;
  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;
}

/* 左右2カラムの全体レイアウト */
.layout-container {
  display: flex;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
  gap: 28px;
  min-height: 100vh;
  align-items: flex-start;
}

/* コンテナ（send.php等の単体ページ用） */
.container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 0; /* ← 上下に余白を持たせるように修正 */
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 【完全独立】send.php専用のダークトーンカード */
.send-card {
  width: 100%;
  background-color: #334155;
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin-bottom: 16px;
  color: #f8fafc;
}

/* 左サイドバー */
.sidebar {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-card {
  background: #334155;
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0, 0, 0, 0.2);
  color: #f8fafc;
}

.sidebar-divider {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: left;
}

.sidebar-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #cbd5e1 !important;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.filter-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.filter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.88rem;
  color: #cbd5e1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.filter-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.filter-item.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-weight: 600;
}

.year-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.88rem;
  color: #cbd5e1;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s;
}

.year-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.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, .profile-section .avatar {
  width: 84px !important;
  height: 84px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  margin: 0 auto 17px auto !important;
  display: block !important;
  border: none !important;
  background: transparent !important;
}

.profile-name {
  font-size: 1.15rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  margin-top: 0 !important;
  margin-bottom: 2px !important;
  color: #ffffff !important;
}

.profile-id {
  font-size: 0.8rem !important;
  line-height: 1.2 !important;
  margin-bottom: 10px !important;
  color: #cbd5e1 !important;
}

.send-btn-link {
  display: block;
  width: 100%;
  background: #f1f5f9;
  color: #334155;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 14px;
  transition: background 0.2s, transform 0.15s, color 0.2s;
  border: none;
}

.send-btn-link:hover {
  background: #ffffff;
  color: #0f172a;
  transform: translateY(-1px);
}

.social-links {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  font-size: 1rem;
  color: #334155;
  transition: all 0.2s;
}

.social-btn:hover {
  background: #ffffff;
  color: #0f172a;
  transform: translateY(-2px);
}

.qr-box {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
}

.qr-thumb {
  display: inline-block;
  padding: 7px;
  background: #8B99AD;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  overflow: hidden;
}

.qr-thumb canvas,
.qr-thumb img {
  display: block;
  border-radius: 0px;
  mix-blend-mode: multiply;
  opacity: 0.55; /* QRコードを薄くする */
  transition: opacity 0.2s;
}

.qr-thumb:hover {
  background: #fff;
}
.qr-thumb:hover img {
  opacity: 1;
}

.qr-label {
  display: block;
  font-size: 0.72rem;
  color: #ADB9C6;
  margin-top: 4px;
}

/* フォーム関連 */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.form-input, .form-textarea, .form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(51, 65, 85, 0.2);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: #f1f5f9;
  color: #334155;
  transition: border-color 0.2s, background 0.2s;
}

.form-textarea {
  height: 120px;
  resize: vertical;
}

.form-input:focus, .form-textarea:focus, .form-control:focus {
  border-color: var(--accent-color);
  background: #ffffff;
}

.tag-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.preset-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  color: #cbd5e1;
  transition: all 0.2s;
}

.preset-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.preset-btn.selected {
  background: rgba(59, 130, 246, 0.25);
  border-color: var(--accent-color);
  color: #ffffff;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.stamp-presets {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  margin-top: 8px;
  justify-content: space-between;
}

.stamp-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 0;
  flex: 1;
  text-align: center;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  color: #ffffff;
}

.stamp-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.stamp-btn.selected {
  background: rgba(59, 130, 246, 0.25);
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.submit-btn {
  width: 100%;
  background: #f1f5f9;
  color: #334155;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, color 0.2s;
  margin-top: 8px;
}

.submit-btn:hover {
  background: #ffffff;
  color: #0f172a;
  transform: translateY(-1px);
}

.back-btn-box {
  width: 100%;
  background: #334155;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  text-decoration: none;
  color: #cbd5e1;
  font-weight: 600;
  font-size: 14px;
  display: block;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.back-btn-box:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.error-msg {
  background: rgba(220, 53, 69, 0.2);
  color: #fca5a5;
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid rgba(220, 53, 69, 0.4);
  line-height: 1.5;
}

.hp-field {
  display: none !important;
}

.admin-toggle-btn {
  width: 100%;
  padding: 10px 14px;
  background: #2b384a;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  font-size: 0.82rem;
  color: #7b8c9d;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}

.admin-toggle-btn:hover {
  background: #334155;
  color: #cbd5e1;
}

.msg-tag {
  background: transparent;
  color: var(--text-sub);
  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 rgba(51, 65, 85, 0.15);
}

.admin-reply-form {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-reply-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(51, 65, 85, 0.2);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  resize: vertical;
  min-height: 60px;
  background: #f1f5f9;
  color: #334155;
}

.admin-reply-textarea:focus {
  border-color: var(--accent-color);
  background: #ffffff;
}

.btn-danger {
  background: #dc3545;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-danger:hover {
  opacity: 0.85;
}

.btn-sm {
  background: var(--accent-color);
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-sm:hover {
  background: var(--accent-hover);
}

.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: none;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-sub);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s, color 0.2s;
}

.pagination a:hover {
  background: #ffffff;
  color: #0f172a;
}

.pagination .current {
  background: var(--accent-color);
  color: #fff;
  font-weight: 600;
}

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(2px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: #1e293b;
  color: #f8fafc;
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 10px;
}

.main-content {
  flex: 1;
  min-width: 0;
}

.search-container {
  margin-bottom: 0;
}

.search-container input {
  width: 100%;
  padding: 10px 14px;
  box-sizing: border-box;
  border: 1px solid rgba(51, 65, 85, 0.2);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  background: #f1f5f9;
  color: #334155;
  box-shadow: var(--shadow-sm);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.search-container input:focus {
  border-color: var(--accent-color);
  background: #ffffff;
}

/* index.php側のメインカード（明るい背景 #f1f5f9） */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  border: none;
  position: relative;
  color: var(--text-main);
}

.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;
}

.permalink-date {
  color: var(--text-sub);
  text-decoration: none;
  font-weight: bold;
}

.permalink-date:hover {
  color: #0f172a;
}

.unreplied-badge {
  background: #fef08a;
  color: #856404;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
}

.reply-box {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(51, 65, 85, 0.15);
}

.post-body-box {
  margin-top: 8px;
  border-top: none;
  padding-top: 0;
}

.reply-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #0f172a;
}

.reply-content {
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.5;
}

.post-content-inner {
  width: 100%;
}

.post-stamp {
  font-size: 1.2rem;
  vertical-align: middle;
  margin-right: 6px;
}

.reply-content-inner {
  width: 100%;
}

.reply-text-space {
  margin-bottom: 6px;
}

.reply-attached-img {
  max-width: 100%;
  max-height: 300px;
  border: none;
  border-radius: 4px;
  display: block;
}

.like-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s, background 0.2s;
}

.like-btn:hover {
  color: #e11d48;
  background: rgba(225, 29, 72, 0.08);
}

.like-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.memo-content-view {
  line-height: 1.7;
  word-break: break-all;
  font-size: 0.95rem;
  display: inline;
}

.works-grid {
  column-count: 3;
  column-gap: 16px;
}

.work-thumb-wrap {
  display: block;
  width: 100%;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: none;
  overflow: hidden;
  margin-bottom: 16px;
  break-inside: avoid;
  transition: transform 0.2s, box-shadow 0.2s;
}

.work-thumb-wrap:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.work-thumb {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.drop-zone-area {
  border: 2px dashed rgba(51, 65, 85, 0.25);
  border-radius: 8px;
  padding: 12px;
  background: rgba(241, 245, 249, 0.8);
  margin-top: 12px;
  transition: 0.2s;
}

.admin-preview-wrapper {
  margin-bottom: 8px;
}

.admin-preview-inner {
  position: relative;
  display: inline-block;
}

.admin-preview-img {
  max-height: 100px;
  border-radius: 6px;
  border: 1px solid rgba(51, 65, 85, 0.2);
}

.admin-preview-remove-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  background: #dc3545;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-drop-instruction {
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
}

.file-input-hidden {
  display: none;
}

.admin-action-btns {
  display: flex;
  gap: 8px;
  align-items: center;
}

.modal-box-center {
  text-align: center;
  max-width: 320px;
}

.qr-large-wrapper {
  margin-bottom: 16px;
}

.qr-large-box {
  display: inline-block;
  padding: 12px;
  background: #fff;
  border: 1px solid rgba(51, 65, 85, 0.2);
  border-radius: 12px;
}

.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.btn-primary {
  background: var(--accent-color);
  color: #fff;
  border: none;
  padding: 9px 16px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: #475569;
  color: #f8fafc;
  border: none;
  padding: 9px 16px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: #64748b;
}

@media (max-width: 1024px) {
  .works-grid { column-count: 2; }
}

@media (max-width: 640px) {
  .works-grid { column-count: 1; }
}

@media (max-width: 768px) {
  .layout-container {
    flex-direction: column;
    padding: 16px;
    gap: 16px;
  }
  .sidebar {
    width: 100%;
  }
}