/* Google Fonts loaded via <link> in HTML for non-blocking render */

:root {
  color-scheme: only light;
  --bg-fallback: #16081f;

  --ink: #18132a;

  --accent: #7c3aed;
  --accent-strong: #3b1c6e;
  --accent-soft: rgba(124, 58, 237, 0.13);
  --soft-shadow: 0 2px 8px rgba(16, 8, 38, 0.10), 0 6px 18px rgba(16, 8, 38, 0.12);

  --panel-radius: clamp(22px, 3vw, 28px);
  --panel-radius-mobile: 20px;
  --panel-padding: clamp(13px, 2.2vw, 20px);
  --panel-border: rgba(255, 255, 255, 0.22);
  --panel-bg-top: rgba(255, 255, 255, 0.82);
  --panel-bg-bottom: rgba(249, 245, 255, 0.74);
  --panel-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 6px 16px rgba(17, 7, 29, 0.12),
    0 18px 38px rgba(17, 7, 29, 0.16);
  --panel-solid-bg: #efe8f5;
  --field-shell-bg: #ede5f4;
  --field-shell-bg-strong: #f6f2fa;
  --control-solid-bg: #f8fbff;
  --control-panel-bg: #fafcff;
  --chrome-surface-bg: rgba(48, 33, 70, 0.68);
  --chrome-surface-bg-strong: rgba(64, 45, 91, 0.82);
  --chrome-surface-border: rgba(238, 226, 251, 0.18);
  --scrollbar-thumb: rgba(120, 102, 160, 0.6);

  /* Unified UI fills */
  --ui-card-border: rgba(86, 112, 138, 0.2);
  --ui-card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(246, 251, 255, 0.93));
  --ui-card-shadow: 0 6px 14px rgba(21, 43, 66, 0.08);
  --ui-item-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.93), rgba(246, 250, 254, 0.9));
  --ui-item-border: rgba(86, 112, 138, 0.14);

  /* Recipe hierarchy (primary focus) */
  --recipe-card-border: rgba(63, 108, 149, 0.34);
  --recipe-card-bg: linear-gradient(180deg, rgba(250, 253, 255, 0.99), rgba(240, 248, 255, 0.97));
  --recipe-card-shadow: 0 12px 28px rgba(21, 43, 66, 0.14);
  --recipe-row-border: rgba(68, 113, 155, 0.34);
  --recipe-row-bg: linear-gradient(180deg, rgba(242, 249, 255, 0.99), rgba(232, 243, 253, 0.96));
  --recipe-row-shadow: 0 7px 16px rgba(20, 45, 72, 0.11);
  --recipe-row-hover-border: rgba(55, 100, 143, 0.52);
  --recipe-row-hover-shadow: 0 12px 24px rgba(20, 45, 72, 0.16);
  --recipe-value-bg: rgba(71, 130, 184, 0.17);
  --recipe-value-border: rgba(59, 116, 168, 0.4);
  --recipe-value-text: #234f78;

  /* Typography */
  --font-ui: "Manrope", "Noto Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Manrope", "Noto Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --text-2xs: clamp(0.72rem, 0.9vw, 0.8rem);
  --text-xs: clamp(0.82rem, 1.2vw, 0.92rem);
  --text-sm: clamp(0.9rem, 1.4vw, 1.0rem);
  --text-md: clamp(0.98rem, 1.6vw, 1.1rem);
  --text-lg: clamp(1.08rem, 1.9vw, 1.22rem);
  --text-xl: clamp(1.24rem, 2.2vw, 1.52rem);
  --hero-control-height: 36px;
  --hero-control-padding-x: 12px;
}

* {
  box-sizing: border-box;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-ui);
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
  height: 100%;
  background-color: var(--bg-fallback);
  overscroll-behavior-x: none;
  overscroll-behavior-y: contain;
  overflow-x: clip;
  -ms-overflow-style: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  background: transparent;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: transparent;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(205, 186, 236, 0.72), rgba(130, 148, 196, 0.64));
  background-clip: padding-box;
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(220, 202, 245, 0.88), rgba(140, 160, 210, 0.8));
  background-clip: padding-box;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-ui);
  font-size: var(--text-md);
  line-height: 1.58;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color: var(--ink);
  background: transparent;
  padding:
    max(14px, env(safe-area-inset-top))
    clamp(12px, 3vw, 24px)
    max(120px, calc(env(safe-area-inset-bottom) + 100px));
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

body.member-modal-open {
  overflow: hidden;
  position: fixed;
  inset: 0;
  width: 100%;
  top: calc(-1 * var(--member-modal-scroll-y, 0px));
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: linear-gradient(
    155deg,
    #16081f 0%,
    #2a0b39 28%,
    #5a1b72 56%,
    #9a2f88 78%,
    #d34f75 100%
  );
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 68% 50% at 12% 90%, rgba(255, 123, 76, 0.2) 0%, transparent 72%),
    radial-gradient(ellipse 54% 40% at 88% 8%, rgba(193, 53, 132, 0.24) 0%, transparent 67%);
}

.bg-shape {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  z-index: -1;
  will-change: transform;
  /* Kendi compositor katmanına al, sayfanın geri kalanını etkilemesin */
  isolation: isolate;
  contain: layout style;
  animation-fill-mode: both;
}

.bg-shape-a {
  width: 520px;
  height: 520px;
  top: -220px;
  right: -190px;
  background: radial-gradient(
    circle at 35% 35%,
    rgba(202, 78, 152, 0.28) 0%,
    transparent 65%
  );
  filter: blur(8px);
  transform: translate3d(0, 0, 0) scale(1);
  animation: bg-shape-drift-a 38s ease-in-out infinite;
}

.bg-shape-b {
  width: 430px;
  height: 430px;
  bottom: -200px;
  left: -160px;
  background: radial-gradient(
    circle at 55% 45%,
    rgba(255, 138, 72, 0.24) 0%,
    transparent 60%
  );
  filter: blur(10px);
  transform: translate3d(0, 0, 0) scale(1);
  animation: bg-shape-drift-b 46s ease-in-out infinite;
  animation-delay: -7s;
}

@keyframes bg-shape-drift-a {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  34% {
    transform: translate3d(-24px, 16px, 0) scale(1.03);
  }
  68% {
    transform: translate3d(20px, -14px, 0) scale(0.985);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1.008);
  }
}

@keyframes bg-shape-drift-b {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  30% {
    transform: translate3d(18px, -20px, 0) scale(1.024);
  }
  72% {
    transform: translate3d(-22px, 18px, 0) scale(0.982);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1.008);
  }
}

.pull-refresh {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  left: 50%;
  transform: translate(-50%, -130%);
  z-index: 8;
  pointer-events: none;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(86, 168, 181, 0.30);
  background: rgba(14, 12, 32, 0.82);
  backdrop-filter: blur(10px);
  color: rgba(220, 210, 240, 0.88);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.03em;
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease, background-color 0.2s ease;
}

.pull-refresh.visible {
  opacity: 1;
}

.pull-refresh.ready {
  background: rgba(80, 30, 160, 0.88);
  border-color: rgba(124, 58, 237, 0.42);
}

.scroll-indicator {
  display: none;
}

body.member-modal-open .scroll-indicator {
  opacity: 0;
}

@media (hover: none), (pointer: coarse) {
  .scroll-indicator {
    position: fixed;
    top: max(88px, calc(env(safe-area-inset-top) + 72px));
    right: max(4px, calc(env(safe-area-inset-right) + 4px));
    bottom: max(24px, calc(env(safe-area-inset-bottom) + 24px));
    z-index: 92;
    display: block;
    width: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.2),
      0 6px 18px rgba(18, 7, 29, 0.18);
    pointer-events: none;
    opacity: 0.78;
    transition: opacity 0.22s ease, transform 0.22s ease;
  }

  .scroll-indicator.is-hidden {
    opacity: 0;
    transform: scaleY(0.92);
  }

  .scroll-indicator-thumb {
    position: absolute;
    left: 1px;
    width: 4px;
    min-height: 34px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(228, 214, 248, 0.92), rgba(129, 153, 211, 0.88));
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.14),
      0 6px 14px rgba(16, 7, 28, 0.22);
    transform: translateY(0);
    transition: transform 0.14s ease-out, height 0.18s ease-out;
  }
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 18, 30, 0.38);
  backdrop-filter: blur(3px) saturate(1.08);
  -webkit-backdrop-filter: blur(3px) saturate(1.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0s linear 0.22s;
}

.loading-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.loading-overlay-card {
  width: fit-content;
  min-width: 210px;
  max-width: min(340px, calc(100vw - 28px));
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(147, 181, 212, 0.42);
  background: linear-gradient(180deg, rgba(243, 250, 255, 0.97), rgba(232, 244, 253, 0.95));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 26px rgba(8, 18, 30, 0.3);
}

.loading-spinner {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(63, 128, 187, 0.32);
  border-top-color: rgba(39, 98, 150, 0.95);
  animation: status-spin 0.78s linear infinite;
  flex: 0 0 auto;
}

.loading-overlay-text {
  margin: 0;
  color: #244d73;
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
  min-height: calc(100vh - 68px);
  min-height: calc(100dvh - 68px);
  display: grid;
  /* Mobilde icerik azsa satirlari ekran boyuna yayma */
  grid-auto-rows: max-content;
  align-content: start;
  gap: clamp(12px, 2.1vw, 18px);
  animation: rise-in 0.5s cubic-bezier(0.22, 0.68, 0, 1.05);
}

.hero {
  padding: clamp(10px, 1.6vw, 16px) 0 4px;
  display: grid;
  gap: 2px;
  position: relative;
  max-width: 100%;
}

.hero-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  background-color: var(--chrome-surface-bg);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--chrome-surface-border);
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 8px 22px rgba(17, 6, 30, 0.16);
  position: sticky;
  top: 0;
  z-index: 50;
  margin-left: auto;
  align-self: start;
  /* Sticky + backdrop-filter: GPU compositor katmanına zorla,
     scroll sırasında layout thrash önle */
  will-change: transform;
}

.hero-actions {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 8px;
}

.hero-actions .lang-switch,
.hero-actions .member-access-btn {
  flex: 0 1 auto;
}

.hero-trust {
  margin: 4px 0 0;
  padding: 7px 12px 7px 9px;
  align-self: start;
  max-width: min(100%, 560px);
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border: 1px solid rgba(238, 226, 251, 0.14);
  border-radius: 999px;
  background-color: rgba(60, 40, 84, 0.58);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 8px 18px rgba(18, 6, 30, 0.11);
  color: rgba(244, 238, 249, 0.7);
  line-height: 1.3;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hero-trust-mark {
  width: 36px;
  height: 32px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 12px;
  background: none;
  box-shadow: none;
}

.hero-trust-logo {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
  opacity: 0.45;
}

.hero-trust-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.hero-trust-title {
  color: rgba(251, 247, 255, 0.72);
  font-size: calc(var(--text-2xs) * 0.9);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.15;
  white-space: nowrap;
}

.hero-trust-text {
  color: rgba(239, 231, 247, 0.6);
  font-size: calc(var(--text-2xs) * 0.95);
  font-weight: 500;
  letter-spacing: 0.005em;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.hero-trust-install {
  margin-left: auto;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid rgba(236, 219, 255, 0.3);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(249, 242, 255, 0.92);
  font-size: calc(var(--text-2xs) * 0.96);
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.16s ease;
}

.hero-trust-install:hover {
  color: rgba(255, 250, 255, 0.98);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 230, 178, 0.26);
  transform: translateY(-1px);
}

.hero-trust-install:active {
  transform: translateY(0);
}

.hero-trust-notice {
  flex-basis: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(196, 217, 255, 0.16);
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)),
    linear-gradient(135deg, rgba(88, 122, 201, 0.14), rgba(120, 99, 188, 0.08));
  color: rgba(243, 247, 255, 0.84);
  font-size: calc(var(--text-2xs) * 0.95);
  font-weight: 600;
  line-height: 1.45;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.member-access-btn {
  border: 1px solid rgba(236, 219, 255, 0.26);
  border-radius: 999px;
  background-color: var(--chrome-surface-bg-strong);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 6px 14px rgba(17, 6, 30, 0.14);
  color: rgba(255, 246, 255, 0.92);
  min-height: var(--hero-control-height);
  padding: 6px var(--hero-control-padding-x);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, transform 0.16s ease, box-shadow 0.35s ease;
}

.member-access-btn:active {
  transition: box-shadow 0s, transform 0.16s ease;
  box-shadow: inset 0 0 0 9999px rgba(255, 255, 255, 0.12);
}

.member-access-btn:hover {
  color: #ffffff;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
  transform: translateY(-1px);
}

.member-access-btn.is-member {
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  line-height: 1;
}

.lang-switch {
  display: block;
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.hero-actions .lang-switch {
  margin-left: 0;
}

.lang-switch::after {
  content: none;
}

.lang-switch .animated-select {
  min-width: 0;
  width: auto;
  max-width: 100%;
}

.lang-switch .custom-select-trigger {
  position: relative;
  width: auto;
  min-height: var(--hero-control-height);
  border-radius: 999px;
  border: 1px solid rgba(236, 219, 255, 0.26);
  background-color: var(--chrome-surface-bg-strong);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  padding: 6px var(--hero-control-padding-x);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 6px 14px rgba(17, 6, 30, 0.16);
}

.lang-switch .custom-select-trigger:hover {
  border-color: rgba(238, 220, 255, 0.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.44),
    0 10px 20px rgba(18, 6, 30, 0.3);
}

.lang-switch .custom-select-trigger:focus-visible {
  border-color: rgba(200, 156, 255, 0.84);
  box-shadow:
    0 0 0 3px rgba(155, 88, 232, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    0 8px 18px rgba(18, 6, 30, 0.28);
}

.lang-switch .custom-select-value {
  color: rgba(252, 245, 255, 0.96);
  font-size: 0.73rem;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

.lang-switch .custom-select-panel {
  left: auto;
  right: 0;
  width: max-content;
  min-width: 100%;
  max-width: min(220px, 90vw);
  border-radius: 14px;
  border: 1px solid rgba(75, 36, 105, 0.2);
  background-color: var(--control-panel-bg);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 245, 253, 0.9));
  box-shadow: 0 16px 30px rgba(31, 12, 48, 0.26);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.lang-switch .custom-option {
  text-align: left;
  white-space: nowrap;
  font-weight: 600;
  color: var(--ink);
  font-family: "Manrope", "Noto Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}

.lang-switch .custom-option[lang="zh"] {
  font-weight: 500;
  letter-spacing: 0;
}

.lang-switch .custom-option + .custom-option {
  border-top: 1px solid rgba(49, 14, 64, 0.08);
}

.lang-switch .custom-option:hover {
  background: rgba(143, 47, 186, 0.1);
  color: var(--ink);
}

.lang-switch .custom-option.active {
  background: linear-gradient(140deg, rgba(143, 47, 186, 0.18), rgba(124, 181, 186, 0.2));
  color: var(--accent-strong);
}

.lang-switch .custom-option:disabled {
  color: #8b949b;
}

.lang-select {
  border: 1px solid rgba(236, 219, 255, 0.26);
  border-radius: 999px;
  background-color: var(--chrome-surface-bg-strong);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  color: #fff6ff;
  min-width: 0;
  padding: 5px 10px;
  font-size: var(--text-2xs);
  font-weight: 700;
  line-height: 1.2;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.lang-select option {
  color: #24153f;
}

html[dir="rtl"] .hero-top {
  flex-direction: row-reverse;
}

html[dir="rtl"] .lang-switch {
  margin-left: 0;
  margin-right: auto;
}


html[dir="rtl"] .hero-trust {
  padding: 10px 12px 10px 14px;
  flex-direction: row-reverse;
}

html[dir="rtl"] .lang-switch .custom-select-trigger {
  padding: 7px 11px;
}

html[dir="rtl"] .lang-switch .custom-select-value {
  text-align: right;
}


html[dir="rtl"] .lang-switch .custom-option {
  text-align: right;
}

html[dir="rtl"] .lang-select {
  padding: 7px 11px 7px 28px;
}

.member-modal {
  position: fixed;
  inset: 0;
  z-index: 135;
  display: grid;
  place-items: center;
  padding: 16px;
}

.member-modal-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  margin: 0;
  padding: 0;
  background: rgba(14, 7, 24, 0.52);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.member-modal-card {
  position: relative;
  z-index: 1;
  width: min(640px, calc(100vw - 24px));
  border-radius: 18px;
  border: 1px solid rgba(240, 207, 174, 0.45);
  background: linear-gradient(168deg, rgba(255, 249, 240, 0.97), rgba(255, 243, 231, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 22px 44px rgba(16, 6, 22, 0.36);
  padding: 18px;
  display: grid;
  gap: 12px;
}

.member-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(147, 95, 49, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: #6f4023;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.member-modal-close:hover {
  background: rgba(255, 255, 255, 0.94);
}

html[dir="rtl"] .member-modal-close {
  right: auto;
  left: 10px;
}

.member-auth-switch {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(166, 114, 64, 0.26);
  background: rgba(255, 246, 235, 0.66);
  width: fit-content;
}

.member-mode-btn {
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #7a4b23;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 6px 12px;
  min-height: 34px;
  cursor: pointer;
}

.member-mode-btn.is-active {
  border-color: rgba(155, 92, 36, 0.3);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 239, 220, 0.84));
  color: #5b2f12;
}

.member-form {
  display: grid;
  gap: 12px;
}

.member-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 11px;
}

.member-grid-single {
  grid-template-columns: 1fr;
}

.member-field {
  display: grid;
  gap: 5px;
}

.member-field-label {
  font-size: var(--text-xs);
  font-weight: 700;
  color: #76512c;
  letter-spacing: 0.03em;
}

.member-input {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(178, 136, 85, 0.35);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 248, 241, 0.95));
  color: #2b190c;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 10px 11px;
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 4px 10px rgba(89, 52, 17, 0.08);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.member-input::placeholder {
  color: rgba(83, 56, 30, 0.56);
}

.member-input:focus-visible {
  border-color: rgba(203, 119, 30, 0.62);
  box-shadow:
    0 0 0 3px rgba(232, 144, 49, 0.18),
    0 7px 14px rgba(89, 52, 17, 0.12);
}

.member-form-hint {
  margin: -2px 0 0;
  color: #7f5b36;
  font-size: var(--text-2xs);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.01em;
}

.member-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.member-register-btn {
  border: none;
  border-radius: 12px;
  padding: 11px 18px;
  min-height: 44px;
  background: linear-gradient(160deg, #b15a1a 0%, #8f3c09 68%, #763108 100%);
  color: #fffdf8;
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 235, 214, 0.3),
    0 10px 20px rgba(88, 39, 12, 0.24);
  transition: transform 0.16s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.member-register-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow:
    inset 0 1px 0 rgba(255, 235, 214, 0.34),
    0 13px 24px rgba(88, 39, 12, 0.3);
}

.member-register-btn:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.member-secondary-btn,
.member-forget-btn {
  border: 1px solid rgba(147, 95, 49, 0.36);
  border-radius: 12px;
  min-height: 44px;
  padding: 10px 15px;
  background: rgba(255, 249, 240, 0.84);
  color: #734426;
  font-size: var(--text-xs);
  font-weight: 700;
  cursor: pointer;
}

.member-secondary-btn:hover,
.member-forget-btn:hover {
  border-color: rgba(137, 78, 29, 0.52);
  background: rgba(255, 247, 235, 0.96);
}

.member-form-message {
  margin: 0;
  min-height: 1.15em;
  color: #7a4c27;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.member-form-message.is-error {
  color: #9b1e1e;
}

.member-form-message.is-success {
  color: #1f6f3d;
}

.member-summary {
  display: grid;
  gap: 8px;
  margin-top: 0;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(217, 159, 100, 0.36);
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.9), rgba(255, 246, 234, 0.84));
}

.member-welcome {
  margin: 0;
  color: #3e230c;
  font-size: var(--text-md);
  font-weight: 800;
}

.member-badge-line {
  margin: 0;
  color: #91572b;
  font-size: var(--text-xs);
  font-weight: 700;
}

.member-summary-meta {
  margin: 0;
  color: #765438;
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.panel {
  background-color: var(--panel-solid-bg);
  background-image: linear-gradient(168deg, var(--panel-bg-top), var(--panel-bg-bottom));
  border: 1px solid var(--panel-border);
  border-radius: var(--panel-radius);
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(14px) saturate(1.12);
  -webkit-backdrop-filter: blur(14px) saturate(1.12);
  padding: var(--panel-padding);
  max-width: 100%;
  min-width: 0;
}

.input-panel {
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 14px;
  position: relative;
  isolation: isolate;
  z-index: 5;
  overflow: visible;
  min-width: 0;
  width: 100%;
  padding: clamp(16px, 2.8vw, 26px);
  border-radius: clamp(22px, 3vw, 28px);
  border-color: rgba(242, 236, 248, 0.24);
  background-color: var(--field-shell-bg-strong);
  background-image:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 36%),
    linear-gradient(
      156deg,
      #f4eff8 0%,
      #ede9f4 46%,
      #e6eef6 100%
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 251, 255, 0.95),
    0 14px 34px rgba(17, 7, 29, 0.15),
    0 28px 54px rgba(17, 7, 29, 0.13);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
}

.input-panel:focus-within {
  z-index: 60;
}

.field {
  display: grid;
  gap: 0;
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 100%;
}

.field:focus-within {
  z-index: 20;
}

/* Plant + phase selectors: shared, clean and low-fatigue */
.plant-field,
.phase-field {
  padding: 10px;
  position: relative;
  min-height: 100%;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background-color: var(--field-shell-bg);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.26));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 8px 18px rgba(25, 20, 44, 0.08);
}

.plant-field .animated-select .custom-select-trigger,
.phase-field .animated-select .custom-select-trigger {
  min-height: 64px;
  padding: 21px 46px 12px 14px;
  position: relative;
  border-color: rgba(82, 99, 124, 0.3);
  background-color: var(--control-solid-bg);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 253, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 4px 12px rgba(20, 34, 52, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.plant-field .animated-select .custom-select-trigger:hover,
.phase-field .animated-select .custom-select-trigger:hover {
  border-color: rgba(72, 101, 138, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 6px 14px rgba(19, 33, 52, 0.11);
  transform: translateY(-1px);
}

.plant-field .animated-select .custom-select-trigger::before,
.phase-field .animated-select .custom-select-trigger::before {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(64, 79, 102, 0.82);
  border-bottom: 2px solid rgba(64, 79, 102, 0.82);
  transform: translateY(-60%) rotate(45deg);
  pointer-events: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.plant-field .animated-select .custom-select-trigger::after,
.phase-field .animated-select .custom-select-trigger::after {
  content: attr(data-field-label);
  position: absolute;
  top: 8px;
  left: 14px;
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: 0.09em;
  color: rgba(77, 91, 113, 0.82);
}

.plant-field .animated-select .custom-select-value,
.phase-field .animated-select .custom-select-value {
  color: #24384f;
  font-weight: 600;
  letter-spacing: 0;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.3;
}

.plant-field .animated-select.open .custom-select-trigger {
  border-color: rgba(66, 124, 96, 0.58);
  box-shadow: 0 0 0 4px rgba(75, 150, 110, 0.13), 0 12px 24px rgba(16, 48, 33, 0.15);
  transform: none;
}

.phase-field .animated-select.open .custom-select-trigger {
  border-color: rgba(61, 106, 151, 0.6);
  box-shadow: 0 0 0 4px rgba(81, 136, 184, 0.15), 0 12px 24px rgba(19, 42, 66, 0.16);
  transform: none;
}

.plant-field .animated-select.open .custom-select-trigger::before,
.phase-field .animated-select.open .custom-select-trigger::before {
  transform: translateY(-20%) rotate(-135deg);
}

.plant-field .animated-select.disabled .custom-select-trigger,
.phase-field .animated-select.disabled .custom-select-trigger {
  border-color: rgba(124, 133, 148, 0.24);
  background: linear-gradient(180deg, #f4f6f9, #edf1f5);
  color: #7b8798;
  box-shadow: none;
}

.plant-field .animated-select.disabled .custom-select-trigger::before,
.phase-field .animated-select.disabled .custom-select-trigger::before {
  border-right-color: rgba(126, 136, 150, 0.66);
  border-bottom-color: rgba(126, 136, 150, 0.66);
}

.plant-field .animated-select .custom-select-panel,
.phase-field .animated-select .custom-select-panel {
  border-color: rgba(84, 104, 129, 0.24);
  background-color: var(--control-panel-bg);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 255, 0.92));
  box-shadow: 0 18px 36px rgba(18, 35, 54, 0.17);
}

.plant-field .animated-select .custom-option,
.phase-field .animated-select .custom-option {
  padding: 11px 14px;
}

.plant-field .animated-select .custom-option.active,
.phase-field .animated-select .custom-option.active {
  background: linear-gradient(140deg, rgba(92, 132, 180, 0.16), rgba(140, 174, 210, 0.12));
  color: #1e3a56;
}

select {
  appearance: none;
  border: 1px solid rgba(70, 38, 95, 0.2);
  border-radius: 14px;
  background-color: var(--control-solid-bg);
  background-image: linear-gradient(180deg, #ffffff, #f6f2fb);
  color: var(--ink);
  min-height: 52px;
  padding: 12px 14px;
  font: inherit;
  font-size: var(--text-md);
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px rgba(49, 14, 64, 0.05);
  transition: border-color 0.24s ease, box-shadow 0.24s ease;
}

select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), var(--soft-shadow);
}

select:disabled {
  color: #8a8199;
  background: linear-gradient(180deg, #f6f3fa, #f0edf4);
  box-shadow: none;
}

.native-select {
  display: none;
}

.animated-select {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 100%;
}

.animated-select.open {
  z-index: 30;
}

.custom-select-trigger {
  width: 100%;
  max-width: 100%;
  min-height: 52px;
  border: 1px solid rgba(70, 38, 95, 0.2);
  border-radius: 14px;
  background-color: var(--control-solid-bg);
  background-image: linear-gradient(180deg, #ffffff, #f6f2fb);
  color: var(--ink);
  padding: 12px 14px;
  font: inherit;
  font-size: var(--text-md);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 2px rgba(49, 14, 64, 0.05);
  transition: border-color 0.24s ease, box-shadow 0.35s ease, transform 0.22s ease;
  overflow: hidden;
}

.custom-select-trigger:active:not(:disabled) {
  transition: box-shadow 0s;
  box-shadow: inset 0 0 0 9999px rgba(80, 118, 168, 0.09);
}

.custom-select-trigger:hover {
  border-color: rgba(95, 48, 129, 0.34);
  box-shadow: var(--soft-shadow);
}

.custom-select-trigger:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), var(--soft-shadow);
}

.custom-select-value {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.animated-select.disabled .custom-select-trigger {
  color: #8a8199;
  background: linear-gradient(180deg, #f6f3fa, #f0edf4);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.custom-select-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  z-index: 30;
  border: 1px solid rgba(75, 36, 105, 0.2);
  border-radius: 14px;
  background-color: var(--control-panel-bg);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.93), rgba(250, 248, 255, 0.9));
  box-shadow: 0 18px 42px rgba(31, 12, 48, 0.24);
  backdrop-filter: blur(12px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 148, 200, 0.55) rgba(240, 236, 248, 0.3);
  -ms-overflow-style: auto;
  max-height: 0;
  opacity: 0;
  transform: translateY(-8px) scale(0.985);
  transform-origin: top center;
  pointer-events: none;
  will-change: transform, opacity, max-height;
  transition: max-height 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.22s ease, transform 0.24s ease;
}

.animated-select.open .custom-select-panel {
  max-height: min(340px, 44vh);
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.custom-select-panel::-webkit-scrollbar {
  width: 6px;
}

.custom-select-panel::-webkit-scrollbar-track {
  margin: 8px 0;
  border-radius: 999px;
  background: rgba(240, 236, 248, 0.25);
}

.custom-select-panel::-webkit-scrollbar-thumb {
  border: 1px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(188, 170, 218, 0.72), rgba(148, 130, 182, 0.6));
  background-clip: padding-box;
}

.custom-select-panel::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(200, 184, 228, 0.88), rgba(160, 142, 196, 0.76));
  background-clip: padding-box;
}

.custom-select-search-wrap {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 10px 8px;
  border-bottom: 1px solid rgba(49, 14, 64, 0.1);
  background: linear-gradient(180deg, rgba(251, 248, 255, 0.98), rgba(248, 245, 253, 0.96));
  backdrop-filter: blur(6px);
}

.custom-select-search-wrap::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 50%;
  width: 11px;
  height: 11px;
  border: 2px solid rgba(86, 62, 112, 0.6);
  border-radius: 50%;
  transform: translateY(-62%);
  pointer-events: none;
}

.custom-select-search-wrap::after {
  content: "";
  position: absolute;
  left: 31px;
  top: calc(50% + 4px);
  width: 7px;
  height: 2px;
  border-radius: 999px;
  background: rgba(86, 62, 112, 0.62);
  transform: rotate(45deg);
  transform-origin: left center;
  pointer-events: none;
}

.custom-select-search {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(74, 43, 104, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  color: #2a2940;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 8px 11px 8px 35px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.custom-select-search::placeholder {
  color: #7e7a96;
  font-weight: 500;
}

.custom-select-search:focus {
  border-color: rgba(98, 53, 142, 0.54);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.custom-option {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  text-align: left;
  padding: 10px 14px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.custom-option + .custom-option {
  border-top: 1px solid rgba(49, 14, 64, 0.08);
}

.custom-option:hover {
  background: rgba(143, 47, 186, 0.1);
}

.custom-option:active:not(:disabled) {
  transition: background-color 0s;
  background: rgba(80, 118, 168, 0.13);
}

.custom-option.active {
  background: linear-gradient(140deg, rgba(143, 47, 186, 0.18), rgba(124, 181, 186, 0.2));
  color: var(--accent-strong);
  font-weight: 700;
}

.custom-option:disabled {
  color: #8b949b;
  cursor: not-allowed;
}

.custom-option.custom-option-empty {
  font-size: var(--text-xs);
  font-weight: 600;
  color: #7d8898;
  text-align: center;
  background: rgba(246, 245, 250, 0.8);
}

.custom-select-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 4px;
  padding: 10px;
  border-top: 1px solid rgba(49, 14, 64, 0.08);
  background:
    linear-gradient(180deg, rgba(252, 250, 255, 0.76), rgba(252, 250, 255, 0.98) 26%),
    rgba(252, 250, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 -8px 18px rgba(31, 12, 48, 0.08);
}

.custom-option.custom-option-action {
  margin: 0;
  width: 100%;
  border: 1px solid rgba(102, 61, 141, 0.14);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(250, 246, 255, 0.98), rgba(245, 248, 255, 0.95));
  padding: 10px 11px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 6px 12px rgba(36, 20, 56, 0.06);
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.custom-option.custom-option-action:hover {
  background: linear-gradient(180deg, rgba(252, 248, 255, 1), rgba(239, 246, 255, 0.98));
  border-color: rgba(99, 59, 144, 0.28);
}

.custom-option.custom-option-action:active {
  background: linear-gradient(180deg, rgba(247, 242, 255, 0.98), rgba(235, 243, 252, 0.96));
}

.custom-option-action-copy {
  display: grid;
  gap: 3px;
}

.custom-option-action-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.custom-option-action-title {
  min-width: 0;
  color: #2a3650;
  font-size: var(--text-xs);
  font-weight: 800;
  line-height: 1.25;
}

.custom-option-action-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(109, 58, 181, 0.12);
  color: #5c2fa3;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.custom-option-action-hint {
  color: #617186;
  font-size: calc(var(--text-xs) * 0.94);
  font-weight: 600;
  line-height: 1.35;
}

.calculate-field {
  margin-top: 2px;
}

.calculate-btn {
  width: 100%;
  min-height: 58px;
  border: 1px solid rgba(69, 111, 151, 0.42);
  border-radius: 16px;
  background-color: #edf6fd;
  background-image: linear-gradient(180deg, rgba(242, 250, 255, 0.98), rgba(228, 241, 252, 0.96));
  color: #234767;
  font: inherit;
  font-size: var(--text-md);
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 10px 22px rgba(20, 51, 78, 0.14);
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.35s ease, background-color 0.2s ease, opacity 0.2s ease;
}

.calculate-btn:hover:not(:disabled) {
  border-color: rgba(54, 101, 145, 0.62);
  background: linear-gradient(180deg, rgba(248, 253, 255, 0.99), rgba(234, 246, 255, 0.97));
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    0 12px 22px rgba(18, 46, 72, 0.16);
}

.calculate-btn:active:not(:disabled) {
  transform: translateY(0);
  transition: box-shadow 0s, transform 0.18s ease, border-color 0.2s ease;
  box-shadow: inset 0 0 0 9999px rgba(80, 118, 168, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.calculate-btn:focus-visible {
  outline: none;
  border-color: rgba(48, 105, 151, 0.78);
  box-shadow:
    0 0 0 3px rgba(78, 142, 194, 0.24),
    0 10px 22px rgba(18, 46, 72, 0.16);
}

.calculate-btn:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  border-color: rgba(99, 124, 146, 0.28);
  background: linear-gradient(180deg, rgba(241, 245, 249, 0.96), rgba(231, 236, 242, 0.94));
  color: #607387;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 5px 12px rgba(20, 38, 57, 0.08);
}

/* ── Fertilizer selection panel ── */
.fertilizer-field {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background-color: var(--field-shell-bg);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.26));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 8px 18px rgba(25, 20, 44, 0.08);
  overflow: hidden;
}

.fertilizer-panel-header {
  display: flex;
  align-items: center;
  padding: 12px 42px 10px 14px;
  cursor: pointer;
  user-select: none;
  gap: 8px;
  position: relative;
}

.fertilizer-panel-header::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(64, 79, 102, 0.82);
  border-bottom: 2px solid rgba(64, 79, 102, 0.82);
  transform: translateY(-60%) rotate(45deg);
  pointer-events: none;
  transition: transform 0.2s ease;
}

.fertilizer-panel-header.is-open::after {
  transform: translateY(-20%) rotate(-135deg);
}

.fertilizer-panel-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  color: #3a4a5c;
  letter-spacing: 0.05em;
}

.fertilizer-panel-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
  border-top: 0 solid rgba(90, 110, 140, 0.1);
}

.fertilizer-panel-body.is-open {
  max-height: 380px;
  border-top-width: 1px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.fertilizer-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 8px;
  border-bottom: 1px solid rgba(90, 110, 140, 0.08);
}

.fertilizer-list-scroll {
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  max-height: 296px;
}

.fertilizer-list-scroll::-webkit-scrollbar {
  width: 4px;
}

.fertilizer-list-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.fertilizer-list-scroll::-webkit-scrollbar-thumb {
  background: rgba(90, 110, 140, 0.25);
  border-radius: 2px;
}

.fertilizer-search-input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(90, 110, 140, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.65);
  padding: 8px 12px;
  font-size: 13px;
  color: #2a3a4a;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.fertilizer-search-input:focus {
  border-color: #5a7a9c;
  background: rgba(255, 255, 255, 0.92);
}

.fertilizer-search-input::placeholder {
  color: #9aabbf;
}

.fertilizer-toggle-all-btn {
  flex-shrink: 0;
  appearance: none;
  border: 1px solid rgba(90, 110, 140, 0.22);
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #4a6a8a;
  border-radius: 10px;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.fertilizer-toggle-all-btn:hover {
  background: rgba(90, 122, 156, 0.14);
  color: #2a5a8a;
}

.fertilizer-items-section {
  padding: 10px 14px 6px;
}

.fertilizer-item.is-hidden {
  display: none;
}

.fertilizer-items-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 8px;
  margin-bottom: 4px;
}

.fertilizer-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
  min-width: 0;
}

.fertilizer-item:hover {
  background: rgba(90, 122, 156, 0.08);
  border-color: rgba(90, 122, 156, 0.15);
}

.fertilizer-item.is-checked {
  background: rgba(46, 110, 180, 0.07);
  border-color: rgba(46, 110, 180, 0.2);
}

.fertilizer-item-checkbox {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  appearance: none;
  border: 1.5px solid rgba(90, 110, 140, 0.4);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  position: relative;
}

.fertilizer-item-checkbox:checked {
  background: #2e6eb4;
  border-color: #2e6eb4;
}

.fertilizer-item-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1.5px;
  width: 5px;
  height: 8px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.fertilizer-item-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

.fertilizer-item-name {
  font-size: 12px;
  font-weight: 500;
  color: #2a3a4c;
  line-height: 1.3;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fertilizer-selection-count {
  font-size: 11px;
  color: #6a7a8a;
  padding: 2px 14px 8px;
}

@media (max-width: 480px) {
  .fertilizer-items-grid {
    grid-template-columns: 1fr;
  }
}

body.is-check-mode .fertilizer-items-grid {
  grid-template-columns: 1fr;
}

/* ── Mode selector (Reçete Oluştur / Reçeteni Kontrol Et) ── */
.mode-selector {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(90, 110, 140, 0.09);
  border-radius: 14px;
  margin-bottom: 14px;
}

.mode-btn {
  flex: 1;
  appearance: none;
  border: none;
  background: transparent;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #6a7a8a;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.mode-btn.is-active {
  background: #fff;
  color: #2a5a8a;
  box-shadow: 0 1px 4px rgba(25, 20, 44, 0.10);
}

body.is-check-mode .mode-btn.is-active {
  color: #3a6a4a;
}

body.is-check-mode .input-panel {
  background-image:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 36%),
    linear-gradient(
      156deg,
      #f0f4ee 0%,
      #eaf0e8 46%,
      #e6f0ec 100%
    );
  border-color: rgba(220, 238, 224, 0.32);
}

body.is-check-mode .mode-selector {
  background: rgba(80, 130, 90, 0.09);
}

/* ── Fertilizer unit toggle row (check mode) ── */
.fert-unit-row {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 6px;
  border-bottom: 1px solid rgba(90, 110, 140, 0.08);
}

body.is-check-mode .fert-unit-row {
  display: flex;
}

.fert-unit-btn {
  appearance: none;
  border: 1px solid rgba(90, 110, 140, 0.22);
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #4a6a8a;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.fert-unit-btn.is-active {
  background: #2e6eb4;
  color: #fff;
  border-color: #2e6eb4;
}

/* ── Fertilizer amount inputs (check mode) ── */
.fert-amount-wrap {
  display: none;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
}

body.is-check-mode .fert-amount-wrap {
  display: flex;
}

.fert-amount-input {
  width: 58px;
  border: 1px solid rgba(90, 110, 140, 0.25);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.80);
  padding: 4px 6px;
  font-size: 12px;
  color: #2a3a4a;
  text-align: right;
  outline: none;
  transition: border-color 0.15s ease;
}

.fert-amount-input:focus {
  border-color: #5a7a9c;
  background: rgba(255, 255, 255, 0.95);
}

.fert-amount-unit {
  font-size: 11px;
  color: #6a7a8a;
  flex-shrink: 0;
  min-width: 14px;
}

/* ── Analysis panels (water / soil) ── */
.analysis-field {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background-color: var(--field-shell-bg);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.16));
  box-shadow: 0 2px 8px rgba(25, 20, 44, 0.04);
  overflow: hidden;
}

.analysis-panel-header {
  display: flex;
  align-items: center;
  padding: 11px 36px 11px 14px;
  cursor: pointer;
  user-select: none;
  gap: 8px;
  position: relative;
}

.analysis-panel-header::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid rgba(64, 79, 102, 0.65);
  border-bottom: 2px solid rgba(64, 79, 102, 0.65);
  transform: translateY(-60%) rotate(45deg);
  pointer-events: none;
  transition: transform 0.2s ease;
}

.analysis-panel-header.is-open::after {
  transform: translateY(-20%) rotate(-135deg);
}

.analysis-panel-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  color: #3a4a5c;
  letter-spacing: 0.04em;
}

.analysis-unit-badge {
  font-size: 10.5px;
  color: #7a8a9a;
  font-weight: 600;
}

.analysis-panel-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease;
  border-top: 0 solid rgba(90, 110, 140, 0.08);
}

.analysis-panel-body.is-open {
  max-height: 480px;
  border-top-width: 1px;
}

.analysis-unit-row {
  display: flex;
  gap: 6px;
  padding: 8px 12px 6px;
  border-bottom: 1px solid rgba(90, 110, 140, 0.06);
}

.analysis-unit-btn {
  flex-shrink: 0;
  appearance: none;
  border: 1px solid rgba(90, 110, 140, 0.18);
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #4a6a8a;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.analysis-unit-btn.is-active {
  background: rgba(46, 110, 180, 0.10);
  border-color: rgba(46, 110, 180, 0.32);
  color: #1a5a9a;
}

.analysis-list-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  max-height: 400px;
}

.analysis-list-scroll::-webkit-scrollbar {
  width: 3px;
}

.analysis-list-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.analysis-list-scroll::-webkit-scrollbar-thumb {
  background: rgba(90, 110, 140, 0.18);
  border-radius: 2px;
}

.analysis-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px 15px;
  padding: 8px 14px 10px;
}

.analysis-input-row {
  display: flex;
  align-items: stretch;
  min-height: 36px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.28);
  transition: background 0.15s ease;
}

.analysis-input-row:focus-within {
  background: rgba(255, 255, 255, 0.50);
}

.analysis-input-control {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.analysis-stepper-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: #5a7088;
  width: 30px;
  flex-shrink: 0;
  align-self: stretch;
  border-radius: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transition: color 0.15s ease, background 0.15s ease;
  touch-action: manipulation;
}

.analysis-stepper-btn-minus {
  border-right: 1px solid rgba(90, 110, 140, 0.10);
  border-radius: 6px 0 0 6px;
}

.analysis-stepper-btn-plus {
  border-left: 1px solid rgba(90, 110, 140, 0.10);
  border-radius: 0 6px 6px 0;
}

.analysis-stepper-btn:hover {
  color: #2a5580;
  background: rgba(46, 110, 180, 0.06);
}

.analysis-stepper-btn:active {
  background: rgba(46, 110, 180, 0.10);
}

.analysis-stepper-btn:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px rgba(79, 135, 189, 0.2);
}

.analysis-input-shell {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0 48px 0 0;
  box-shadow: none;
}

.analysis-input-suffix {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
  white-space: nowrap;
  line-height: 1.15;
}

.analysis-input-element {
  font-size: 10px;
  font-weight: 700;
  color: #506a82;
}

.analysis-inline-unit {
  font-size: 8.5px;
  font-weight: 600;
  color: #94a6b8;
}

.analysis-input-field {
  border: none;
  background: transparent;
  padding: 6px 0;
  font-size: 14px;
  font-weight: 600;
  color: #2a3a4a;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  transition: color 0.15s ease;
}

.analysis-input-field:focus {
  color: #163854;
}

.analysis-input-field::placeholder {
  color: #b0c0d0;
}

@media (max-width: 560px) {
  .analysis-inputs-grid {
    grid-template-columns: 1fr 1fr;
    gap: 4px 8px;
    padding: 6px 10px 8px;
  }

  .analysis-stepper-btn {
    width: 32px;
  }

  .analysis-input-shell {
    padding-right: 44px;
  }
}

.result-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  min-width: 0;
  border-color: rgba(190, 214, 234, 0.26);
  background: linear-gradient(
    168deg,
    rgba(249, 252, 255, 0.84),
    rgba(241, 247, 252, 0.78)
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 10px 26px rgba(18, 42, 66, 0.12),
    0 24px 48px rgba(18, 42, 66, 0.14);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
}

.result-tabs {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(112px, 1fr);
  gap: 6px;
  justify-content: start;
  padding: 5px;
  border: 1px solid var(--ui-card-border);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 250, 254, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.result-tab {
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #56708b;
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 9px 16px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.35s ease;
}

.result-tab:active:not(.is-active) {
  transition: box-shadow 0s;
  box-shadow: inset 0 0 0 9999px rgba(80, 118, 168, 0.1);
}

.result-tab:hover {
  color: #2f4d68;
  background: rgba(220, 234, 247, 0.5);
}

.result-tab:focus-visible {
  outline: none;
  border-color: rgba(74, 117, 159, 0.5);
  box-shadow: 0 0 0 3px rgba(103, 145, 186, 0.16);
}

.result-tab.is-active {
  border-color: rgba(74, 117, 159, 0.34);
  background: linear-gradient(180deg, rgba(235, 245, 255, 0.98), rgba(225, 239, 252, 0.96));
  color: #1e4a72;
  box-shadow: 0 4px 10px rgba(32, 66, 98, 0.12);
}

.result-tab-panel {
  display: none;
  gap: 16px;
}

.result-tab-panel.is-active {
  display: grid;
}

.report-wrap {
  display: grid;
  gap: 12px;
}

.report-section {
  border: 1px solid var(--ui-card-border);
  border-radius: 13px;
  background: var(--ui-card-bg);
  box-shadow: var(--ui-card-shadow);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.report-section-head {
  display: grid;
  gap: 3px;
}

.report-section-head h3 {
  margin: 0;
  font-size: var(--text-lg);
  font-weight: 750;
  color: #1f3650;
}

.report-score-list {
  display: grid;
  gap: 8px;
}

.report-score-row {
  border: 1px solid var(--ui-item-border);
  border-radius: 10px;
  background: var(--ui-item-bg);
  padding: 8px 10px;
  display: grid;
  gap: 6px;
}

.report-score-row.is-selected {
  border-color: rgba(65, 120, 176, 0.45);
  box-shadow: 0 0 0 3px rgba(65, 120, 176, 0.11);
}

.report-score-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.report-score-phase {
  color: #24445f;
  font-size: var(--text-sm);
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-score-value {
  color: #2a567d;
  font-size: var(--text-sm);
  font-weight: 750;
  font-variant-numeric: tabular-nums lining-nums;
}

.report-score-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(198, 214, 228, 0.72);
  overflow: hidden;
}

.report-score-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #87b7dd, #3f7db3);
}

.report-element-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 7px;
}

.report-element-card {
  border: 1px solid rgba(86, 112, 138, 0.18);
  border-radius: 11px;
  padding: 8px 9px;
  display: grid;
  gap: 6px;
  min-height: 0;
  align-content: start;
  overflow: visible;
  box-shadow: 0 5px 12px rgba(22, 44, 67, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.report-element-card:hover {
  border-color: rgba(72, 104, 138, 0.38);
  box-shadow: 0 10px 20px rgba(22, 44, 67, 0.13);
  transform: translateY(-2px);
}

.report-element-card:focus-within {
  border-color: rgba(72, 104, 138, 0.38);
  box-shadow: 0 10px 20px rgba(22, 44, 67, 0.13);
  transform: translateY(-2px);
}

.report-element-top {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 4px;
  min-width: 0;
}

.report-element-name {
  margin: 0;
  color: #1f3650;
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.25;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.report-status-chip {
  display: inline-block;
  align-self: start;
  max-width: 100%;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: var(--text-2xs);
  letter-spacing: 0.01em;
  font-weight: 800;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.2;
  text-align: center;
}

.report-element-ppm {
  display: grid;
  gap: 2px;
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px solid rgba(90, 110, 140, 0.1);
}

.report-element-ppm-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px;
  color: #4a6278;
  font-size: 9px;
  line-height: 1.3;
  letter-spacing: 0;
  font-weight: 500;
  font-variant-numeric: tabular-nums lining-nums;
}

.report-ppm-label {
  opacity: 0.7;
  font-weight: 600;
  flex-shrink: 0;
}

.report-ppm-value {
  font-weight: 700;
  color: #2f455f;
  text-align: right;
}

.report-empty {
  border: 1px dashed rgba(97, 118, 142, 0.38);
  border-radius: 10px;
  background: rgba(248, 251, 255, 0.8);
  color: #5e7388;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.45;
  padding: 10px 12px;
}

.summary-card {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--ui-item-border);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 252, 255, 0.87));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74), 0 2px 8px rgba(22, 44, 67, 0.06);
}

.summary-item {
  border: 1px solid var(--ui-item-border);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--ui-item-bg);
  box-shadow: none;
  display: grid;
  gap: 3px;
  align-content: center;
  min-width: 0;
}

.summary-item-main {
  display: grid;
  gap: 3px;
  align-content: center;
  min-width: 0;
}

.summary-item-adjustable {
  padding: 0;
  overflow: hidden;
  gap: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  align-items: stretch;
}

.summary-item-adjustable .summary-item-main {
  padding: 8px 10px;
}

.summary-stepper {
  display: grid;
  grid-template-rows: 1fr 1fr;
  border-left: 1px solid rgba(86, 112, 138, 0.16);
  background: linear-gradient(180deg, rgba(249, 253, 255, 0.96), rgba(244, 249, 254, 0.95));
}

.summary-stepper-btn {
  border: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  color: #2b4f71;
  font-size: 1.22rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.summary-stepper-btn + .summary-stepper-btn {
  border-top: 1px solid rgba(86, 112, 138, 0.18);
}

.summary-stepper-btn:hover {
  background: rgba(74, 124, 171, 0.12);
  color: #214766;
}

.summary-stepper-btn:active {
  background: rgba(74, 124, 171, 0.18);
}

.summary-stepper-btn.is-disabled,
.summary-stepper-btn:disabled {
  cursor: not-allowed;
  color: #9eaec0;
  background: rgba(236, 241, 247, 0.9);
}

.summary-item-dose {
  gap: 4px;
}

.summary-label {
  margin: 0;
  font-size: var(--text-2xs);
  color: #6d7f92;
  letter-spacing: 0.02em;
  font-weight: 700;
}

.summary-item-dose h2 {
  margin: 0;
  font-size: var(--text-xl);
  color: #2f536f;
  line-height: 1.14;
  letter-spacing: 0;
  font-weight: 800;
  font-variant-numeric: tabular-nums lining-nums;
}

.summary-item strong {
  font-size: var(--text-md);
  color: #37546f;
  font-weight: 700;
  line-height: 1.26;
  font-variant-numeric: tabular-nums lining-nums;
}

.summary-value-editable {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 1.5rem;
  border-radius: 8px;
  padding: 1px 4px;
  cursor: text;
  transition: background-color 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

.summary-value-editable:hover,
.summary-value-editable:focus-visible {
  background: rgba(63, 118, 171, 0.10);
  box-shadow: inset 0 0 0 1px rgba(63, 118, 171, 0.22);
  outline: none;
}

.summary-value-editable.is-editing {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(47, 106, 162, 0.38), 0 0 0 3px rgba(79, 140, 198, 0.20);
}

.summary-value-editable.disabled {
  opacity: 0.6;
  cursor: default;
  background: transparent;
  box-shadow: none;
}

.example-text {
  margin: 0;
  color: #6c7f93;
  font-size: var(--text-xs);
}

.mix-wrap {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.recipe-card {
  border: 1px solid var(--recipe-card-border);
  border-radius: 15px;
  background: var(--recipe-card-bg);
  box-shadow: var(--recipe-card-shadow);
  padding: 11px 13px;
  min-width: 0;
}

.recipe-card-header {
  display: grid;
  gap: 4px;
  padding: 9px 7px 11px;
  border-bottom: 1px solid rgba(73, 109, 145, 0.28);
}

.recipe-card-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.recipe-card-header h3 {
  margin: 0;
  font-size: var(--text-lg);
  letter-spacing: 0;
  font-weight: 750;
  color: #173958;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
}

.recipe-download-btn {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border: 1px solid rgba(73, 109, 145, 0.34);
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(241, 248, 255, 0.95));
  color: #345877;
  font-size: 1.05rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.35s ease, transform 0.18s ease, background-color 0.18s ease;
}

.recipe-download-btn:hover {
  border-color: rgba(63, 106, 146, 0.44);
  box-shadow: 0 6px 14px rgba(23, 49, 75, 0.14);
  transform: translateY(-1px);
}

.recipe-download-btn:active {
  transform: translateY(0);
  transition: box-shadow 0s, transform 0.18s ease;
  box-shadow: inset 0 0 0 9999px rgba(80, 118, 168, 0.1);
}

.recipe-download-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(69, 125, 178, 0.22);
}

.recipe-download-btn.is-loading {
  cursor: wait;
  box-shadow: 0 0 0 3px rgba(69, 125, 178, 0.14);
}

.recipe-download-btn.is-loading span {
  display: inline-block;
  animation: status-spin 0.9s linear infinite;
}

.recipe-download-btn:not(:disabled) span {
  display: inline-block;
  animation: dl-nudge 1.6s ease-in-out 1.2s 4 both;
}

.recipe-download-btn:disabled {
  cursor: not-allowed;
  color: #9eaec0;
  border-color: rgba(138, 155, 175, 0.26);
  box-shadow: none;
  background: rgba(245, 248, 252, 0.92);
  transform: none;
}

.recipe-title-meta {
  font-family: var(--font-ui);
  font-size: var(--text-xs);
  font-weight: 500;
  color: #5f7388;
  letter-spacing: 0;
  line-height: 1.35;
  font-variant-numeric: tabular-nums lining-nums;
}

.recipe-subtitle {
  margin: 0;
  font-size: var(--text-xs);
  font-weight: 500;
  color: #566b80;
  letter-spacing: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.recipe-download-message {
  margin: 0;
  font-size: var(--text-xs);
  font-weight: 600;
  color: #5c7288;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.recipe-download-message.is-info {
  color: #4f6983;
}

.recipe-download-message.is-error {
  color: #a23e4c;
}

.recipe-subtitle-key {
  display: inline;
  color: #445d76;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.recipe-subtitle-value {
  color: #334a62;
  font-size: var(--text-xs);
  font-weight: 500;
  margin-left: 0;
  overflow-wrap: anywhere;
}

.recipe-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(172px, 1fr));
  gap: 10px;
  padding-top: 10px;
}

.recipe-row {
  border: 1px solid var(--recipe-row-border);
  border-radius: 12px;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  align-content: space-between;
  min-height: 96px;
  background: var(--recipe-row-bg);
  box-shadow: var(--recipe-row-shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.recipe-row-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.recipe-logo-frame {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(86, 112, 138, 0.22);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.92);
}

.recipe-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  display: block;
}

.recipe-row:hover {
  border-color: var(--recipe-row-hover-border);
  box-shadow: var(--recipe-row-hover-shadow);
  transform: translateY(-2px);
}

.recipe-row:last-child {
  margin-bottom: 0;
}

.recipe-row .title {
  font-weight: 650;
  font-size: var(--text-sm);
  color: #1b3349;
  line-height: 1.4;
  overflow-wrap: anywhere;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recipe-row .meta {
  font-size: var(--text-sm);
  font-weight: 750;
  color: var(--recipe-value-text);
  line-height: 1.25;
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--recipe-value-border);
  background: var(--recipe-value-bg);
  justify-self: start;
  align-self: end;
}

.recipe-pro-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(86, 112, 138, 0.22);
  border-radius: 15px;
  padding: 13px 14px;
  background: linear-gradient(180deg, rgba(255, 251, 245, 0.98), rgba(248, 244, 255, 0.95));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 10px 20px rgba(26, 20, 44, 0.08);
}

.recipe-pro-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.recipe-pro-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.recipe-pro-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(118, 68, 187, 0.12);
  color: #5f31a7;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.recipe-pro-head h4 {
  margin: 0;
  color: #2b3b54;
  font-size: var(--text-md);
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.01em;
}

.recipe-pro-text {
  margin: 0;
  color: #617186;
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.45;
}

.recipe-pro-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(74, 111, 154, 0.22);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(246, 250, 255, 0.98), rgba(235, 244, 252, 0.96));
  color: #284d71;
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 8px 16px rgba(22, 45, 69, 0.1);
  transition: transform 0.18s ease, box-shadow 0.24s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.recipe-pro-link:hover {
  border-color: rgba(61, 102, 145, 0.36);
  background: linear-gradient(180deg, rgba(250, 253, 255, 1), rgba(236, 246, 255, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 10px 18px rgba(22, 45, 69, 0.13);
  transform: translateY(-1px);
}

.recipe-pro-link:active {
  transform: translateY(0);
}

.recipe-pro-link:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(94, 145, 194, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 10px 18px rgba(22, 45, 69, 0.13);
}

.floating-utility-dock {
  position: fixed;
  left: 50%;
  bottom: max(12px, calc(env(safe-area-inset-bottom) + 8px));
  z-index: 40;
  width: min(760px, calc(100vw - 48px));
  max-width: calc(100vw - 48px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transform: translateX(-50%);
  pointer-events: none;
}

.floating-utility-dock > * {
  flex: 0 0 auto;
  margin: 0;
  pointer-events: auto;
}

.pro-floating-cta-wrap {
  position: static;
  width: auto;
  max-width: none;
  display: flex;
  justify-content: center;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.pro-floating-cta-wrap.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
}

.pro-floating-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 13px 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background-color: rgba(242, 236, 248, 0.78);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.09) 38%, rgba(255, 255, 255, 0.03) 100%),
    linear-gradient(180deg, rgba(240, 235, 248, 0.38), rgba(227, 232, 243, 0.2) 100%);
  color: #4a5f72;
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 rgba(116, 112, 153, 0.07),
    0 7px 14px rgba(16, 8, 38, 0.06),
    0 11px 18px rgba(16, 8, 38, 0.05);
  backdrop-filter: blur(10px) saturate(1.01);
  -webkit-backdrop-filter: blur(10px) saturate(1.01);
  transition: transform 0.2s ease, box-shadow 0.24s ease, opacity 0.22s ease, border-color 0.18s ease;
  pointer-events: auto;
  overflow: hidden;
  opacity: 0.9;
}

.pro-floating-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 14% 50%, rgba(151, 96, 224, 0.045), transparent 22%),
    radial-gradient(circle at 84% 46%, rgba(101, 158, 207, 0.035), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.pro-floating-cta:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    inset 0 -1px 0 rgba(116, 112, 153, 0.08),
    0 8px 15px rgba(16, 8, 38, 0.07),
    0 13px 20px rgba(16, 8, 38, 0.06);
  opacity: 0.97;
}

.pro-floating-cta:active {
  transform: translateY(0);
}

.pro-floating-cta:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(179, 157, 224, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    inset 0 -1px 0 rgba(116, 112, 153, 0.08),
    0 14px 22px rgba(16, 8, 38, 0.07);
}

.pro-floating-cta-badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 33px;
  min-height: 25px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 42%),
    linear-gradient(135deg, rgba(173, 128, 231, 0.085), rgba(130, 174, 214, 0.04));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    inset 0 -1px 0 rgba(109, 84, 156, 0.04);
  color: #8165b3;
  font-size: 0.61rem;
  font-weight: 760;
  letter-spacing: 0.045em;
}

#floatingProCtaText {
  position: relative;
  z-index: 1;
  font-size: 0.85rem;
  font-weight: 640;
  letter-spacing: 0.001em;
  color: #506476;
  white-space: nowrap;
}

body.member-modal-open .pro-floating-cta-wrap {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
}

html[dir="rtl"] .custom-option-action-head,
html[dir="rtl"] .recipe-pro-head {
  flex-direction: row-reverse;
}

html[dir="rtl"] .custom-option-action-title,
html[dir="rtl"] .custom-option-action-hint,
html[dir="rtl"] .recipe-pro-head h4,
html[dir="rtl"] .recipe-pro-text {
  text-align: right;
}

html[dir="rtl"] .pro-floating-cta-wrap {
  justify-content: flex-start;
}

.request-error {
  width: 100%;
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(170, 26, 55, 0.35);
  background: rgba(255, 239, 242, 0.93);
  color: #8b1530;
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.35;
  box-shadow: 0 4px 12px rgba(139, 21, 48, 0.12);
}

.hidden {
  display: none;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes status-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes dl-nudge {
  0%   { transform: translateY(0); }
  20%  { transform: translateY(5px); }
  38%  { transform: translateY(1px); }
  50%  { transform: translateY(0); }
  100% { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 760px) {
  :root {
    --hero-control-height: 34px;
    --hero-control-padding-x: 11px;
  }

  body {
    padding:
      max(12px, env(safe-area-inset-top))
      clamp(10px, 4vw, 16px)
      max(120px, calc(env(safe-area-inset-bottom) + 100px));
  }

  body::after {
    background: radial-gradient(ellipse 78% 54% at 50% 8%, rgba(193, 53, 132, 0.16) 0%, transparent 72%);
    opacity: 0.72;
  }

  .bg-shape {
    display: none;
  }

  .shell {
    min-height: calc(100vh - 56px);
    min-height: calc(100dvh - 56px);
    gap: 10px;
  }

  .hero-top,
  .hero-trust,
  .panel,
  .input-panel,
  .result-panel,
  .pull-refresh,
  .site-footer-shell {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .input-panel {
    gap: 12px;
    padding: clamp(13px, 3vw, 18px);
  }

  .hero-trust {
    max-width: 100%;
  }

  .member-modal {
    padding: 12px;
  }

  .member-modal-card {
    border-radius: 14px;
    padding: 14px;
  }

  .member-grid {
    grid-template-columns: 1fr;
  }

  .custom-select-panel {
    top: calc(100% + 8px);
  }

  .animated-select.open .custom-select-panel {
    max-height: min(260px, 44vh);
  }

  .plant-field .animated-select .custom-option,
  .phase-field .animated-select .custom-option {
    padding: 9px 12px;
  }

  .custom-select-search-wrap {
    padding: 8px 8px 6px;
  }

  .custom-select-search {
    min-height: 34px;
    padding: 7px 9px 7px 33px;
  }

  .panel {
    border-radius: var(--panel-radius-mobile);
    padding: clamp(11px, 2.8vw, 14px);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.62),
      0 5px 14px rgba(14, 6, 24, 0.12),
      0 14px 30px rgba(14, 6, 24, 0.14);
  }

  .calculate-btn {
    width: 100%;
    min-height: 52px;
    border-radius: 13px;
    font-size: var(--text-xs);
  }

  .loading-overlay {
    padding: 16px;
  }

  .loading-overlay-card {
    width: fit-content;
    min-width: 204px;
    max-width: calc(100vw - 20px);
    min-height: 68px;
    padding: 12px 13px;
    gap: 10px;
  }

  .summary-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 8px;
    gap: 7px;
  }

  .result-tabs {
    width: 100%;
    grid-auto-columns: minmax(0, 1fr);
  }

  .summary-item-dose {
    grid-column: 1 / -1;
  }

  .recipe-card-header {
    gap: 3px;
  }

  .recipe-download-btn {
    width: 32px;
  }

  .recipe-list {
    grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
    gap: 9px;
  }

  .recipe-pro-card {
    align-items: flex-start;
  }

  .pro-floating-cta-wrap {
    width: min(760px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
  }

  .pro-floating-cta {
    min-height: 43px;
    padding: 0 13px 0 10px;
  }

  .report-section {
    padding: 10px;
    gap: 9px;
  }

  .report-element-grid {
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 6px;
  }

}

@media (max-width: 520px) {
  :root {
    --hero-control-height: 33px;
    --hero-control-padding-x: 10px;
  }

  .panel {
    border-radius: 12px;
    padding: 10px 11px;
  }

  body {
    padding:
      max(10px, env(safe-area-inset-top))
      10px
      max(14px, env(safe-area-inset-bottom));
  }

  .plant-field,
  .phase-field {
    padding: 8px;
    border-radius: 15px;
  }

  .input-panel {
    gap: 10px;
    padding: 12px;
  }

  .hero-trust {
    padding: 7px 10px;
    border-radius: 16px;
    gap: 8px;
  }

  html[dir="rtl"] .hero-trust {
    padding: 7px 10px;
  }

  .hero-trust-mark {
    width: 34px;
    height: 30px;
    flex-basis: 34px;
    border-radius: 11px;
  }

  .hero-trust-logo {
    width: 20px;
    height: 20px;
  }

  .recipe-download-btn {
    width: 32px;
  }

  .hero-trust-title {
    font-size: calc(var(--text-2xs) * 0.88);
  }

  .hero-trust-text {
    font-size: calc(var(--text-2xs) * 0.93);
  }

  .hero-trust-install {
    width: 100%;
    justify-content: center;
    margin-left: 0;
    min-height: 30px;
    padding: 5px 10px;
    font-size: calc(var(--text-2xs) * 0.9);
  }

  .hero-trust-notice {
    padding: 7px 9px;
    font-size: calc(var(--text-2xs) * 0.9);
  }

  .member-modal {
    padding: 10px;
  }

  .member-modal-card {
    width: calc(100vw - 18px);
    border-radius: 12px;
    padding: 12px;
  }

  .member-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .member-register-btn,
  .member-secondary-btn,
  .member-forget-btn {
    width: 100%;
    justify-content: center;
  }

  .plant-field .animated-select .custom-select-trigger,
  .phase-field .animated-select .custom-select-trigger {
    min-height: 58px;
    padding: 19px 42px 10px 12px;
  }

  .plant-field .animated-select .custom-select-trigger::after,
  .phase-field .animated-select .custom-select-trigger::after {
    top: 4px;
    left: 11px;
    font-size: 0.66rem;
  }

  .plant-field .animated-select .custom-select-trigger::before,
  .phase-field .animated-select .custom-select-trigger::before {
    right: 12px;
    width: 7px;
    height: 7px;
  }

  .custom-select-trigger {
    min-height: 46px;
    padding: 9px 11px;
    font-size: 0.93rem;
  }

  .custom-select-panel {
    top: calc(100% + 8px);
  }

  .custom-option {
    font-size: 0.88rem;
    padding: 9px 11px;
  }

  .custom-select-search-wrap {
    padding: 8px 8px 6px;
  }

  .custom-select-search {
    min-height: 34px;
    font-size: 0.85rem;
    padding: 7px 9px 7px 33px;
  }

  .calculate-btn {
    width: 100%;
    min-height: 48px;
    border-radius: 12px;
    font-size: 0.86rem;
  }

  .loading-overlay {
    padding: 12px;
  }

  .loading-overlay-card {
    width: fit-content;
    min-width: 196px;
    max-width: calc(100vw - 18px);
    min-height: 64px;
    border-radius: 12px;
    padding: 11px 12px;
    gap: 9px;
  }

  .loading-spinner {
    width: 16px;
    height: 16px;
  }

  .loading-overlay-text {
    font-size: 0.86rem;
  }

  .summary-card {
    padding: 7px;
    gap: 7px;
  }

  .result-tab {
    padding: 8px 10px;
    font-size: var(--text-xs);
  }

  .summary-item {
    padding: 8px 9px;
  }

  .summary-item-adjustable {
    padding: 0;
  }

  .summary-item-dose h2 {
    font-size: clamp(1.18rem, 6.8vw, 1.36rem);
  }

  .example-text {
    font-size: var(--text-xs);
  }

  .recipe-card {
    padding: 9px 10px;
  }

  .recipe-list {
    grid-template-columns: repeat(auto-fit, minmax(146px, 1fr));
    gap: 8px;
  }

  .custom-select-footer {
    padding: 8px;
  }

  .custom-option.custom-option-action {
    padding: 10px 11px;
  }

  .custom-option-action-head {
    gap: 6px;
  }

  .recipe-pro-card {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }

  .recipe-pro-link {
    width: 100%;
  }

  .pro-floating-cta-wrap {
    width: auto;
    max-width: calc(100vw - 32px);
  }

  .pro-floating-cta {
    gap: 7px;
    min-height: 50px;
    padding: 0 13px 0 10px;
  }

  .pro-floating-cta-badge {
    min-width: 33px;
    min-height: 25px;
    padding: 0 7px;
    font-size: 0.61rem;
  }

  #floatingProCtaText {
    font-size: 0.82rem;
  }

  .report-section-head h3 {
    font-size: var(--text-md);
  }

  .report-element-grid {
    grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  }

  .report-element-card {
    min-height: 0;
    padding: 7px 8px;
  }

  .recipe-row {
    min-height: 88px;
    gap: 7px;
  }

  .recipe-logo-frame {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .recipe-logo {
    width: 30px;
    height: 30px;
  }

  .hero {
    padding: 8px 0 6px;
    max-width: 100%;
  }

}

@media (max-width: 360px) {
  .summary-item-adjustable {
    grid-template-columns: minmax(0, 1fr) 38px;
  }

  .summary-stepper-btn {
    font-size: 1.08rem;
  }

  .recipe-list {
    grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
    gap: 7px;
  }

  .calculate-btn {
    min-height: 44px;
    font-size: 0.82rem;
  }

  .recipe-card-header {
    gap: 3px;
  }

  .report-element-grid {
    grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
    gap: 6px;
  }

  .report-status-chip {
    font-size: var(--text-2xs);
    padding: 3px 7px;
  }

  .recipe-logo-frame {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .recipe-logo {
    width: 26px;
    height: 26px;
  }

}

@media (hover: none) and (pointer: coarse) and (min-width: 761px) {
  /* iOS Safari otomatik zoomu engellemek için 16px taban */
  .custom-select-search {
    font-size: 16px;
    line-height: 1.2;
  }

  /* ≤760px ekranlarda blur zaten tamamen kapatılıyor.
     Burada sadece daha geniş dokunmatik cihazlarda blur'u düşürüyoruz. */
  .hero-top {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  .input-panel {
    backdrop-filter: blur(10px) saturate(1.05);
    -webkit-backdrop-filter: blur(10px) saturate(1.05);
  }

  .panel {
    backdrop-filter: blur(8px) saturate(1.06);
    -webkit-backdrop-filter: blur(8px) saturate(1.06);
  }

  .site-footer-shell {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  /* Sticky header kendi compositor katmanına alınsın */
  .hero-top {
    will-change: transform;
  }
}



/* ── Footer & Social Links ─────────────────────────── */
.site-footer {
  position: static;
  z-index: 12;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  transform: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
}

.site-footer.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
}

.site-footer-shell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background-color: rgba(239, 232, 247, 0.76);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.08) 38%, rgba(255, 255, 255, 0.03) 100%),
    linear-gradient(180deg, rgba(239, 231, 248, 0.32), rgba(222, 226, 240, 0.18) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.44),
    inset 0 -1px 0 rgba(116, 112, 153, 0.08),
    0 10px 20px rgba(16, 8, 38, 0.09),
    0 16px 24px rgba(16, 8, 38, 0.06);
  backdrop-filter: blur(11px) saturate(1.02);
  -webkit-backdrop-filter: blur(11px) saturate(1.02);
  overflow: hidden;
  pointer-events: auto;
}

.site-footer-shell::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 14px;
  width: 96px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 7px;
}

.social-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: rgba(70, 84, 104, 0.88);
  background-color: rgba(246, 242, 250, 0.78);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05)),
    linear-gradient(180deg, rgba(243, 238, 250, 0.26), rgba(233, 237, 245, 0.12));
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    inset 0 -1px 0 rgba(112, 116, 152, 0.05);
  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background 0.2s ease,
    transform 0.18s ease,
    box-shadow 0.35s ease;
}

.social-link svg {
  width: 16px;
  height: 16px;
  display: block;
  flex: 0 0 auto;
}

.social-link:hover {
  color: rgba(52, 69, 89, 0.98);
  border-color: rgba(255, 255, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08)),
    radial-gradient(circle at 50% 0%, rgba(201, 182, 239, 0.18), transparent 70%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 8px 16px rgba(17, 5, 29, 0.12);
  transform: translateY(-1px);
}

.social-link:active {
  transform: translateY(-1px);
  transition: box-shadow 0s, transform 0.18s ease;
  box-shadow: inset 0 0 0 9999px rgba(255, 255, 255, 0.1);
}

.social-link:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(179, 157, 224, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

@media (max-width: 640px) {
  .floating-utility-dock {
    width: calc(100vw - 18px);
    max-width: calc(100vw - 18px);
    bottom: max(10px, calc(env(safe-area-inset-bottom) + 6px));
  }

  .site-footer-shell {
    padding: 7px 8px;
    gap: 8px;
  }

  .social-links {
    gap: 7px;
  }

  .social-link {
    width: 32px;
    height: 32px;
  }

  .social-link svg {
    width: 15px;
    height: 15px;
  }

  .pro-floating-cta-wrap,
  .site-footer {
    justify-content: center;
  }

}

/* ── Fertilizer Edit Button (bottom of selection panel) ── */
.fert-edit-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-top: 1px solid rgba(90, 110, 140, 0.10);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.30), rgba(240, 244, 252, 0.40));
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #4a6a8a;
  transition: background 0.15s ease, color 0.15s ease;
}
.fert-edit-trigger:hover {
  background: linear-gradient(180deg, rgba(46, 110, 180, 0.08), rgba(46, 110, 180, 0.14));
  color: #2a5a8a;
}
.fert-edit-trigger-icon {
  font-size: 14px;
  line-height: 1;
}

/* ── Fertilizer Editor Overlay ── */
.fert-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(18, 12, 32, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.fert-editor-overlay.hidden {
  display: none;
}

.fert-editor-panel {
  width: 100%;
  max-width: 620px;
  max-height: calc(100dvh - 32px);
  background: linear-gradient(180deg, #f8fafd, #eef3f9);
  border: 1px solid rgba(86, 112, 138, 0.22);
  border-radius: 20px;
  box-shadow: 0 20px 48px rgba(12, 8, 30, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.fert-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(90, 110, 140, 0.12);
}
.fert-editor-title {
  font-size: 16px;
  font-weight: 700;
  color: #2a3a4c;
  margin: 0;
}
.fert-editor-close {
  appearance: none;
  border: none;
  background: none;
  font-size: 22px;
  color: #6a7a8a;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.fert-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(90, 110, 140, 0.08);
}
.fert-editor-search {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(90, 110, 140, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.65);
  padding: 8px 12px;
  font-size: 13px;
  color: #2a3a4a;
  outline: none;
}
.fert-editor-search:focus {
  border-color: #5a7a9c;
  background: rgba(255, 255, 255, 0.92);
}
.fert-editor-add-btn {
  flex-shrink: 0;
  appearance: none;
  border: 1px solid rgba(46, 140, 80, 0.3);
  background: rgba(46, 140, 80, 0.08);
  cursor: pointer;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #2a8c50;
  border-radius: 10px;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.fert-editor-add-btn:hover {
  background: rgba(46, 140, 80, 0.16);
}

.fert-editor-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 8px 12px;
  min-height: 120px;
}
.fert-editor-body::-webkit-scrollbar { width: 4px; }
.fert-editor-body::-webkit-scrollbar-track { background: transparent; }
.fert-editor-body::-webkit-scrollbar-thumb { background: rgba(90, 110, 140, 0.25); border-radius: 2px; }

/* ── Editor: fertilizer card ── */
.fert-ed-card {
  border: 1px solid rgba(86, 112, 138, 0.16);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 250, 255, 0.88));
  margin-bottom: 6px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.fert-ed-card.is-hidden { display: none; }
.fert-ed-card.is-dirty { border-color: rgba(180, 140, 20, 0.4); }
.fert-ed-card.is-new { border-color: rgba(46, 140, 80, 0.35); }

.fert-ed-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  user-select: none;
}
.fert-ed-card-header:hover { background: rgba(90, 122, 156, 0.05); }

.fert-ed-card-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: #2a3a4c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fert-ed-card-delete {
  appearance: none;
  border: none;
  background: none;
  cursor: pointer;
  color: #c0392b;
  font-size: 15px;
  padding: 2px 4px;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.15s ease;
}
.fert-ed-card-delete:hover { opacity: 1; }

.fert-ed-card-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid rgba(90, 110, 140, 0.5);
  border-bottom: 2px solid rgba(90, 110, 140, 0.5);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.fert-ed-card.is-expanded .fert-ed-card-chevron {
  transform: rotate(-135deg);
}

.fert-ed-card-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.fert-ed-card.is-expanded .fert-ed-card-body {
  max-height: 600px;
}

.fert-ed-card-fields {
  padding: 6px 12px 10px;
  border-top: 1px solid rgba(90, 110, 140, 0.08);
}

/* Name + Company row at top of expanded card */
.fert-ed-meta-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.fert-ed-meta-field {
  flex: 1;
  min-width: 0;
}
.fert-ed-meta-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: #6a7a8a;
  margin-bottom: 2px;
  letter-spacing: 0.03em;
}
.fert-ed-meta-input {
  width: 100%;
  border: 1px solid rgba(90, 110, 140, 0.2);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.75);
  padding: 5px 8px;
  font-size: 12px;
  color: #2a3a4a;
  outline: none;
}
.fert-ed-meta-input:focus {
  border-color: #5a7a9c;
  background: #fff;
}

/* Compound grid */
.fert-ed-compounds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
  gap: 4px 8px;
}
.fert-ed-compound-cell {
  display: flex;
  align-items: center;
  gap: 4px;
}
.fert-ed-compound-label {
  font-size: 10px;
  font-weight: 600;
  color: #5a6a7a;
  min-width: 52px;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fert-ed-compound-input-wrap {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(90, 110, 140, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.75);
  overflow: hidden;
}
.fert-ed-compound-input-wrap:focus-within {
  border-color: #5a7a9c;
  background: #fff;
}
.fert-ed-compound-input {
  flex: 1;
  min-width: 0;
  width: 44px;
  border: none;
  background: transparent;
  padding: 3px 2px 3px 5px;
  font-size: 11px;
  color: #2a3a4a;
  text-align: right;
  outline: none;
}
.fert-ed-compound-unit {
  padding: 0 4px 0 1px;
  font-size: 10px;
  font-weight: 600;
  color: #7a8a9a;
  flex-shrink: 0;
  user-select: none;
}
.fert-ed-compound-cell.has-value .fert-ed-compound-label {
  color: #2e6eb4;
}

/* ── Editor Footer ── */
.fert-editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid rgba(90, 110, 140, 0.12);
  background: rgba(245, 248, 252, 0.95);
}
.fert-editor-footer-right {
  display: flex;
  gap: 8px;
}
.fert-editor-reset-btn {
  appearance: none;
  border: 1px solid rgba(180, 100, 40, 0.25);
  background: rgba(180, 100, 40, 0.06);
  cursor: pointer;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #b46428;
  border-radius: 10px;
  transition: background 0.15s ease;
}
.fert-editor-reset-btn:hover { background: rgba(180, 100, 40, 0.14); }
.fert-editor-cancel-btn {
  appearance: none;
  border: 1px solid rgba(90, 110, 140, 0.22);
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #4a6a8a;
  border-radius: 10px;
  transition: background 0.15s ease;
}
.fert-editor-cancel-btn:hover { background: rgba(90, 122, 156, 0.12); }
.fert-editor-save-btn {
  appearance: none;
  border: 1px solid #2e6eb4;
  background: #2e6eb4;
  cursor: pointer;
  padding: 8px 18px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  border-radius: 10px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.fert-editor-save-btn:hover { background: #245a96; border-color: #245a96; }

/* ── New fertilizer inline form ── */
.fert-ed-new-form {
  padding: 10px 12px;
  border: 1px dashed rgba(46, 140, 80, 0.3);
  border-radius: 12px;
  background: rgba(46, 140, 80, 0.04);
  margin-bottom: 6px;
}
.fert-ed-new-form .fert-ed-meta-row { margin-bottom: 6px; }

@media (max-width: 480px) {
  .fert-editor-panel { max-width: 100%; border-radius: 16px; }
  .fert-ed-compounds-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .fert-editor-footer { flex-wrap: wrap; }
  .fert-editor-reset-btn { flex: 1 0 100%; order: 3; margin-top: 6px; }
}

/* ── Toast Notifications ── */
.toast-container {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 9500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: min(400px, calc(100vw - 32px));
}
.toast {
  pointer-events: auto;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 6px 20px rgba(12, 8, 30, 0.18);
  animation: toastIn 0.25s ease forwards;
  opacity: 0;
  transform: translateY(-12px);
}
.toast.is-success {
  background: #1a6a3a;
  color: #e8f5ee;
}
.toast.is-error {
  background: #8b2020;
  color: #fce8e8;
}
.toast.is-removing {
  animation: toastOut 0.2s ease forwards;
}
@keyframes toastIn {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateY(-12px); }
}

/* ── Confirm Dialog ── */
.confirm-dialog {
  position: fixed;
  inset: 0;
  z-index: 9600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.confirm-dialog.hidden { display: none; }
.confirm-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 12, 32, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.confirm-dialog-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: linear-gradient(180deg, #f8fafd, #eef3f9);
  border: 1px solid rgba(86, 112, 138, 0.22);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(12, 8, 30, 0.2);
  padding: 22px 20px 16px;
}
.confirm-dialog-message {
  font-size: 14px;
  font-weight: 500;
  color: #2a3a4c;
  line-height: 1.5;
  margin: 0 0 18px;
  text-align: center;
}
.confirm-dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.confirm-dialog-btn {
  appearance: none;
  border-radius: 10px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.confirm-dialog-cancel {
  border: 1px solid rgba(90, 110, 140, 0.22);
  background: rgba(255, 255, 255, 0.6);
  color: #4a6a8a;
}
.confirm-dialog-cancel:hover { background: rgba(90, 122, 156, 0.12); }
.confirm-dialog-ok {
  border: 1px solid #2e6eb4;
  background: #2e6eb4;
  color: #fff;
}
.confirm-dialog-ok:hover { background: #245a96; border-color: #245a96; }
.confirm-dialog-ok.is-danger {
  border-color: #b42e2e;
  background: #b42e2e;
}
.confirm-dialog-ok.is-danger:hover { background: #962424; border-color: #962424; }
