@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --color-mauve:       #9C6B7A;
  --color-mauve-light: #c49aaa;
  --color-mauve-dark:  #7a4e5e;
  --color-mint:        #7abfa8;
  --color-bg:          #fbf9f1;
  --color-bg-card:     #ffffff;
  --color-text:        #3d2e34;
  --color-text-sub:    #8a7580;
  --color-border:      #ede8e3;
  --grad-primary: linear-gradient(135deg, #c49aaa 0%, #7abfa8 100%);
  --shadow-sm:  0 1px 4px rgba(156,107,122,.08);
  --shadow-md:  0 4px 16px rgba(156,107,122,.12);
  --shadow-lg:  0 8px 32px rgba(156,107,122,.18);
  --header-h:   64px;
  --footer-h:   72px;
  --radius-sm:  8px;
  --radius-md:  16px;
  --radius-lg:  24px;
  --radius-full: 9999px;
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--header-h);
  padding-bottom: var(--footer-h);
}

a { color: inherit; text-decoration: none; }

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1;
}

/* HEADER */
.feelog-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(251,249,241,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}
.header-inner {
  max-width: 960px;
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-mauve);
}
.logo-mark {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.header-user { position: relative; }
.user-icon-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-full);
  transition: background .2s;
}
.user-icon-btn:hover { background: rgba(156,107,122,.08); }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 1px solid var(--color-mauve-light); }
.user-avatar-icon { font-size: 36px; color: var(--color-mauve); }
.chevron-icon { font-size: 20px; color: var(--color-text-sub); transition: transform .25s; }
.user-icon-btn[aria-expanded="true"] .chevron-icon { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 12px 0;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.dropdown-menu--open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.dropdown-user-info { display: flex; align-items: center; gap: 10px; padding: 8px 16px 12px; }
.dropdown-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.dropdown-avatar-icon { font-size: 32px; color: var(--color-mauve); }
.dropdown-username { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown-divider { border: none; border-top: 1px solid var(--color-border); margin: 4px 0; }
.dropdown-list { list-style: none; }
.dropdown-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-size: .9rem; font-weight: 500; color: var(--color-text); transition: background .15s; }
.dropdown-item:hover { background: rgba(156,107,122,.06); }
.dropdown-item .material-symbols-outlined { font-size: 20px; color: var(--color-mauve); }
.dropdown-item--danger { color: #c0392b; }
.dropdown-item--danger .material-symbols-outlined { color: #c0392b; }

.header-auth { display: flex; align-items: center; gap: 12px; }
.btn-text { font-size: .9rem; font-weight: 600; color: var(--color-mauve); padding: 6px 12px; border-radius: var(--radius-full); transition: background .2s; }
.btn-text:hover { background: rgba(156,107,122,.08); }
.btn-primary-sm { font-size: .9rem; font-weight: 600; color: #fff; background: var(--grad-primary); padding: 8px 18px; border-radius: var(--radius-full); transition: box-shadow .2s; }
.btn-primary-sm:hover { box-shadow: 0 4px 12px rgba(156,107,122,.35); }

/* FOOTER */
.feelog-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--footer-h);
  background: rgba(251,249,241,.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--color-border);
  z-index: 100;
}
.footer-nav {
  max-width: 640px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
}
.footer-nav-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 12px; border-radius: var(--radius-md); color: var(--color-text-sub); transition: color .2s, background .2s; flex: 1; }
.footer-nav-item:hover { color: var(--color-mauve); background: rgba(156,107,122,.06); }
.footer-nav-item--active { color: var(--color-mauve); }
.footer-nav-item--active .footer-nav-icon { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.footer-nav-icon { font-size: 24px; }
.footer-nav-label { font-size: .65rem; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.footer-nav-item--create { color: var(--color-mauve); flex: 1.2; }
.create-btn-circle { width: 48px; height: 48px; border-radius: 50%; background: var(--grad-primary); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(156,107,122,.4); transition: transform .2s, box-shadow .2s; }
.footer-nav-item--create:hover .create-btn-circle { transform: scale(1.08); box-shadow: 0 6px 18px rgba(156,107,122,.5); }
.create-btn-circle .material-symbols-outlined { font-size: 26px; color: #fff; }

.feelog-footer-static { background: var(--color-bg); border-top: 1px solid var(--color-border); padding: 24px 20px; }
.footer-static-inner { max-width: 960px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.footer-static-logo { font-weight: 700; color: var(--color-mauve); }
.footer-static-links { display: flex; gap: 20px; }
.footer-static-link { font-size: .85rem; color: var(--color-text-sub); transition: color .2s; }
.footer-static-link:hover { color: var(--color-mauve); }
.footer-static-copy { font-size: .8rem; color: var(--color-text-sub); }

/* MYPAGE */
.mypage-wrapper { max-width: 960px; margin: 0 auto; padding: 32px 20px 24px; display: flex; flex-direction: column; gap: 32px; }

.mypage-profile { background: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); }
.profile-inner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.profile-avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 1px solid var(--color-mauve-light); }
.profile-avatar-icon { font-size: 72px; color: var(--color-mauve-light); }
.profile-info { flex: 1; min-width: 0; }
.profile-name { font-size: 1.3rem; font-weight: 700; margin-bottom: 2px; }
.profile-email { font-size: .85rem; color: var(--color-text-sub); }
.btn-edit-profile { display: flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--color-mauve); border: 1.5px solid var(--color-mauve-light); border-radius: var(--radius-full); padding: 8px 16px; transition: background .2s; white-space: nowrap; }
.btn-edit-profile:hover { background: rgba(156,107,122,.06); }
.btn-edit-profile .material-symbols-outlined { font-size: 18px; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat-card { background: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 20px 16px; text-align: center; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon { font-size: 28px; color: var(--color-mauve-light); margin-bottom: 8px; }
.stat-value { font-size: 1.8rem; font-weight: 700; color: var(--color-mauve); line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: .78rem; color: var(--color-text-sub); font-weight: 500; }

.section-title { display: flex; align-items: center; gap: 8px; font-size: 1rem; font-weight: 700; margin-bottom: 14px; }
.section-title .material-symbols-outlined { font-size: 22px; color: var(--color-mauve); }
.emotion-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.emotion-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: var(--radius-full); padding: 6px 14px; font-size: .85rem; font-weight: 500; }
.emotion-chip-count { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--grad-primary); color: #fff; font-size: .7rem; font-weight: 700; }

.posts-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.btn-new-post { display: flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; color: #fff; background: var(--grad-primary); border-radius: var(--radius-full); padding: 9px 18px; transition: box-shadow .2s; }
.btn-new-post:hover { box-shadow: 0 4px 14px rgba(156,107,122,.4); }
.btn-new-post .material-symbols-outlined { font-size: 18px; }

.posts-empty { text-align: center; padding: 60px 20px; background: var(--color-bg-card); border: 1.5px dashed var(--color-border); border-radius: var(--radius-lg); }
.posts-empty-icon { font-size: 56px; color: var(--color-mauve-light); margin-bottom: 12px; }
.posts-empty-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.posts-empty-sub { font-size: .875rem; color: var(--color-text-sub); margin-bottom: 24px; }
.btn-primary { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; font-weight: 600; color: #fff; background: var(--grad-primary); border-radius: var(--radius-full); padding: 12px 24px; transition: box-shadow .2s; }
.btn-primary:hover { box-shadow: 0 4px 14px rgba(156,107,122,.4); }

.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.post-card { display: block; background: var(--color-bg-card); border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; transition: transform .2s, box-shadow .2s; box-shadow: var(--shadow-sm); }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.post-card-thumb { position: relative; aspect-ratio: 4/3; background: var(--color-bg); overflow: hidden; }
.post-card-img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card:hover .post-card-img { transform: scale(1.04); }
.post-card-no-img { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #f0e8ec, #e4f0ec); }
.post-card-no-img .material-symbols-outlined { font-size: 40px; color: var(--color-mauve-light); }
.post-card-badge { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.post-card-badge--private { background: rgba(0,0,0,.45); }
.post-card-badge--private .material-symbols-outlined { font-size: 16px; color: #fff; }
.post-card-emotion { position: absolute; bottom: 8px; left: 8px; font-size: 1.2rem; background: rgba(255,255,255,.85); border-radius: 50%; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; }
.post-card-body { padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.post-card-title { font-size: .9rem; font-weight: 700; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.post-card-place, .post-card-date { display: flex; align-items: center; gap: 3px; font-size: .75rem; color: var(--color-text-sub); }
.post-card-place .material-symbols-outlined, .post-card-date .material-symbols-outlined { font-size: 14px; }

@media (max-width: 640px) {
  /* ── マイページ ── */
  .stats-grid { gap: 10px; }
  .stat-value { font-size: 1.4rem; }
  .stat-card { padding: 14px 10px; }

  /* 投稿グリッド：SP は 2列 */
  .posts-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* マイページ全体のパディング削減 */
  .mypage-wrapper { padding: 20px 14px 16px; gap: 20px; }

  /* プロフィール */
  .mypage-profile { padding: 16px; }
  .profile-inner { gap: 12px; flex-direction: column; align-items: flex-start; }
  .profile-avatar { width: 56px; height: 56px; }
  .profile-avatar-icon { font-size: 56px; }
  .profile-name { font-size: 1.1rem; }
  .btn-edit-profile { padding: 6px 12px; font-size: .8rem; }
  .btn-edit-profile--pc { display: none; }

  /* 感情チップ */
  .emotion-chips { gap: 6px; }
  .emotion-chip { font-size: .78rem; padding: 4px 10px; }
}

/* ════════════════════════════════════════════════
   POST FORM
════════════════════════════════════════════════ */
.post-form-wrapper {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 20px 24px;
}

.post-form-header {
  margin-bottom: 28px;
  text-align: center;
}

.post-form-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}

.post-form-subtitle {
  font-size: .875rem;
  color: var(--color-text-sub);
}

.form-errors {
  background: #fdecea;
  border: 1px solid #ef9a9a;
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 24px;
}

.form-errors-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #c62828;
  margin-bottom: 8px;
  font-size: .9rem;
}

.form-errors-title .material-symbols-outlined { font-size: 20px; }

.form-errors-list {
  list-style: none;
  padding-left: 8px;
}

.form-errors-list li {
  font-size: .875rem;
  color: #c62828;
  padding: 2px 0;
}

.form-errors-list li::before { content: "・"; }

.form-group { margin-bottom: 24px; }

.form-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.form-label .material-symbols-outlined {
  font-size: 18px;
  color: var(--color-mauve);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: .9rem;
  color: var(--color-text);
  background: var(--color-bg-card);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--color-mauve-light);
  box-shadow: 0 0 0 3px rgba(156,107,122,.1);
}

.form-input--error { border-color: #ef5350; }

.form-error-msg {
  font-size: .8rem;
  color: #c62828;
  margin-top: 4px;
}

.form-textarea { resize: vertical; line-height: 1.6; }

.image-upload-area {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--color-bg);
}

.image-upload-area:hover {
  border-color: var(--color-mauve-light);
  background: rgba(156,107,122,.04);
}

.image-upload-icon {
  font-size: 40px;
  color: var(--color-mauve-light);
}

.image-upload-text {
  font-size: .875rem;
  color: var(--color-text-sub);
}

.image-upload-input { display: none; }

.image-preview-wrap {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.image-preview {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  display: block;
}

.image-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,.5);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}

.image-remove-btn:hover { background: rgba(0,0,0,.7); }

.image-remove-btn .material-symbols-outlined {
  font-size: 18px;
  color: #fff;
}

.emotion-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.emotion-radio-label { cursor: pointer; }

.emotion-radio-input { display: none; }

.emotion-radio-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-bg-card);
  font-size: .9rem;
  transition: border-color .2s, background .2s, box-shadow .2s;
}

.emotion-radio-btn i {
  font-size: 15px;
  color: var(--color-text-sub);
}

.emotion-radio-input:checked + .emotion-radio-btn i {
  color: var(--color-mauve);
}

.emotion-radio-name {
  font-size: .75rem;
  font-weight: 600;
  color: var(--color-text-sub);
}

.emotion-radio-input:checked + .emotion-radio-btn {
  border-color: var(--color-mauve);
  background: rgba(156,107,122,.06);
  box-shadow: 0 0 0 3px rgba(156,107,122,.12);
}

.emotion-radio-input:checked + .emotion-radio-btn .emotion-radio-name {
  color: var(--color-mauve);
}

.toggle-group { display: flex; flex-direction: column; gap: 6px; }

.toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.toggle-input { display: none; }

.toggle-switch {
  width: 48px;
  height: 26px;
  border-radius: var(--radius-full);
  background: var(--color-border);
  position: relative;
  transition: background .2s;
  flex-shrink: 0;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.toggle-input:checked + .toggle-switch {
  background: var(--grad-primary);
}

.toggle-input:checked + .toggle-switch::after {
  transform: translateX(22px);
}

.toggle-text {
  font-size: .9rem;
  font-weight: 600;
  color: var(--color-text);
}

.toggle-hint {
  font-size: .8rem;
  color: var(--color-text-sub);
  padding-left: 58px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.btn-cancel {
  display: flex;
  align-items: center;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: .9rem;
  font-weight: 600;
  color: var(--color-text-sub);
  border: 1.5px solid var(--color-border);
  transition: background .2s;
}

.btn-cancel:hover { background: var(--color-bg); }

.btn-submit {
  display: flex;
  align-items: center;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-size: .9rem;
  font-weight: 600;
  color: #fff;
  background: var(--grad-primary);
  border: none;
  cursor: pointer;
  transition: box-shadow .2s;
}

.btn-submit:hover { box-shadow: 0 4px 14px rgba(156,107,122,.4); }

/* ════════════════════════════════════════════════
   POST DETAIL
════════════════════════════════════════════════ */
.post-detail-wrapper {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

.post-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--color-text-sub);
  margin-bottom: 20px;
  transition: color .2s;
}

.post-detail-back:hover { color: var(--color-mauve); }

.post-detail-back .material-symbols-outlined { font-size: 18px; }

.post-detail-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.post-detail-image-wrap {
  width: 100%;
  max-height: 400px;
  overflow: hidden;
}

.post-detail-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-detail-image-placeholder {
  width: 100%;
  height: 200px;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-detail-image-placeholder .material-symbols-outlined {
  font-size: 48px;
  color: var(--color-border);
}

.post-detail-body {
  padding: 24px;
}

.post-detail-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 16px;
  line-height: 1.4;
}

.post-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.post-detail-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .875rem;
  color: var(--color-text-sub);
}

.post-detail-meta-item .material-symbols-outlined {
  font-size: 16px;
  color: var(--color-mauve-light);
}

.post-detail-emotions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.post-detail-emotion-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;      /* ← gap: 6px を追加（既存はgapなし） */
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(156,107,122,.08);
  border: 1.5px solid rgba(156,107,122,.2);
  font-size: .875rem;
  font-weight: 600;
  color: var(--color-mauve);
}

.post-detail-memo {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 16px;
}

.post-detail-memo-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--color-text-sub);
  margin-bottom: 8px;
}

.post-detail-memo-label .material-symbols-outlined { font-size: 16px; }

.post-detail-memo-text {
  font-size: .9rem;
  color: var(--color-text);
  line-height: 1.7;
  white-space: pre-wrap;
}

.post-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;  
  margin-bottom: 16px;
}

.btn-edit-post {
  display: inline-flex;
  align-items: center;
  justify-content: center; 
  gap: 6px;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: .875rem;
  font-weight: 600;
  color: var(--color-mauve);
  border: 1.5px solid var(--color-mauve-light);
  background: var(--color-bg-card);
  transition: background .2s, box-shadow .2s;
}

.btn-edit-post:hover {
  background: rgba(156,107,122,.06);
  box-shadow: var(--shadow-sm);
}

.btn-edit-post .material-symbols-outlined { font-size: 18px; }

.btn-delete-post {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: .875rem;
  font-weight: 600;
  color: var(--color-mauve);
  border: 1.5px solid var(--color-mauve-light);
  background: var(--color-bg-card);
  transition: background .2s, box-shadow .2s;
}

.btn-delete-post:hover {
  background: rgba(156, 107, 122, .06);
  box-shadow: var(--shadow-sm);
}

.btn-delete-post .material-symbols-outlined { font-size: 18px; }

/* ============================================
   パスワードリセット画面
   ============================================ */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-h) - var(--footer-h));
  padding: 2rem 1rem;
}

.auth-card {
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(24px);
  border-radius: 1rem;
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: 0 10px 40px rgba(125,84,79,0.07);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 480px;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-mauve);
  margin-bottom: 0.5rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.auth-subtitle {
  font-size: 0.9rem;
  color: var(--color-text-sub);
  line-height: 1.6;
}

.auth-links {
  text-align: center;
  margin-top: 1.5rem;
}

.auth-link {
  font-size: 0.875rem;
  color: var(--color-mauve);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-link:hover { opacity: 0.75; }

.btn-full { width: 70%; justify-content: center; margin: 0 auto; display: flex; }

.form-hint {
  font-size: 0.75rem;
  color: var(--color-text-sub);
  margin-bottom: 0.25rem;
}

.spam-notice {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-sub);
  margin-top: 1.5rem;
}

/* PUBLIC POSTS */
.post-card-author {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: .75rem;
  color: var(--color-mauve);
  font-weight: 600;
}
.post-card-author .material-symbols-outlined { font-size: 14px; }

.page-subtitle {
  font-size: .85rem;
  color: var(--color-text-sub);
  margin-top: 2px;
  padding-left: 30px;
}

/* ADMIN */
.post-detail-admin {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
}

.btn-hide {
  background-color: #e53e3e;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-hide:hover {
  background-color: #c53030;
}

.btn-unhide {
  background-color: #3182ce;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-unhide:hover {
  background-color: #2b6cb0;
}

/* =====================
   Guest Footer
   ===================== */
.guest-footer {
  text-align: center;
  padding: 20px 16px 32px;
  background-color: #fbf9f1;
  border-top: 1px solid #e8e0d5;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.guest-footer__inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.guest-footer__link {
  font-size: 13px;
  color: #9C6B7A;
  text-decoration: none;
}

.guest-footer__link:hover {
  text-decoration: underline;
}

.guest-footer__sep {
  color: #c4b5b5;
  font-size: 13px;
}

.guest-footer__copy {
  font-size: 11px;
  color: #b8a9a9;
  margin: 0;
}

/* ゲスト時はボトムナビなし → padding-bottom リセット */
.body--guest {
  padding-bottom: 0;
}

/* ════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════ */

/* ── SP 共通（〜 640px） ───────────────────── */
@media (max-width: 640px) {

  /* ヘッダー */
  .header-inner { padding: 0 14px; }
  .header-logo { font-size: 1.1rem; gap: 6px; }
  .header-auth { gap: 8px; }
  .btn-primary-sm { font-size: .78rem; padding: 6px 14px; }

  /* ボトムナビ：タップ領域を広く */
  .footer-nav { padding: 0 4px; }
  .footer-nav-item { padding: 6px 4px; }
  .footer-nav-label { font-size: .6rem; }
  .footer-nav-icon { font-size: 22px; }
  .create-btn-circle { width: 44px; height: 44px; }
  .create-btn-circle .material-symbols-outlined { font-size: 24px; }

  /* 投稿フォーム */
  .post-form-wrapper { padding: 20px 14px 16px; }
  .post-form-title { font-size: 1.2rem; }

  /* 感情タグ選択：SP では横スクロール */
  .emotion-radio-group {
    flex-wrap: wrap;
    gap: 8px;
  }
  .emotion-radio-btn { font-size: .82rem; padding: 7px 12px; }

  /* フォームボタン：中央寄せ */
  .form-actions {
    justify-content: center;
    flex-direction: row;
  }
  .btn-cancel, .btn-submit { flex: 1; justify-content: center; max-width: 160px; }

  /* 投稿詳細 */
  .post-detail-wrapper { padding: 16px 14px 24px; }
  .post-detail-actions { flex-direction: row; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
  .btn-edit-post, .btn-delete-post { padding: 7px 16px; font-size: .82rem; }
  .post-detail-card { border-radius: var(--radius-md); }
  .post-detail-body { padding: 16px; }
  .post-detail-title { font-size: 1.15rem; }
  .post-detail-meta { gap: 8px; }
  .post-detail-meta-item { font-size: .82rem; }

  /* 投稿カード：SP は2列 */
  .posts-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .post-card-title { font-size: .9rem; }
  .post-card-body { padding: 12px; gap: 4px; }

  /* 公開投稿一覧 */
  .page-subtitle { font-size: .78rem; }

  /* auth カード（パスワードリセット等） */
  .auth-card { padding: 2rem 1.25rem; }
  .auth-title { font-size: 1.3rem; }

  /* ゲストフッター */
  .guest-footer { padding: 16px 12px 24px; }
  .guest-footer__inner { gap: 8px; }

  /* セクションタイトル */
  .section-title { font-size: 1rem; }
}

/* ── SP 小さめ（〜 375px）微調整 ─────────── */
@media (max-width: 375px) {
  .footer-nav-label { display: none; }
  .footer-nav-item { padding: 8px 4px; }
  .footer-nav-icon { font-size: 24px; }
  .create-btn-circle { width: 46px; height: 46px; }
}

/* =============================
   ローディングアニメーション
   ============================= */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 送信ボタン ローディング状態 */
.btn-submit--loading {
  opacity: 0.7;
  cursor: not-allowed;
}

/* 画像エリア スピナー */
.image-loading-spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid rgba(156, 107, 122, 0.25);
  border-top-color: #9c6b7a;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}