body {
  margin: 0;
  background: #fbfdf8;
  color: #233025;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 80px;
}

.page-header {
  margin-bottom: 20px;
}

.page-header h1 {
  font-size: 28px;
  margin: 0 0 6px;
}

.page-header p {
  margin: 0;
  color: #6b756c;
  font-size: 14px;
}

.primary-link {
  display: inline-block;
  margin-bottom: 28px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #dff3df;
  color: #233025;
  text-decoration: none;
  font-weight: 700;
}

.plant-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.plant-section h2 {
  font-size: 21px;
  margin: 0 0 12px;
}

.record-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 0 10px;
  -webkit-overflow-scrolling: touch;
}

.record-card {
  flex: 0 0 auto;
  min-width: 76px;
  padding: 16px 14px;
  border-radius: 18px;
  background: white;
  color: #233025;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
}

.record-detail {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}

.record-date {
  margin: 0 0 8px;
  color: #6b756c;
  font-size: 15px;
  font-weight: 600;
}

.record-detail h1 {
  margin: 0 0 24px;
  font-size: 26px;
  line-height: 1.2;
}

.record-body {
  margin: 0;
  padding: 0 0 20px;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.record-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.secondary-link {
  display: inline-block;
  padding: 12px 16px;
  border-radius: 999px;
  background: #eef6ee;
  color: #233025;
  text-decoration: none;
  font-weight: 700;
  width: 100%;
  text-align: center;
}

.record-main-image {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: 24px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(35, 48, 37, 0.12);
}

.record-image-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.record-sub-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 18px;
}

.record-card {
  overflow: hidden;
  padding: 0;
}

.record-card-image {
  display: block;
  width: 92px;
  height: 92px;
  object-fit: cover;
}

.record-card span {
  display: block;
  padding: 10px 12px;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 8px;
}

.like-button {
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: 999px;
  background: #eef6ee;
  color: #233025;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  display: block;
}

.like-button.liked {
  background: #dff3df;
}

.edit-preview-image {
  width: 100%;
  max-width: 360px;
  border-radius: 18px;
  margin-bottom: 12px;
}

.edit-image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.edit-sub-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
}

.edit-image-item {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
}

.edit-sub-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.edit-image-item form {
  margin: 0;
}

.image-x-button {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #6b2222;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.image-delete-button {
  width: 100%;
  margin-top: 6px;
  padding: 8px;
  border: none;
  border-radius: 999px;
  background: #f5dddd;
  color: #6b2222;
  font-size: 13px;
  font-weight: 700;
}
.search-form {
  display: flex;
  gap: 8px;
  margin: 20px 0 28px;
}

.search-input {
  flex: 1;
  padding: 14px 16px;
  border: 1px solid #d8e4d8;
  border-radius: 999px;
  font-size: 16px;
}

.search-button {
  flex: 0 0 auto;
  padding: 14px 18px;
  border: none;
  border-radius: 999px;
  background: #dff3df;
  color: #233025;
  font-weight: 700;
}
input.search-button {
padding: 14px 18px;
    border: none;
    border-radius: 999px;
    background: #dff3df;
    color: #233025;
    font-weight: 700;
}
.search-result-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 18px;
  background: white;
  color: #233025;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(35, 48, 37, 0.08);
}

.search-result-image {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 14px;
}

.search-result-card p {
  margin: 4px 0 0;
  color: #6b756c;
  font-size: 14px;
}

.app-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 88px;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.app-header h1,
.hero h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.25;
}

.app-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

.page-label {
  margin: 0 0 6px;
  color: #6f8b6f;
  font-size: 13px;
  font-weight: 700;
}

.text-link {
  color: #4f7f4f;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.hero {
  padding: 28px 0;
}

.hero p {
  color: #6b756c;
  line-height: 1.7;
}

.home-nav,
.action-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.primary-button,
.secondary-button,
.action-card,
.small-button {
  display: block;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  border-radius: 999px;
}

.action-card.post-button {
    background: #66be77;
    color: #fff;
}

.action-card.plant-button {
    background: #c4e993;
}

.primary-button {
  padding: 16px 18px;
  background: #dff3df;
  color: #233025;
}

.secondary-button {
  padding: 14px 18px;
  background: #ffffff;
  color: #233025;
  box-shadow: 0 6px 18px rgba(35, 48, 37, 0.08);
}

.action-card {
  padding: 18px;
  background: white;
  color: #233025;
  box-shadow: 0 6px 18px rgba(35, 48, 37, 0.08);
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  margin-bottom: 20px;
  border-radius: 24px;
  background: white;
  box-shadow: 0 6px 18px rgba(35, 48, 37, 0.08);
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.profile-avatar.placeholder {
  display: grid;
  place-items: center;
  background: #eef6ee;
  font-size: 28px;
}

.profile-card h2 {
  margin: 0 0 4px;
  font-size: 22px;
}

.profile-card p {
  margin: 0;
  color: #6b756c;
  font-size: 14px;
}

.panel {
  margin-top: 28px;
}

.panel-header h2 {
  margin: 0 0 12px;
  font-size: 21px;
}

.management-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 20px;
  background: white;
  box-shadow: 0 6px 18px rgba(35, 48, 37, 0.08);
}

.management-main {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #233025;
  text-decoration: none;
  min-width: 0;
}

.management-main p {
  margin: 4px 0 0;
  color: #6b756c;
  font-size: 13px;
}

.management-thumb {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  flex: 0 0 auto;
}

.management-thumb.placeholder,
.plant-icon {
  display: grid;
  place-items: center;
  background: #eef6ee;
  font-size: 22px;
}

.plant-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.small-button {
  padding: 10px 14px;
  background: #eef6ee;
  color: #233025;
  font-size: 14px;
}

.logout-area {
  margin-top: 32px;
}

.danger-outline-button {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid #e8b6b6;
  border-radius: 999px;
  background: white;
  color: #8a3333;
  font-size: 15px;
  font-weight: 700;
}

.archive-header {
  margin-bottom: 28px;
}

.archive-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.archive-profile h1 {
  margin: 0;
  font-size: 28px;
}

.archive-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.record-card-placeholder {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  background: #eef6ee;
  font-size: 28px;
}

form {
  margin-top: 16px;
}

form div {
  margin-bottom: 18px;
}

label {
  display: inline-block;
  margin-bottom: 6px;
  color: #4d5c4f;
  font-size: 14px;
  font-weight: 700;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
textarea,
select {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border: 1px solid #d8e4d8;
  border-radius: 16px;
  background: white;
  color: #233025;
  font-size: 16px;
}

input[type="date"] {
  max-width: 100%;
}

textarea {
  min-height: 140px;
  line-height: 1.7;
}

input[type="file"] {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  border-radius: 16px;
  background: white;
  border: 1px solid #d8e4d8;
}

input[type="submit"] {
  width: 100%;
  padding: 15px 30px;
  border: none;
  border-radius: 999px;
  background: #dff3df;
  color: #233025;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.record-header {
  margin-bottom: 20px;
}

.record-author {
}

.record-author-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1;
}

.record-author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
}

.record-author-avatar.placeholder {
  display: grid;
  place-items: center;
  background: #eef6ee;
  font-size: 22px;
}

.record-author-name {
  margin: 2px 0 0;
  color: #233025;
  font-size: 15px;
  font-weight: 700;
}

.record-owner-links {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.record-images {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 20px;
}

.record-full-image {
  width: 100%;
  height: auto;
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(35, 48, 37, 0.12);
}

.bottom-search {
  margin-top: 36px;
}

.home-cta {
  display: grid;
  gap: 12px;
  margin: 24px 0 36px;
}

.home-search {
  padding: 18px;
  border-radius: 24px;
  background: white;
}

.home-search h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.home-cta {
  display: grid;
  gap: 12px;
  margin: 24px 0 36px;
}

.home-search {
  padding: 18px;
  border-radius: 24px;
  background: white;
}

.home-search h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.form-page {
  padding: 24px 0 80px;
}

.form-page h1 {
  font-size: 26px;
  margin-bottom: 20px;
}

.search-button {
  width: auto !important;
  flex: 0 0 auto;
  padding: 14px 18px;
  border: none;
  border-radius: 999px;
  background: #dff3df;
  color: #233025;
  font-weight: 700;
}

.search-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.search-input {
  flex: 1;
  min-width: 0; 
}

.edit-image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items: stretch;
}

.edit-image-item {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.edit-sub-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.edit-image-item form {
  margin-top: auto;
}

.image-delete-button {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: none;
  border-radius: 999px;
  background: #f5dddd;
  color: #6b2222;
  font-size: 14px;
  font-weight: 700;
}

.delete-record-area {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #e5eee5;
}

.danger-button {
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: 999px;
  background: #f5dddd;
  color: #6b2222;
  font-size: 16px;
  font-weight: 700;
}

.flash {
  max-width: 720px;
  margin: 16px auto;
  padding: 12px 16px;
  border-radius: 16px;
  font-weight: 700;
}

.flash.notice {
  background: #dff3df;
  color: #233025;
}

.flash.alert {
  background: #f5dddd;
  color: #6b2222;
}

.record-card {
  width: 132px;
  min-width: 132px;
  height: 132px;
  padding: 0;
  border-radius: 22px;
  overflow: hidden;
}

.record-card-image,
.record-card-placeholder {
  width: 132px;
  height: 132px;
}

.record-card-image {
  display: block;
  object-fit: cover;
}

.record-card-placeholder {
  display: grid;
  place-items: center;
  background: #eef6ee;
  font-size: 32px;
}

.primary-mini-button {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 999px;
  background: #dff3df;
  color: #233025;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

.plant-management-list {
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
}

.plant-management-card {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 22px;
  background: white;
  box-shadow: 0 6px 18px rgba(35, 48, 37, 0.08);
}

.plant-management-thumb {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
}

.plant-management-thumb.placeholder {
  display: grid;
  place-items: center;
  background: #eef6ee;
  font-size: 26px;
}

.plant-management-info strong {
  display: block;
  font-size: 17px;
}

.plant-management-info p {
  margin: 4px 0 0;
  color: #6b756c;
  font-size: 13px;
}

.plant-management-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.plant-management-actions form {
  margin: 0;
}

.small-danger-button {
  padding: 10px 14px;
  border: none;
  border-radius: 999px;
  background: #f5dddd;
  color: #6b2222;
  font-weight: 700;
}

.site-header {
  top: 0;
  z-index: 50;
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(251, 253, 248, 0.94);
  backdrop-filter: blur(10px);
  box-shadow: 0px 0px 12px rgba(123,160,129, 0.26);
}

.site-logo {
  color: #233025;
  text-decoration: none;
  font-weight: 800;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  font-size: 14px;
}

.site-nav a {
  color: #4f7f4f;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

.site-nav form {
  margin: 0;
}

.nav-logout-button {
  border: none;
  background: transparent;
  color: #8a3333;
  font-weight: 700;
  font-size: 14px;
  padding: 0;
}

.auth-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px 16px 88px;
}

.auth-form {
  margin: 0;
}

.primary-submit {
  width: 100% !important;
  margin-top: 8px;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  font-size: 14px;
}

.auth-links a {
  color: #4f7f4f;
  font-weight: 700;
  text-decoration: none;
}

.search-meta {
  margin: 12px 0 20px;
  color: #6b756c;
  font-size: 14px;
}

.search-result-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 22px;
  background: white;
  text-decoration: none;
  color: #233025;
  box-shadow: 0 6px 18px rgba(35, 48, 37, 0.08);
}

.search-card-image {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  object-fit: cover;
  flex: 0 0 auto;
}

.search-card-image.placeholder {
  display: grid;
  place-items: center;
  background: #eef6ee;
  font-size: 28px;
}

.search-card-body {
  min-width: 0;
}

.search-card-date {
  margin: 4px 0;
  color: #6b756c;
  font-size: 13px;
}

.search-card-text {
  margin: 4px 0;
  color: #6b756c;
  font-size: 14px;
  line-height: 1.5;
}

.search-card-user {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #4f7f4f;
}
.site-footer {
    padding: 14px 0;
    text-align: center;
    border-top: 1px solid #e5eee5;
    color: #6b756c;
    font-size: 12px;
    background: white;
}
.hp-field {
  position: absolute;
  left: -9999px;
}
.form-hint {
  margin: 6px 0 0;
  color: #6b756c;
  font-size: 13px;
}

.danger-outline-button {
  margin-top: 12px;
  padding: 10px 14px;
  border: 1px solid #e5b8b8;
  border-radius: 999px;
  background: white;
  color: #8a3333;
  font-weight: 700;
}
.sort-links {
  display: flex;
  gap: 8px;
  margin: 12px 0 18px;
}

.sort-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef6ee;
  color: #4f7f4f;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.sort-links a.active {
  background: #4f7f4f;
  color: white;
}

.load-more-area {
  margin: 24px 0;
  text-align: center;
}
.plant-records-section {
  margin: 32px 0;
}

.plant-records-section h2 {
  margin-bottom: 14px;
  font-size: 20px;
}

.plant-record-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.plant-record-card {
  display: block;
  padding: 10px;
  border-radius: 20px;
  background: white;
  color: #233025;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(35, 48, 37, 0.08);
}

.plant-record-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  object-fit: cover;
  background: #eef6ee;
}

.plant-record-image.placeholder {
  display: grid;
  place-items: center;
  font-size: 28px;
}

.plant-record-date {
  margin: 8px 0 0;
  font-size: 13px;
  color: #6b756c;
  font-weight: 700;
}
.pager-area {
  margin: 24px 0;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
/* ===== 記事詳細ページ専用 ===== */
.related-records {
  background-color: #dff3df;
    margin: 40px -32px;
    padding: 10px 32px 20px;
}

/* タイトル小さく */
.related-records h2 {
  font-size: 16px;
  margin-bottom: 10px;
}

.related-records .record-card-image {
    width: 100%;
    height: 100%;
}

.related-records .record-card {
  width: 100px;
    min-width: 100px;
    height: 100px;
    min-height: 100px;
    border-radius: 15px;
}

.related-records .record-scroll {
  gap: 8px;
}