/* 夜のゲームセンターにある、小さな育成コーナーの2カラム。 */
.planter-widget {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(330px, 1fr);
  gap: clamp(16px, 2.2vw, 26px);
  align-items: stretch;
  margin: 0 0 10px;
  overflow: hidden;
  border-radius: 14px;
  background:
    radial-gradient(circle at 12% 8%, rgba(44, 229, 255, 0.12), transparent 22rem),
    radial-gradient(circle at 86% 8%, rgba(180, 133, 255, 0.09), transparent 24rem),
    linear-gradient(145deg, #080d1d, #101728 58%, #070b15);
  color: #effffb;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.3), inset 0 1px rgba(255, 255, 255, 0.025);
  padding: clamp(14px, 2vw, 22px);
}

.planter-widget::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(115, 233, 220, 0.025) 1px, transparent 1px);
  background-size: 100% 32px;
  mask-image: linear-gradient(90deg, #000, transparent 78%);
}

.planter-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: minmax(360px, 1fr) auto auto;
  gap: 14px;
  min-width: 0;
}

.planter-kicker {
  margin: 0;
  color: #6fffe0;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.planter-scene {
  position: relative;
  display: grid;
  place-items: end center;
  min-height: 360px;
  overflow: hidden;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(21, 31, 58, 0.84), rgba(5, 10, 22, 0.72) 67%, rgba(76, 42, 25, 0.08) 68%),
    radial-gradient(circle at 50% 48%, rgba(97, 255, 219, 0.16), transparent 13rem);
  box-shadow: inset 0 -44px 70px rgba(0, 0, 0, 0.28);
}

.planter-scene::before {
  content: "";
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 28px;
  height: 54px;
  border-radius: 7px 7px 18px 18px;
  background: linear-gradient(180deg, #8d5a3d, #4e2f24 56%, #271a1a);
  box-shadow: inset 0 7px rgba(255, 255, 255, 0.06), 0 18px 30px rgba(0, 0, 0, 0.34);
}

.planter-scene::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 13px;
  height: 13px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.28);
  filter: blur(5px);
}

.scene-neon-sign {
  position: absolute;
  top: 18px;
  left: 20px;
  color: rgba(134, 255, 232, 0.52);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-shadow: 0 0 10px rgba(91, 255, 220, 0.32);
}

/* じょうろと種袋はCSSだけの静かな棚飾り。 */
.scene-watering-can {
  position: absolute;
  z-index: 1;
  right: 7%;
  bottom: 62px;
  width: 54px;
  height: 34px;
  border-radius: 8px 10px 13px 10px;
  background: linear-gradient(145deg, rgba(92, 179, 188, 0.48), rgba(32, 78, 97, 0.56));
  opacity: 0.58;
  transform: rotate(-3deg);
}

.scene-watering-can::before {
  content: "";
  position: absolute;
  top: -13px;
  right: 7px;
  width: 24px;
  height: 22px;
  border: 5px solid rgba(79, 151, 164, 0.48);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
}

.scene-watering-can::after {
  content: "";
  position: absolute;
  left: -30px;
  top: 6px;
  width: 36px;
  height: 10px;
  border-radius: 8px 0 0 8px;
  background: rgba(68, 137, 151, 0.5);
  transform: rotate(-15deg);
}

.scene-seed-bag {
  position: absolute;
  z-index: 1;
  left: 7%;
  bottom: 60px;
  width: 45px;
  height: 51px;
  border-radius: 7px 7px 13px 13px;
  background: linear-gradient(150deg, rgba(176, 129, 91, 0.54), rgba(76, 52, 49, 0.62));
  opacity: 0.58;
  transform: rotate(4deg);
}

.scene-seed-bag::after {
  content: "SEED";
  position: absolute;
  left: 7px;
  right: 7px;
  top: 19px;
  color: rgba(255, 238, 194, 0.55);
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
}

.plant-illustration {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: end center;
  width: min(74%, 330px);
  height: min(92%, 430px);
  transform-origin: bottom center;
}

.plant-illustration.is-watered { animation: plant-sway 0.8s ease; }

@keyframes plant-sway {
  25% { transform: rotate(-3deg); }
  55% { transform: rotate(3deg); }
  100% { transform: rotate(0); }
}

.planter-plant-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
  filter: drop-shadow(0 0 14px rgba(111, 255, 224, 0.18));
}

.planter-status {
  display: grid;
  grid-template-columns: minmax(140px, 0.75fr) minmax(0, 1.25fr);
  gap: 14px;
  align-items: center;
  color: #c7e8e2;
  font-size: 0.9rem;
  line-height: 1.5;
  padding: 0 4px;
}

.planter-current-name,
.planter-status-details { display: grid; gap: 2px; }
.planter-current-name > span { color: #718f95; font-size: 0.7rem; letter-spacing: 0.08em; }
.planter-current-name strong { color: #fff6c8; font-size: 1.08rem; font-weight: 700; }
.planter-status-details { color: #a9c8c6; }

.planter-actions {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 9px;
}

.seed-row,
.water-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, 0.62fr);
  gap: 9px;
}

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

.planter-widget button {
  min-height: 44px;
  border: 1px solid rgba(127, 255, 220, 0.2);
  border-radius: 8px;
  color: #effffb;
  background: rgba(92, 211, 192, 0.1);
  padding: 0 14px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.planter-widget select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid rgba(127, 255, 220, 0.16);
  border-radius: 8px;
  color: #effffb;
  background: rgba(17, 24, 39, 0.88);
  padding: 0 12px;
}

.planter-widget select option { color: #effffb; background: #111827; }
.planter-widget button:not(:disabled) { box-shadow: 0 0 14px rgba(86, 255, 211, 0.08); cursor: pointer; }
.planter-widget button:not(:disabled):hover {
  border-color: rgba(127, 255, 220, 0.4);
  background: rgba(92, 211, 192, 0.16);
  transform: translateY(-1px);
}

.planter-widget button:disabled {
  cursor: not-allowed;
  color: rgba(239, 255, 251, 0.55);
  background: rgba(255, 255, 255, 0.045);
  opacity: 0.72;
}

.planter-side {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 13px;
  align-content: start;
  min-width: 0;
}

.planter-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  color: #b9d7d3;
  background: rgba(255, 255, 255, 0.035);
  padding: 11px 13px;
}

.planter-note-light {
  width: 7px;
  height: 7px;
  margin-top: 7px;
  border-radius: 50%;
  background: #6fffe0;
  box-shadow: 0 0 9px rgba(111, 255, 224, 0.72);
}

.planter-note p { margin: 0; font-size: 0.84rem; line-height: 1.65; }

.planter-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.planter-summary-card {
  display: grid;
  gap: 2px;
  min-width: 0;
  background: linear-gradient(150deg, rgba(31, 47, 69, 0.7), rgba(12, 18, 33, 0.74));
  padding: 12px 11px;
}

.planter-summary-card span { color: #85a5a7; font-size: 0.68rem; }
.planter-summary-card strong {
  overflow: hidden;
  color: #f8f3d8;
  font-size: clamp(0.9rem, 1.6vw, 1.16rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.planter-summary-card small { color: rgba(111, 255, 224, 0.46); font-size: 0.54rem; font-weight: 800; letter-spacing: 0.12em; }

.planter-inventory-panel,
.planter-preview-panel {
  background: rgba(5, 10, 21, 0.48);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
  padding: 13px;
}

.planter-panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-bottom: 10px;
}

.planter-panel-heading h3 { margin: 2px 0 0; color: #fff8df; font-size: 0.94rem; }
.preview-caption { color: #607f84; font-size: 0.65rem; letter-spacing: 0.05em; }

.seed-list { display: flex; flex-wrap: wrap; gap: 6px; }
.seed-chip {
  border-radius: 999px;
  background: rgba(111, 255, 224, 0.09);
  color: #dffef8;
  font-size: 0.73rem;
  padding: 5px 8px;
}

.flower-dex-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.flower-preview-card {
  position: relative;
  display: grid;
  grid-template-rows: 76px auto;
  min-width: 0;
  overflow: hidden;
  background: linear-gradient(155deg, rgba(20, 34, 52, 0.78), rgba(6, 10, 20, 0.9));
}

.flower-preview-card img {
  width: 100%;
  height: 76px;
  object-fit: contain;
  background: rgba(2, 6, 14, 0.38);
  filter: drop-shadow(0 0 8px rgba(111, 255, 224, 0.12));
}

.flower-preview-card span {
  overflow: hidden;
  color: #d7e9e3;
  font-size: 0.62rem;
  padding: 6px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flower-preview-card.is-undiscovered img {
  filter: brightness(0) opacity(0.28) drop-shadow(0 0 8px rgba(111, 255, 224, 0.13));
}

.flower-preview-card.is-undiscovered span { color: #6f858a; font-size: 0.8rem; letter-spacing: 0.08em; }

.planter-confetti {
  position: absolute;
  z-index: 3;
  width: 7px;
  height: 12px;
  border-radius: 2px;
  background: var(--piece-color, #6fffe0);
  animation: planter-confetti 1.5s ease-out forwards;
}

@keyframes planter-confetti {
  to { transform: translate(var(--x), 150px) rotate(240deg); opacity: 0; }
}

/* 花図鑑: 真夜中の展示棚を思わせる落ち着いたモーダル。 */
.flower-dex-dialog {
  width: min(920px, calc(100% - 28px));
  max-height: min(780px, calc(100vh - 28px));
  border: 1px solid rgba(111, 255, 224, 0.28);
  border-radius: 12px;
  color: #effffb;
  background: #070d1c;
  padding: 0;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.72), 0 0 32px rgba(75, 230, 211, 0.08);
}

.flower-dex-dialog::backdrop { background: rgba(1, 3, 10, 0.82); backdrop-filter: blur(5px); }
.flower-dex-shell { padding: clamp(16px, 3vw, 28px); }
.flower-dex-header { display: flex; justify-content: space-between; gap: 18px; align-items: start; margin-bottom: 20px; }
.flower-dex-header h3 { margin: 5px 0; color: #fff8df; font-size: 1.7rem; }
.flower-dex-header p { margin: 0; color: #9ec4cf; }
.flower-dex-header-actions { display: flex; gap: 10px; align-items: center; }
.flower-dex-header-actions strong { color: #6fffe0; white-space: nowrap; font-size: 1.05rem; }

.flower-dex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  overflow-y: auto;
  max-height: calc(100vh - 190px);
  padding: 2px;
}

.flower-dex-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(127, 255, 220, 0.14);
  border-radius: 10px;
  background: linear-gradient(155deg, rgba(21, 34, 57, 0.9), rgba(6, 10, 21, 0.96));
  padding: 12px;
}

.flower-dex-card h4 { margin: 10px 0 5px; color: #fff8df; font-size: 0.98rem; }
.flower-dex-card p { margin: 0; color: #a9c6c5; font-size: 0.79rem; line-height: 1.55; }
.flower-dex-image-wrap { position: relative; height: 150px; border-radius: 8px; background: rgba(2, 7, 16, 0.7); }
.flower-dex-image { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 11px rgba(111, 255, 224, 0.18)); }

/* 未発見画像は10段階目画像をシルエット化して正体を隠す。 */
.flower-dex-card.is-undiscovered .flower-dex-image {
  filter: brightness(0) opacity(0.34) drop-shadow(0 0 8px rgba(111, 255, 224, 0.16));
}
.flower-dex-card.is-undiscovered { background: linear-gradient(155deg, #0b1020, #050812); }
.flower-dex-card.is-undiscovered h4 { color: #819295; letter-spacing: 0.12em; }

.flower-new-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 1px solid rgba(255, 230, 128, 0.55);
  border-radius: 999px;
  color: #fff1a8;
  background: rgba(87, 55, 15, 0.92);
  padding: 4px 7px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.flower-dex-card.is-new { animation: dex-new-glow 1.8s ease-in-out infinite alternate; }
@keyframes dex-new-glow { to { border-color: rgba(255, 230, 128, 0.58); box-shadow: 0 0 18px rgba(255, 213, 95, 0.12); } }

.new-flower-notice {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  border: 1px solid rgba(255, 230, 128, 0.45);
  border-radius: 999px;
  color: #fff8cf;
  background: rgba(12, 18, 31, 0.96);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 18px rgba(255, 222, 110, 0.1);
  padding: 10px 16px;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}
.new-flower-notice.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .planter-widget { grid-template-columns: 1fr; }
  .planter-card { grid-template-rows: minmax(340px, auto) auto auto; }
  .planter-side { grid-template-rows: auto; }
}

@media (max-width: 620px) {
  .planter-widget { padding: 11px; border-radius: 10px; }
  .planter-card { grid-template-rows: minmax(300px, auto) auto auto; }
  .planter-scene { min-height: 300px; }
  .plant-illustration { width: min(82%, 280px); }
  .planter-status { grid-template-columns: 1fr; gap: 7px; }
  .planter-actions { grid-template-columns: 1fr; }
  .seed-row { grid-template-columns: minmax(0, 1fr) 112px; }
  .water-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .planter-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .flower-dex-header { display: grid; }
  .flower-dex-header-actions { justify-content: space-between; }
  .flower-dex-header-actions button { width: auto; }
  .flower-dex-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flower-dex-image-wrap { height: 120px; }
}

@media (max-width: 420px) {
  .seed-row { grid-template-columns: 1fr; }
  .planter-widget select,
  .planter-widget button { width: 100%; }
  .flower-dex-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flower-preview-card { grid-template-rows: 88px auto; }
  .flower-preview-card img { height: 88px; }
  .scene-watering-can,
  .scene-seed-bag { opacity: 0.38; }
}
