﻿* {
  box-sizing: border-box;
  }

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

.page {
max-width: 760px;
margin: 0 auto;
padding: 44px 22px 72px;
}

.site-header {
text-align: center;
margin-bottom: 42px;
}

h1 {
margin: 0;
font-size: 32px;
font-weight: 400;
letter-spacing: 0.03em;
}

h2 {
margin: 0 0 22px;
font-size: 15px;
font-weight: 400;
letter-spacing: 0.02em;
}

.top-actions {
display: flex;
flex-direction: column;
gap: 18px;
align-items: center;
margin-bottom: 44px;
}

.top-link,
.submit-link,
.add-button,
.common-header a,
.nav-button {
color: #333;
text-decoration: none;
}

.top-link {
font-size: 15px;
font-weight: 400;
}

.logout-button {
display: block;
margin: 18px auto 0;
border: none;
background: transparent;
cursor: pointer;
}

.logout-button:disabled {
color: #aaa59d;
cursor: default;
}

.section {
border-top: 1px solid #e6e2da;
padding-top: 30px;
}

.time-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 9px;
}

.time-card {
aspect-ratio: 1 / 1;
background: #e9e6df;
border-radius: 9px;
}

.plant-card {
color: #222;
text-decoration: none;
}

.plant-card-name {
margin: 9px 0 0;
font-size: 13px;
text-align: center;
}

.plant-card-category {
margin: 3px 0 0;
font-size: 11px;
color: #888;
text-align: center;
}

.plant-image {
width: 100%;
aspect-ratio: 1 / 1;
object-fit: cover;
border-radius: 10px;
display: block;
}

/* common header */

.common-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 34px;
padding-bottom: 18px;
border-bottom: 1px solid #e6e2da;
}

.common-header a {
font-size: 14px;
letter-spacing: 0.02em;
}

.common-nav-actions {
display: flex;
align-items: center;
gap: 18px;
}

.nav-button {
border: none;
background: transparent;
padding: 0;
font: inherit;
font-size: 14px;
letter-spacing: 0.02em;
cursor: pointer;
}

.nav-button:disabled {
color: #aaa59d;
cursor: default;
}

/* mydex */

.mydex-profile {
text-align: center;
margin-bottom: 34px;
}

.avatar {
width: 68px;
height: 68px;
margin: 0 auto 18px;
border-radius: 50%;
background: #e9e6df;
display: flex;
align-items: center;
justify-content: center;
font-size: 26px;
}

.user-name {
font-size: 22px;
margin-bottom: 12px;
}

.profile-text {
margin: 0 auto;
max-width: 360px;
font-size: 14px;
line-height: 1.8;
color: #555;
}

.center-action {
text-align: center;
margin: 36px 0 42px;
}

.section-gap {
margin-top: 42px;
}

/* save */

.save-header {
text-align: center;
margin: 28px 0 38px;
}

.save-mark {
font-size: 26px;
margin-bottom: 12px;
}

.save-header h1 {
font-size: 22px;
font-weight: 400;
}

.save-form {
max-width: 520px;
margin: 0 auto;
}

.form-section {
border-top: 1px solid #e6e2da;
padding-top: 24px;
margin-top: 24px;
}

.form-label {
display: block;
margin-bottom: 10px;
font-size: 14px;
color: #333;
}

.form-control {
width: 100%;
border: 1px solid #dedad2;
border-radius: 10px;
background: transparent;
padding: 13px 14px;
font-size: 14px;
color: #222;
}

.form-control::placeholder {
color: #aaa59d;
}

.textarea,
.profile-textarea {
min-height: 120px;
resize: vertical;
line-height: 1.8;
}

.profile-textarea {
min-height: 96px;
}

.save-submit {
text-align: center;
margin: 54px 0 24px;
}

.submit-button {
border: none;
background: transparent;
font-size: 16px;
color: #222;
cursor: pointer;
}

.submit-button:disabled {
color: #aaa59d;
cursor: default;
}

/* plant detail */

.plant-detail {
max-width: 560px;
margin: 0 auto;
}

.plant-detail-image {
width: 100%;
max-height: 520px;
object-fit: cover;
border-radius: 16px;
display: block;
margin-bottom: 24px;
}

.plant-detail h1 {
font-size: 28px;
margin: 12px 0 4px;
text-align: center;
}

.plant-detail .plant-card-category {
font-size: 13px;
margin-bottom: 28px;
}

.detail-section {
margin-top: 28px;
padding: 20px;
background: #f6f1e8;
border-radius: 16px;
}

.detail-section h2 {
margin-bottom: 14px;
}

.detail-section p {
margin: 8px 0;
font-size: 14px;
line-height: 1.8;
color: #444;
}

.plant-title-line {
display: flex;
justify-content: center;
align-items: baseline;
gap: 10px;
margin-bottom: 12px;
}

.plant-category {
font-size: 14px;
color: #888;
}

.plant-name-inline {
font-size: 26px;
color: #222;
font-weight: 400;
}

.plant-note {
margin: 0;
font-size: 14px;
color: #777;
}

.gg-button {
border: none;
background: transparent;
font-size: 16px;
cursor: pointer;
color: #333;
}

/* time detail */

.time-photo-area {
margin-bottom: 28px;
}

.time-photo-wrap {
position: relative;
width: 100%;
max-width: 520px;
margin: 0 auto;
}

.time-photo {
width: 100%;
max-width: 520px;
aspect-ratio: 1 / 1;
margin: 0 auto;
background: #e9e6df;
border-radius: 12px;
}

.photo-dots {
display: flex;
justify-content: center;
gap: 8px;
margin-top: 14px;
}

.photo-dots span {
width: 5px;
height: 5px;
border-radius: 50%;
background: #d5d1c8;
}

.photo-dots .active {
background: #777;
}

.time-meta {
text-align: center;
margin-bottom: 36px;
}

.time-date {
margin: 0 0 18px;
font-size: 13px;
color: #777;
}

.time-note,
.environment,
.time-gg,
.comments {
border-top: 1px solid #e6e2da;
padding-top: 28px;
margin-top: 34px;
}

.time-note p {
margin: 0;
font-size: 15px;
line-height: 2;
color: #333;
}

.environment dl {
margin: 0;
}

.environment div {
display: flex;
justify-content: space-between;
gap: 24px;
padding: 10px 0;
border-bottom: 1px solid #f0eee8;
}

.environment dt {
font-size: 13px;
color: #777;
}

.environment dd {
margin: 0;
font-size: 13px;
color: #333;
text-align: right;
}

.time-gg {
text-align: center;
}

.time-photo-gg {
text-align: center;
margin-top: 18px;
}

.gg-flash {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
font-size: 28px;
color: rgba(34, 34, 34, 0.72);
opacity: 0;
pointer-events: none;
transition: opacity 0.35s ease;
}

.time-photo-wrap:hover .gg-flash {
opacity: 0;
}

.care-block {
margin-top: 26px;
padding-top: 22px;
border-top: 1px solid #e6e2da;
font-size: 14px;
color: #555;
}

.care-label {
display: inline-block;
}

/* comments */

.comment-input {
width: 100%;
border: 1px solid #e2ded6;
background: transparent;
padding: 14px 16px;
border-radius: 12px;
font-size: 14px;
}

.comment {
margin-top: 26px;
}

.comment.reply {
margin-left: 28px;
}

.comment-head {
display: flex;
align-items: center;
gap: 8px;
font-size: 12px;
color: #777;
}

.comment-avatar {
width: 22px;
height: 22px;
border-radius: 50%;
background: #e9e6df;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
}

.comment p {
margin: 10px 0 6px;
font-size: 14px;
line-height: 1.8;
}

.reply-button {
border: none;
background: transparent;
padding: 0;
font-size: 12px;
color: #888;
cursor: pointer;
}

.record-interactions {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f0eee8;
}

.record-gg-row,
.record-comment-form,
.comment-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.record-gg-row {
  justify-content: center;
}

.gg-button.active {
  color: #5f6f5f;
  font-weight: 600;
}

.gg-count-button {
  border: none;
  background: transparent;
  padding: 0;
  color: #777;
  font-size: 13px;
  cursor: pointer;
}

.gg-user-list {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
}

.record-comment-form {
  margin-top: 14px;
}

.record-comments {
  margin-top: 16px;
}

.reply-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

/* auth / profile */

.auth-box {
max-width: 420px;
margin: 72px auto 0;
text-align: center;
}

.auth-box h1 {
font-size: 22px;
font-weight: 400;
margin: 12px 0 34px;
}

.google-button {
display: block;
width: 100%;
border: 1px solid #dedad2;
border-radius: 999px;
padding: 14px 16px;
color: #222;
text-decoration: none;
font-size: 15px;
}

.auth-text {
margin-top: 38px;
font-size: 14px;
line-height: 2;
color: #666;
}

.start-avatar {
margin-bottom: 16px;
}

.icon-upload {
width: 92px;
height: 92px;
border-radius: 50%;
border: 1px solid #dedad2;
background: transparent;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 6px;
color: #777;
cursor: pointer;
}

.icon-upload span {
font-size: 20px;
}

.icon-upload small {
font-size: 11px;
color: #aaa59d;
}

.submit-link {
font-size: 16px;
}

.profile-header {
text-align: center;
margin-top: 28px;
}

.profile-header .avatar {
margin-bottom: 18px;
}

.profile-header h1 {
font-size: 22px;
font-weight: 400;
margin: 0 0 34px;
}

.add-button {
display: inline-block;
font-size: 16px;
}

/* responsive */

@media (max-width: 640px) {
.page {
padding: 36px 18px 64px;
}

h1 {
font-size: 28px;
}

.time-grid {
grid-template-columns: repeat(3, 1fr);
gap: 8px;
}

.plant-detail-image {
max-height: 420px;
}
}

.plant-image,
.time-grid img,
.plant-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-radius: 18px;
}

.plant-card {
  display: block;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.time-grid,
.plants-grid {
  overflow: hidden;
}

.search-empty {
  grid-column: 1 / -1;
  width: 100%;
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

#searchResults {
  width: 100%;
  display: block;
}

#searchResults .search-empty {
  display: block;
  width: 100%;
  max-width: none;
  text-align: center;
  padding: 40px 20px;
  color: #666;
  line-height: 1.8;
  white-space: nowrap;
}

.search-input-row {
  position: relative;
}

.search-input-row .form-control {
  padding-right: 46px;
}

.search-clear-button {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #8a8173;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.search-result-count {
  margin: 0 0 18px;
  color: #777;
  font-size: 13px;
  text-align: center;
}

.plant-card-period,
.plant-card-time {
  margin: 4px 0 0;
  font-size: 12px;
  color: #777;
  line-height: 1.4;
}

.plant-card-time {
  color: #5f6f5f;
}

.photo-select {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 120px;
  border: 1.5px dashed #cfc7b8;
  border-radius: 22px;
  background: #fffdf8;
  color: #5f574c;
  font-size: 16px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.photo-select:hover {
  background: #f7f2e8;
  border-color: #a99b87;
}

.photo-select:active {
  transform: scale(0.99);
}

.photo-select input {
  display: none;
}

.photo-select span {
  pointer-events: none;
}

.photo-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.photo-upload {
  min-height: 108px;
  border: 1.5px dashed #cfc7b8;
  border-radius: 18px;
  background: #fffdf8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #5f574c;
  cursor: pointer;
}

.photo-upload input {
  display: none;
}

.photo-plus {
  font-size: 24px;
  line-height: 1;
}

.photo-text {
  font-size: 12px;
  color: #8a8173;
}

.check-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #333;
  font-size: 14px;
}

.environment-title {
  margin-top: 34px;
}

.environment-title h2 {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .photo-upload-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .photo-upload {
    min-height: 92px;
  }
}

.record-item {
  padding: 14px 0;
  border-bottom: 1px solid #e8e0d4;
}

.record-item:last-child {
  border-bottom: none;
}

.record-date {
  margin: 0 0 6px;
  color: #8a8173;
  font-size: 13px;
}

.record-content {
  margin: 0;
  color: #2f2a24;
  font-size: 15px;
}

.record-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0 20px;
}

.record-button {
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: 999px;
  background: #2f2a24;
  color: #fff;
  font-size: 15px;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.record-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.record-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  margin: 10px 0;
}

/* ==================================================
   Homepage : 最近、残された時間
================================================== */

.recent-time-section {
  width: min(1180px, calc(100vw - 44px));
  margin-top: 40px;
  margin-left: 50%;
  transform: translateX(-50%);
}

.recent-time-section .time-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  overflow: visible;
}

.recent-time-section .time-card {
  width: 180px;
  display: block;
  text-decoration: none;
  color: #222;
  background: #fff;
  border-radius: 22px;
  overflow: visible;
  aspect-ratio: auto;
  height: auto;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.recent-time-section .time-image-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #eeeae3;
  border-radius: 22px 22px 0 0;
  overflow: hidden;
}

.recent-time-section .time-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.recent-time-section .time-card-body {
  padding: 12px 8px 14px;
  text-align: center;
  background: #fff;
  border-radius: 0 0 22px 22px;
}

.recent-time-section .time-plant-name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #222;
}

.recent-time-section .time-date {
  margin: 6px 0 0;
  font-size: 13px;
  color: #777;
}

.recent-time-section .empty-message {
  grid-column: 1 / -1;
  text-align: center;
  color: #777;
}

@media (max-width: 640px) {
  .recent-time-section {
    width: 100%;
    margin-left: 0;
    transform: none;
  }

  .recent-time-section .time-grid {
    gap: 14px;
  }

  .recent-time-section .time-card {
    width: calc((100% - 14px) / 2);
  }
}

.time-section {
  margin-bottom: 34px;
}

.time-section h3 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 500;
  color: #444;
}

.record-date-section {
  margin-top: 28px;
}

.record-date-section h3 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 500;
  color: #333;
}

/* RareDex modal */

.raredex-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(34, 34, 34, 0.18);
}

.raredex-modal {
  width: min(100%, 360px);
  padding: 28px 24px 24px;
  border: 1px solid #e6e2da;
  border-radius: 16px;
  background: #fbfaf7;
  box-shadow: 0 18px 48px rgba(34, 34, 34, 0.12);
  text-align: center;
}

.raredex-modal-title {
  margin: 0 0 14px;
  color: #8a8173;
  font-size: 13px;
  letter-spacing: 0.08em;
}

.raredex-modal-message {
  margin: 0;
  color: #2f2a24;
  font-size: 15px;
  line-height: 1.9;
}

.raredex-modal-button {
  margin-top: 24px;
  border: none;
  background: transparent;
  color: #333;
  font-size: 14px;
  cursor: pointer;
}









