/* ==========================================================
   DPRO FLOWER NEXT-9
   注文・完成写真・再注文・届け先・記念日 マイページ
   ========================================================== */

.member-next-body {
  min-width: 320px;
  background: #f4f5ef;
}

.member-page-shell {
  max-width: 1240px;
}

.member-dark-eyebrow {
  color: var(--sage);
}

.member-hero {
  background:
    linear-gradient(118deg, rgba(22,57,44,.96), rgba(78,116,85,.90)),
    radial-gradient(circle at 84% 16%, rgba(247,232,230,.30), transparent 17rem);
}

.member-page-alert {
  position: sticky;
  top: 8px;
  z-index: 55;
  box-shadow: 0 10px 30px rgba(30,63,48,.12);
}

.member-loading-card {
  min-height: 180px;
  display: grid;
  place-items: center;
  margin-top: 18px;
}

.member-profile-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  box-shadow: 0 8px 24px rgba(38,68,54,.06);
}

.member-profile-main {
  display: flex;
  align-items: center;
  gap: 14px;
}

.member-avatar {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 21px;
  background: linear-gradient(145deg, var(--sage-pale), var(--rose-pale));
  font-size: 2rem;
}

.member-profile-card h2 {
  margin: 1px 0 3px;
  color: var(--forest-2);
  font-size: 1.35rem;
}

.member-profile-card p {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
}

.member-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 15px;
}

.member-stat-card {
  min-height: 116px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 3px;
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: 17px;
  color: var(--ink);
  background: white;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 7px 20px rgba(38,68,54,.05);
}

.member-stat-card:hover,
.member-stat-card.active {
  border-color: var(--forest);
  box-shadow: 0 0 0 4px rgba(33,76,59,.08);
}

.member-stat-card.photo {
  background: linear-gradient(145deg, #fff, #fbecea);
}

.member-stat-card.address {
  background: linear-gradient(145deg, #fff, #eaf4f8);
}

.member-stat-card.anniversary {
  background: linear-gradient(145deg, #fff, #fff4df);
}

.member-stat-card span {
  color: var(--muted);
  font-size: .77rem;
  font-weight: 850;
}

.member-stat-card strong {
  color: var(--forest-2);
  font-size: 2rem;
  line-height: 1;
}

.member-stat-card small {
  color: var(--muted);
  font-size: .65rem;
}

.member-tabs {
  display: flex;
  gap: 7px;
  margin-bottom: 20px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.94);
}

.member-tab {
  flex: 1;
  min-height: 53px;
  border: 0;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  font-size: .9rem;
  font-weight: 850;
  cursor: pointer;
}

.member-tab.active {
  color: white;
  background: var(--forest);
  box-shadow: 0 7px 18px rgba(33,76,59,.18);
}

.member-panel {
  display: none;
}

.member-panel.active {
  display: block;
}

.member-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 14px;
}

.member-section-heading h2 {
  margin: 0;
  color: var(--forest-2);
  font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.member-section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
}

.member-order-filters {
  display: flex;
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
}

.member-order-filters button {
  min-height: 38px;
  padding: 7px 12px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: .72rem;
  font-weight: 850;
  cursor: pointer;
}

.member-order-filters button.active {
  color: white;
  background: var(--forest);
}

.member-order-list {
  display: grid;
  gap: 15px;
}

.member-order-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: white;
  box-shadow: 0 9px 28px rgba(38,68,54,.07);
}

.member-order-card.completed {
  background: #fcfdfb;
}

.member-order-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 13px;
  padding: 16px 18px 13px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfa;
}

.member-order-number {
  color: var(--forest-2);
  font-size: 1.05rem;
  font-weight: 900;
}

.member-order-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: .76rem;
}

.member-order-body {
  padding: 18px;
}

.member-order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr);
  gap: 17px;
  align-items: start;
}

.member-item-list {
  display: grid;
  gap: 9px;
}

.member-item {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 10px;
  border-radius: 13px;
  background: #f6f8f5;
}

.member-item-photo {
  width: 74px;
  height: 62px;
  display: grid;
  place-items: center;
  object-fit: cover;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--sage-pale), var(--rose-pale));
  font-size: 1.5rem;
}

.member-item strong {
  display: block;
  color: var(--forest-2);
}

.member-item span {
  color: var(--muted);
  font-size: .72rem;
}

.member-item-price {
  color: var(--forest);
  font-weight: 900;
}

.member-order-summary {
  margin-top: 12px;
}

.member-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  margin: 15px 0;
}

.member-progress-step {
  position: relative;
  min-height: 52px;
  display: grid;
  place-items: center;
  padding: 7px 4px;
  border-radius: 10px;
  color: #89948c;
  background: #f0f2ef;
  text-align: center;
  font-size: .66rem;
  font-weight: 850;
}

.member-progress-step.done {
  color: white;
  background: var(--forest);
}

.member-progress-step.active {
  color: var(--forest-2);
  background: var(--sage-pale);
  box-shadow: inset 0 0 0 2px var(--forest);
}

.member-next-message {
  padding: 13px;
  border: 1px solid #cad8cc;
  border-radius: 13px;
  color: var(--forest-2);
  background: #f2f8f1;
  line-height: 1.55;
  font-size: .82rem;
  font-weight: 750;
}

.member-recipient-card {
  margin-top: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fbf8;
}

.member-recipient-card strong {
  display: block;
  color: var(--forest-2);
}

.member-recipient-card span {
  color: var(--muted);
  font-size: .74rem;
  line-height: 1.5;
}

.member-photo-section {
  margin-top: 15px;
}

.member-photo-section h4 {
  margin: 0 0 9px;
  color: var(--forest-2);
}

.member-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 9px;
}

.member-photo {
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f4f7f3;
}

.member-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
}

.member-photo figcaption {
  padding: 7px;
  color: var(--muted);
  font-size: .65rem;
}

.member-order-actions {
  display: grid;
  gap: 8px;
}

.member-order-actions .btn {
  width: 100%;
  min-height: 47px;
}

.member-address-grid,
.member-anniversary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 13px;
}

.member-address-card,
.member-anniversary-card {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
  box-shadow: 0 7px 22px rgba(38,68,54,.06);
}

.member-address-card {
  padding: 16px;
}

.member-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.member-card-head h3 {
  margin: 0;
  color: var(--forest-2);
}

.member-default-badge {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--forest);
  background: var(--sage-pale);
  font-size: .65rem;
  font-weight: 850;
}

.member-address-name {
  margin: 11px 0 4px;
  color: var(--forest-2);
  font-weight: 850;
}

.member-address-text {
  min-height: 3em;
  color: var(--muted);
  line-height: 1.55;
  font-size: .78rem;
}

.member-card-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 13px;
}

.member-card-actions .btn {
  width: 100%;
}

.member-anniversary-card {
  overflow: hidden;
}

.member-anniversary-top {
  padding: 16px;
  color: white;
  background: linear-gradient(125deg, var(--forest), #567b5f);
}

.member-anniversary-top .badge {
  background: rgba(255,255,255,.18);
  color: white;
}

.member-anniversary-top h3 {
  margin: 9px 0 3px;
  font-size: 1.18rem;
}

.member-anniversary-date {
  color: rgba(255,255,255,.78);
  font-size: .76rem;
}

.member-anniversary-body {
  padding: 15px;
}

.member-anniversary-days {
  color: var(--forest-2);
  font-size: 1.45rem;
  font-weight: 900;
}

.member-anniversary-days small {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 750;
}

.member-anniversary-preference {
  margin-top: 8px;
  padding: 10px;
  border-radius: 11px;
  color: var(--muted);
  background: #f6f8f5;
  line-height: 1.5;
  font-size: .75rem;
}

.member-empty {
  grid-column: 1 / -1;
  padding: 55px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: white;
  text-align: center;
}

.member-empty-icon {
  margin-bottom: 8px;
  font-size: 2.7rem;
}

.member-check-row {
  min-height: 49px;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fbf8;
  font-weight: 750;
}

.member-check-row input {
  width: 21px;
  height: 21px;
  min-height: auto;
  accent-color: var(--forest);
}

.member-dialog {
  width: min(760px, calc(100% - 18px));
  max-height: 94vh;
  padding: 0;
  border: 0;
  border-radius: 20px;
  color: var(--ink);
  background: white;
  box-shadow: 0 30px 90px rgba(17,39,30,.30);
}

.member-dialog-small {
  width: min(570px, calc(100% - 18px));
}

.member-dialog::backdrop {
  background: rgba(16,30,24,.67);
  backdrop-filter: blur(4px);
}

.member-dialog-shell {
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  margin: 0;
}

.member-dialog-header,
.member-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfa;
}

.member-dialog-header h2 {
  margin: 0;
}

.member-dialog-body {
  overflow: auto;
  padding: 18px;
}

.member-dialog-footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  justify-content: flex-end;
}

.member-dialog-close {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--forest-2);
  background: white;
  font-size: 1.4rem;
  cursor: pointer;
}

.member-cancel-label {
  margin: 0 0 13px;
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--forest-2);
  background: var(--sage-pale);
  font-weight: 850;
}

.member-footer {
  padding-bottom: 86px;
}

@media (max-width: 980px) {
  .member-order-layout {
    grid-template-columns: 1fr;
  }

  .member-address-grid,
  .member-anniversary-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }

  .member-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .member-topbar {
    display: none;
  }

  .member-page-shell {
    padding: 9px 9px 90px;
  }

  .member-hero {
    margin-top: 0;
    padding: 22px 17px;
  }

  .member-profile-card,
  .member-section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .member-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .member-stat-card {
    min-height: 96px;
    padding: 12px;
  }

  .member-stat-card strong {
    font-size: 1.6rem;
  }

  .member-tabs {
    gap: 4px;
  }

  .member-tab {
    min-height: 50px;
    font-size: .72rem;
  }

  .member-order-filters {
    width: 100%;
    border-radius: 13px;
  }

  .member-order-filters button {
    flex: 1;
  }

  .member-order-head,
  .member-order-body {
    padding: 13px;
  }

  .member-item {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .member-item-photo {
    width: 62px;
    height: 55px;
  }

  .member-item-price {
    grid-column: 1 / -1;
  }

  .member-progress {
    grid-template-columns: repeat(5, minmax(55px, 1fr));
    overflow-x: auto;
  }

  .member-photo-grid {
    grid-template-columns: repeat(2, minmax(100px, 1fr));
  }

  .member-address-grid,
  .member-anniversary-grid {
    grid-template-columns: 1fr;
  }

  .member-dialog {
    width: calc(100% - 8px);
    max-height: 97vh;
    border-radius: 15px;
  }

  .member-dialog-shell {
    max-height: 97vh;
  }

  .member-dialog-header,
  .member-dialog-footer {
    padding: 13px;
    flex-wrap: wrap;
  }

  .member-dialog-body {
    padding: 13px;
  }
}
