/* Meet Seed - cute pastel theme */
@import url('https://fonts.googleapis.com/css2?family=Zen+Maru+Gothic:wght@400;500;700&display=swap');

:root {
  --background: #fbf7f0;
  --foreground: #3d3a36;
  --card: #ffffff;
  --card-border: #efe7d8;
  --primary: #e89ba0;
  --primary-foreground: #4a2a2c;
  --primary-soft: #f7dcde;
  --accent: #9dba8f;
  --accent-foreground: #2f3a2a;
  --accent-soft: #d9e5d0;
  --muted: #9a8f82;
  --muted-soft: #ece5d8;
  --ring: #e89ba0;
  --danger: #d35862;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Zen Maru Gothic', system-ui, sans-serif;
  font-feature-settings: 'palt';
  background: var(--background);
  color: var(--foreground);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
  max-width: 28rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 6rem;
  width: 100%;
}

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

/* ---- 共通パーツ ---- */

.h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.h2 { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.75rem; }
.tiny { font-size: 0.7rem; }
.center { text-align: center; }

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 1.25rem;
  box-shadow: 0 1px 0 rgba(61,58,54,0.02), 0 8px 24px -16px rgba(61,58,54,0.12);
}
.card.pad { padding: 1.25rem; }

.section { margin-top: 1.75rem; }
.section h2 { color: var(--muted); margin-bottom: 0.5rem; }

.row { display: flex; gap: 0.75rem; }
.row .label { width: 5rem; flex: 0 0 5rem; font-size: 0.7rem; color: var(--muted); padding-top: 0.15rem; }
.row .value { flex: 1; word-break: break-all; }

.field { display: block; margin-bottom: 0.75rem; }
.field-label { display: block; font-size: 0.7rem; color: var(--muted); margin-bottom: 0.25rem; }

.input, .textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--card-border);
  background: var(--card);
  font: inherit;
  font-size: 0.875rem;
  color: var(--foreground);
}
.input:focus, .textarea:focus { outline: 2px solid var(--ring); outline-offset: 1px; }
.textarea { min-height: 4.5rem; resize: vertical; }
.search {
  width: 100%;
  padding: 0.85rem 1.2rem;
  border-radius: 9999px;
  border: 1px solid var(--card-border);
  background: var(--card);
  font: inherit;
  font-size: 0.875rem;
}
.search::placeholder, .input::placeholder, .textarea::placeholder { color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  border: none;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.05s;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: var(--primary); color: var(--primary-foreground); }
.btn.accent { background: var(--accent-soft); color: var(--accent-foreground); }
.btn.muted { background: var(--muted-soft); color: var(--muted); }
.btn.block { width: 100%; }
.btn.danger { background: transparent; color: var(--danger); padding: 0.5rem; text-decoration: underline; text-decoration-color: var(--danger); }

.chip {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: var(--accent-soft);
  color: var(--accent-foreground);
  font-size: 0.7rem;
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
}
.chip.selected { background: var(--accent); color: white; }
.chip.new { background: var(--primary); color: var(--primary-foreground); }
.chip button { background: none; border: none; padding: 0; margin-left: 0.25rem; color: inherit; font: inherit; cursor: pointer; }

.flash {
  margin: 0.75rem auto 0;
  max-width: 28rem;
  padding: 0.6rem 1rem;
  border-radius: 1rem;
  font-size: 0.875rem;
}
.flash.info { background: var(--accent-soft); color: var(--accent-foreground); }
.flash.warn { background: #fde68a; color: #78350f; }
.flash.error { background: #fecaca; color: #7f1d1d; }

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.app-header .back { font-size: 0.875rem; color: var(--muted); }
.app-header h1 { font-size: 1.125rem; font-weight: 700; }
.app-header .right { min-width: 3rem; text-align: right; }

.fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.85rem 1.4rem;
  border-radius: 9999px;
  box-shadow: 0 10px 25px -5px rgba(232,155,160,0.4);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.fab .plus { font-size: 1.2rem; line-height: 1; }

.empty {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 1.25rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.empty p { margin: 0; color: var(--muted); font-size: 0.875rem; }
.empty p + p { margin-top: 0.25rem; font-size: 0.75rem; }

.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { margin-bottom: 0.75rem; }
.contact-list a {
  display: block;
  padding: 1rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 1.25rem;
  box-shadow: 0 1px 0 rgba(61,58,54,0.02), 0 8px 24px -16px rgba(61,58,54,0.12);
  transition: transform 0.1s;
}
.contact-list a:active { transform: translateY(1px); }
.contact-list .top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.contact-list .top .name { font-weight: 500; }
.contact-list .top .date { flex-shrink: 0; font-size: 0.75rem; color: var(--muted); }
.contact-list .sub { font-size: 0.75rem; color: var(--muted); margin-top: 0.25rem; }

.card-image { width: 100%; border-radius: 0.75rem; display: block; }
.card-images { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 1.5rem; }
.card-image-wrapper { background: var(--card); border: 1px solid var(--card-border); border-radius: 1rem; padding: 0.5rem; }
.card-image-wrapper .lbl { font-size: 0.7rem; color: var(--muted); text-align: center; margin-bottom: 0.25rem; }

.slot-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 10rem;
  background: var(--muted-soft);
  border-radius: 1rem;
  color: var(--muted);
  font-size: 0.875rem;
  cursor: pointer;
  width: 100%;
  border: none;
  font: inherit;
}
.slot-preview { display: block; margin: 0 auto; max-height: 14rem; border-radius: 1rem; }

.url-row { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }
.url-row .input.label-input { width: 6rem; flex: 0 0 6rem; }
.url-row .remove { background: none; border: none; color: var(--muted); padding: 0 0.5rem; cursor: pointer; }

.actions { display: flex; gap: 0.75rem; padding-top: 0.5rem; }
.actions .btn { flex: 1; }

/* 段階 (種→芽→苗→蕾→花) */
.stage-row { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.stage-row > * { flex: 1; min-width: 3rem; }
.stage-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.4rem;
  border-radius: 9999px;
  background: var(--muted-soft);
  color: var(--muted);
  font-size: 0.8rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  user-select: none;
  transition: background 0.15s;
}
.stage-chip:hover { background: var(--accent-soft); color: var(--accent-foreground); }
.stage-chip.selected { background: var(--accent); color: white; border-color: var(--accent); font-weight: 500; }
.stage-chip input { display: none; }

.stage-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  flex-shrink: 0;
}
.stage-badge.s1 { background: #f7e4c9; color: #6d4a1c; }
.stage-badge.s2 { background: #d9e5d0; color: #2f3a2a; }
.stage-badge.s3 { background: #b8d9a8; color: #2f3a2a; }
.stage-badge.s4 { background: #f7dcde; color: #4a2a2c; }
.stage-badge.s5 { background: #e89ba0; color: #ffffff; }

.brand-logo { max-width: 290px; height: auto; display: block; margin: 0 auto; }
.brand-logo-sm { max-width: 220px; height: auto; }
