:root {
  --bg: #e7f0fb;
  --card: rgba(255, 255, 255, 0.76);
  --line: rgba(26, 73, 124, 0.14);
  --text: #17365a;
  --muted: #597590;
  --green: #1d6eb6;
  --green-dark: #134d82;
  --lime: #d7ff67;
  --shadow: 0 18px 42px rgba(22, 55, 96, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(215, 255, 103, 0.18), transparent 24%),
    radial-gradient(circle at top right, rgba(29, 110, 182, 0.18), transparent 28%),
    linear-gradient(180deg, #f7fbff 0%, var(--bg) 100%);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
}

.page-shell {
  width: min(1280px, calc(100% - 32px));
  margin: 20px auto 40px;
  display: grid;
  gap: 18px;
}

.hero,
.filter-panel,
.results-panel,
.result-card,
.type-description-card,
.tag,
.shop-card,
.image-slot-card {
  background: var(--card);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero {
  border-radius: 30px;
  padding: 26px;
}

.type-description-card {
  border-radius: 22px;
  padding: 18px 20px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(235, 244, 255, 0.96), rgba(255, 255, 255, 0.86));
}

.admin-code-block {
  margin: 12px 0 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(10, 34, 56, 0.92);
  color: #eef6ff;
  overflow-x: auto;
}

.admin-code-block code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92rem;
  line-height: 1.55;
}

.hero-heading-row,
.hero-utility,
.results-header,
.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.compact-section-header {
  margin-top: 18px;
}

.hero-heading-copy {
  max-width: 820px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-mark {
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--green);
}

.brand-domain {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #8fd645;
  text-transform: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 10px;
  font-size: clamp(1.9rem, 3vw, 3rem);
  line-height: 1.08;
}

.hero-copy {
  margin-top: 12px;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.55;
}

.hero-actions,
.utility-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.type-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.type-chip {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(19, 77, 130, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--green-dark);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.type-chip.is-active {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #ffffff;
  border-color: transparent;
}

.hero-search-row {
  margin-top: 14px;
}

.string-search-input {
  width: min(560px, 100%);
}

.hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
}

.hero-button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.secondary-hero-link,
.utility-link {
  background: linear-gradient(135deg, #d7edbf, #b8d98d);
  color: var(--green-dark);
}

.hero-link.is-active {
  background: linear-gradient(135deg, #0f6d4c, #0a4d36);
  color: #ffffff;
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(280px, 330px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.filter-panel,
.results-panel {
  border-radius: 26px;
  padding: 20px;
}

.panel-header h2,
.results-header h2 {
  font-size: 1.45rem;
}

.secondary-button {
  border: 1px solid rgba(19, 77, 130, 0.18);
  background: rgba(255, 255, 255, 0.88);
  color: var(--green-dark);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
}

.filter-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 0.92rem;
  font-weight: 700;
}

.field-note {
  margin-top: 4px;
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.35;
}

.field select,
.search-input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(19, 77, 130, 0.16);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  font: inherit;
}

.player-filter-select {
  background: linear-gradient(180deg, #f8fbff 0%, #eef6ff 100%);
  border-color: rgba(19, 77, 130, 0.22);
}

.results-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.results-count {
  color: var(--muted);
  font-weight: 700;
}

.results-meta-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #d7edbf, #b8d98d);
  color: var(--green-dark);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.results-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.standalone-panel {
  padding-top: 22px;
}

.result-card,
.shop-card {
  border-radius: 22px;
  overflow: hidden;
}

.result-card {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 14px;
}

.plant-image {
  min-height: 170px;
  background: rgba(218, 232, 247, 0.8);
}

.plant-image img {
  display: block;
  width: 100%;
  height: 170px;
  object-fit: cover;
}

.result-content,
.shop-card {
  padding: 16px;
}

.result-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.result-title h3 {
  font-size: 1.12rem;
}

.latin-name {
  margin-top: 4px;
  color: var(--muted);
  font-style: italic;
  font-size: 0.92rem;
}

.score-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 12px;
  color: white;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  font-weight: 800;
}

.score-pill small {
  font-size: 0.72rem;
  opacity: 0.84;
}

.summary-copy,
.summary-note {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.summary-note {
  font-size: 0.92rem;
}

.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.83rem;
  box-shadow: none;
}

.tag strong {
  color: var(--green-dark);
}

.pro-player-panel {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(221, 238, 255, 0.92), rgba(206, 229, 252, 0.92));
  border: 1px solid rgba(88, 137, 196, 0.22);
}

.pro-player-tag {
  padding: 9px 11px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: #24486b;
  font-size: 0.88rem;
  line-height: 1.4;
}

.pro-player-tag strong {
  color: #163a5f;
}

.pro-tension-box {
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  color: #23415c;
}

.pro-tension-box strong {
  display: block;
  margin-bottom: 8px;
  color: #153856;
}

.pro-tension-list {
  display: grid;
  gap: 8px;
}

.pro-tension-item {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(216, 233, 250, 0.6);
}

.pro-tension-player {
  font-weight: 700;
  color: #173d63;
}

.pro-tension-detail {
  font-size: 0.82rem;
  color: #4b6681;
}

.pro-tension-value {
  font-size: 0.88rem;
  font-weight: 700;
  color: #123757;
}

.empty-state {
  border-radius: 24px;
  padding: 30px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.8);
  border: 1px dashed rgba(19, 77, 130, 0.18);
}

.hero-search-control {
  width: min(340px, 100%);
}

.shop-card h3 {
  font-size: 1.05rem;
}

.shop-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.94rem;
}

.shop-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.shop-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, #d6a735, #a77b1d);
  text-decoration: none;
  font-weight: 700;
}

.library-note-card {
  margin-top: 14px;
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(224, 236, 248, 0.9);
  border: 1px solid rgba(19, 77, 130, 0.1);
  color: var(--muted);
}

.image-library-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.library-search-input {
  width: min(420px, 100%);
}

.image-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.image-slot-card {
  display: grid;
  gap: 10px;
  border-radius: 20px;
  padding: 14px;
}

.image-slot-card.is-selected {
  box-shadow: 0 0 0 2px rgba(18, 79, 57, 0.3);
  transform: translateY(-1px);
}

.image-slot-header h3 {
  font-size: 1rem;
}

.image-slot-file {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.image-dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  border-radius: 18px;
  border: 1px dashed rgba(19, 77, 130, 0.24);
  background: rgba(224, 236, 248, 0.75);
  overflow: hidden;
  cursor: pointer;
  caret-color: transparent;
  outline: none;
}

.image-dropzone.dragging,
.image-dropzone:focus {
  border-color: rgba(215, 255, 103, 0.9);
}

.image-slot-placeholder {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  padding: 0 14px;
}

.image-slot-preview {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.image-slot-input {
  display: none;
}

.image-slot-actions {
  display: flex;
  justify-content: flex-end;
}

.compact-button {
  min-height: 32px;
  padding: 6px 12px;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
}

.result-buy-link {
  margin-left: auto;
}

.result-actions .result-buy-link,
.result-actions .amazon-buy-button {
  background: linear-gradient(135deg, #8fd645, #5fae2d);
  border-color: rgba(66, 125, 28, 0.28);
  color: #113216;
}

.official-brand-button {
  background: linear-gradient(135deg, #f3f5f7, #dde3e8);
  border-color: rgba(130, 145, 160, 0.26);
  color: #44515d;
  font-size: 0.84rem;
  font-weight: 500;
}

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

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 18px, 100%);
  }

  .hero,
  .filter-panel,
  .results-panel {
    padding: 16px;
  }

  .hero-heading-row,
  .hero-utility,
  .results-header,
  .panel-header,
  .result-top {
    flex-direction: column;
  }

  .result-card {
    grid-template-columns: 1fr;
  }

  .result-content {
    padding: 0 14px 14px;
  }

  .results-meta {
    justify-content: flex-start;
  }
}
