:root {
  --max: 1360px;
  --color-bg-page: #f4f5fb;
  --color-header-bg: #ffffff;
  --color-surface: #ffffff;
  --color-surface-soft: #f9fafb;
  --color-border-subtle: #e5e7eb;
  --color-border-strong: #cbd5e1;
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-primary: #d81b60;
  --color-primary-soft: #fee2e2;
  --color-primary-strong: #b71555;
  --color-success: #16a34a;
  --color-info: #0ea5e9;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --radius-lg: 14px;
  --radius-full: 999px;
  --shadow-soft: 0 10px 30px rgba(15,23,42,0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
  background: var(--color-bg-page);
  color: var(--color-text);
  overflow-x: hidden;
  max-width: 100%;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0rem 0.6rem 3rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-header-bg);
  border-bottom: 1px solid var(--color-border-subtle);
  box-shadow: 0 8px 24px rgba(15,23,42,0.04);
}

.site-header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.75rem 0.5rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--color-text);
  font-weight: 700;
  font-size: 1.15rem;
  white-space: nowrap;
  min-width: 0;
  flex-shrink: 1;
}

.logo img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary-soft), #ffe4e6);
  color: var(--color-primary-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: .02em;
}

.logo-text {
  letter-spacing: .03em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.main-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 1rem;
  color: var(--color-text);
  font-weight: 500;
  transition: background-color .16s ease-out, color .16s ease-out, transform .14s ease-out;
}

.main-nav a.header-icon-btn {
  padding: 0;
}

.main-nav a:hover {
  background: var(--color-surface-soft);
  color: var(--color-text);
  transform: translateY(-1px);
}

.main-nav a:active {
  transform: translateY(0);
}

.nav-cta {
  font-weight: 600;
}

.nav-login {
  border: 1px solid var(--color-border-subtle);
}

.nav-login:hover {
  border-color: var(--color-border-strong);
}

.nav-register {
  background: var(--color-primary);
  color: #fff !important;
  margin-left: 0.2rem;
}

.nav-register:hover {
  background: var(--color-primary-strong) !important;
  color: #fff !important;
  transform: translateY(-1px);
}

.nav-register:active {
  transform: translateY(0);
}

.nav-admin {
  font-size: 0.85rem;
  opacity: 0.9;
}

.header-new-recipe {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .16s ease-out, color .16s ease-out, border-color .16s ease-out, transform .14s ease-out;
}

.header-new-recipe:hover {
  background: var(--color-primary-soft);
  border-color: var(--color-primary-strong);
  color: var(--color-primary-strong);
  transform: translateY(-1px);
}

.header-new-recipe:active {
  transform: translateY(0);
}

.site-search {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0.4rem;
  max-width: 400px;
  width: 100%;
  flex: 0 0 460px;
}

.site-search-input-wrap {
  position: relative;
  flex: 1 1 auto;
}

.site-search input[type="search"] {
  width: 100%;
  padding: 0.55rem 2.4rem 0.55rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--color-border-subtle);
  font-size: 0.9rem;
  background: var(--color-surface-soft);
  color: var(--color-text);
  outline: none;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.site-search input[type="search"]::placeholder {
  color: #9ca3af;
}

.site-search input[type="search"]:focus {
  border-color: var(--color-primary);
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(225,29,72,0.15);
}

.site-search-submit {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  width: 38px;
  height: 38px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'></circle><line x1='21' y1='21' x2='16.65' y2='16.65'></line></svg>");
}

.site-search input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.site-search-type-wrap {
  flex: 0 0 auto;
  position: absolute;
  right: 46px;
  top: 1px;
}

.site-search-type {
  padding: 0.75rem 0.6rem 0.6rem 0.5rem;
  min-width: 118px;
  border: 1px solid #ffffff;
  background: #ffffff;
  font-size: 0.85rem;
  font-weight: 500;
  color: #696d74;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #9ca3af 50%), linear-gradient(135deg, #9ca3af 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.site-search-type:focus {
  outline: none;
  border-color: transparent;
}

.site-search-clear {
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  margin-right: 10px;
  margin-top: -3px;
  font-size: 26px;
  line-height: 1;
  color: var(--color-primary);
  width: auto;
  height: auto;
}

.site-search-clear:hover {
  color: var(--color-primary-strong);
}

.site-search-clear[hidden] {
  display: none;
}

.site-header .site-search input[type="search"] {
  width: 100%;
}

.site-header .site-search-submit {
  padding: 0;
  border: none;
}

label { display: block; }
input, textarea, button {
  width: 100%;
  padding: .7rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font: inherit;
  accent-color: #d81b60;
}
button { cursor: pointer; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.card {
  border: 1px solid #eee;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.hero {
  background: linear-gradient(180deg, #fafafa, #ffffff);
  padding: 4rem 1rem;
  margin-bottom: 2rem;
}

.home-search {
  display: flex;
  gap: .5rem;
  margin-top: 1rem;
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

fieldset {
  margin: 1rem 0;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 0.8rem;
}

legend { padding: 0 .4rem; }
.consent { display: block; margin: .6rem 0; }
#btnRegister[disabled] { opacity: .6; cursor: not-allowed; }
.req-note { font-size: .9rem; opacity: .8; }

.process-result {
  max-width: 520px;
  margin: 3rem auto;
  padding: 2rem;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0,0,0,.08);
  border: 1px solid #eee;
  background: #fff;
}
.process-result .icon { font-size: 3.2rem; margin-bottom: 1rem; line-height: 1; }
.process-result h1 { margin-top: 0; font-size: 1.9rem; font-weight: 600; }
.process-result p { line-height: 1.5; margin: .5rem 0 .8rem; }
.process-result .lead { font-size: 1.05rem; opacity: .85; }
.process-result .btn-main {
  display: inline-block;
  margin-top: 1.4rem;
  padding: .65rem 1.2rem;
  background: #2563eb;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: background .15s ease;
}
.process-result .btn-main:hover { background: #1e4fc2; }
.process-result.success .icon { color: #10b981; }
.process-result.info .icon { color: #0ea5e9; }
.process-result.warning .icon { color: #f59e0b; }
.process-result.error .icon { color: #ef4444; }

.site-footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 2rem;
}
.site-footer-top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  align-items: flex-start;
}
.site-footer-logo-block {
  display: flex;
  flex-direction: column;
}
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: #f9fafb;
  font-weight: 700;
  letter-spacing: .03em;
}
.footer-logo-text {
  font-size: 1.15rem;
}
.footer-tagline {
  margin-top: 0.7rem;
  font-size: 0.95rem;
  color: #ffffff;
  line-height: 1.6;
}
.footer-socials {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.2rem;
}
.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transition: background 0.2s ease, transform 0.2s ease;
}
.footer-social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.footer-social-link:hover {
  background: #fb7185;
  transform: translateY(-2px);
}
.site-footer-menu-block {
  display: flex;
  flex-direction: column;
}
.footer-heading {
  margin: 0 0 1.2rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  background: transparent;
  display: block;
  padding: 0 0 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.footer-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.footer-menu-list a {
  text-decoration: none;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.footer-menu-list a:hover {
  color: #ffffff;
  padding-left: 4px;
}
.site-footer-newsletter {
  display: flex;
  flex-direction: column;
}
.footer-newsletter-lead {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  color: #ffffff;
}
.newsletter-form {
  display: flex;
  flex-direction: column;
}
.newsletter-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}
.newsletter-field label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #ffffff;
}
.newsletter-field input[type="text"],
.newsletter-field input[type="email"] {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  background: #efefef;
  color: #000000;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}
.newsletter-field input[type="text"]::placeholder,
.newsletter-field input[type="email"]::placeholder {
  color: #6b7280;
}
.newsletter-field input[type="text"]:focus,
.newsletter-field input[type="email"]:focus {
  border-color: #fb7185;
  box-shadow: 0 0 0 1px rgba(251,113,133,0.5);
  background: #efefef;
}
.newsletter-consent label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #ffffff;
}
.newsletter-consent input[type="checkbox"] {
  margin-top: 0.15rem;
  width: 20px;
}
.newsletter-error {
  font-size: 0.8rem;
  color: #fecaca;
}
.newsletter-error-general {
  margin-top: 0.2rem;
}
.newsletter-submit-btn {
  margin-top: 0.4rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #d81b60, #fb7185);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}
.newsletter-submit-btn:hover {
  background: linear-gradient(135deg, #e40c5b, #fb5f75);
}

.site-footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148,163,184,0.3);
}
.footer-copy {
  margin: 0;
  font-size: 0.85rem;
  color: #ffffff;
}

.newsletter-success {
  display: none;
  margin-top: 8px;
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: 6px;
  background: #d1e7dd;
  color: #0f5132;
  border: 1px solid #badbcc;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.newsletter-success--visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.site-search-suggestions {
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 4px;
  width: 100%;
  max-height: 340px;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--color-border-subtle);
  box-shadow: 0 14px 30px rgba(15,23,42,0.18);
  padding: 0.4rem 0;
  z-index: 1200;
}
.site-search-suggestions-group-title {
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-text-muted);
  padding: 0.25rem 0.9rem 0.1rem;
}
.site-search-suggestion {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--color-text);
  cursor: pointer;
}
.site-search-suggestion-thumb {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  overflow: hidden;
  background: #f3f4f6;
}
.site-search-suggestion-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.site-search-suggestion-thumb-placeholder {
  width: 100%;
  height: 100%;
}
.site-search-suggestion-main {
  flex: 1 1 auto;
  min-width: 0;
}
.site-search-suggestion-title {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}
.site-search-suggestion:hover {
  background: var(--color-surface-soft);
}
.site-search-suggestions-empty {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.site-search-suggestion-thumb--recipes {
  background: linear-gradient(135deg, #fecaca, #fb7185);
}
.site-search-suggestion-thumb--ingredients {
  background: linear-gradient(135deg, #bbf7d0, #4ade80);
}
.site-search-suggestion-thumb--articles {
  background: linear-gradient(135deg, #bfdbfe, #60a5fa);
}

.header-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border-subtle);
  background: #ffffff;
  padding: 0;
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color .16s ease-out, border-color .16s ease-out, box-shadow .16s ease-out, transform .14s ease-out;
}
.header-auth .header-auth-icon, 
.header-search-toggle, 
.header-new-recipe-icon, 
.header-menu-toggle {
  display: none !important;
}
.header-icon-btn:hover {
  background: var(--color-surface-soft);
  border-color: var(--color-border-strong);
  transform: translateY(-1px);
}
.header-icon-btn:active {
  transform: translateY(0);
}
.header-icon-btn::before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px;
}
.header-auth-icon::before {
  width: 22px;
  height: 22px;
  background-size: 22px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='8' r='4'></circle><path d='M4 20a8 8 0 0 1 16 0'></path></svg>");
}
.header-search-toggle::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'></circle><line x1='21' y1='21' x2='16.65' y2='16.65'></line></svg>");
}
.header-new-recipe-icon::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='4' y='4' width='12' height='16' rx='2'></rect><line x1='8' y1='9' x2='12' y2='9'></line><line x1='8' y1='13' x2='12' y2='13'></line><circle cx='18' cy='18' r='3'></circle><line x1='18' y1='16.5' x2='18' y2='19.5'></line><line x1='16.5' y1='18' x2='19.5' y2='18'></line></svg>");
}
.header-menu-toggle::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><line x1='4' y1='7' x2='20' y2='7'></line><line x1='4' y1='12' x2='20' y2='12'></line><line x1='4' y1='17' x2='20' y2='17'></line></svg>");
}
.site-header.header-search-open .header-search-toggle {
  background: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px rgba(248,113,133,0.5);
}
.site-header.header-search-open .header-search-toggle::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'></circle><line x1='21' y1='21' x2='16.65' y2='16.65'></line></svg>");
}
.header-auth {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.35);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 830;
}
body.mobile-menu-open::before {
  opacity: 1;
}

.mobile-menu {
  position: fixed;
  top: 60px;
  bottom: 0;
  right: 0;
  width: 82vw;
  max-width: 360px;
  background: #ffffff;
  box-shadow: -8px 0 24px rgba(15,23,42,0.25);
  display: flex;
  flex-direction: column;
  padding-top: 1.5rem;
  border-top-left-radius: 15px;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform .28s cubic-bezier(0.22,0.61,0.36,1), opacity .2s ease-out;
  z-index: 850;
}

.ag__btn--danger { border-color: rgba(248,113,113,.8); background: rgba(127,29,29,.25); }
.ag { position: fixed; inset: 0; z-index: 99999; }
#adminGallery .ag__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.86); z-index: 0; }
#adminGallery .ag__panel { position: relative; inset: 0; display: flex; flex-direction: column; z-index: 1; }
#adminGallery .ag__close {
  position: absolute !important;
  top: 14px !important;
  right: 16px !important;
  width: auto !important;
  height: auto !important;
  max-width: max-content !important;
  align-self: flex-end !important;
  left: auto !important;
  bottom: auto !important;
  transform: none !important;
  margin: 0 !important;
  z-index: 1000 !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-size: 34px !important;
  line-height: 1 !important;
  background: transparent !important;
  border: 0 !important;
  color: #fff !important;
  cursor: pointer !important;
  padding: 6px 10px !important;
}
#adminGallery .ag__top { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; justify-content: flex-start; padding: 18px 18px 10px 18px; }
#adminGallery .ag__title { max-width: 80vw; color: #fff; font-weight: 700; font-size: 28px; }
#adminGallery .ag__topActions { display: flex; flex-direction: row; gap: 8px; align-items: center; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; }
.ag__btn { border: 1px solid rgba(255,255,255,.28); background: rgba(0,0,0,.25); color: #fff; border-radius: 10px; padding: 8px 10px; cursor: pointer; text-decoration: none; font-weight: 700; font-size: 13px; }
.ag__btn--primary { border-color: rgba(255,255,255,.55); }
.ag__btn:disabled { opacity: .6; cursor: not-allowed; }
.ag__btn--on { background: rgba(22,163,74,.35) !important; border-color: rgba(134,239,172,.85) !important; }
.ag__stage { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; padding: 8px 16px 18px 16px; min-height: 60vh; }
.ag__img { max-width: 92vw; max-height: 78vh; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,.55); background: rgba(255,255,255,.03); }
.ag__nav { padding-top: 2px; position: absolute; top: 50%; transform: translateY(-50%); width: 54px; height: 54px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); background: rgba(0,0,0,.3); color: #fff; font-size: 38px; line-height: 0; cursor: pointer; }
.ag__nav--left { left: 16px; }
.ag__nav--right { right: 16px; }
.ag__hint { color: rgba(255,255,255,.85); font-size: 12px; padding: 0 18px 14px 18px; min-height: 20px; }
.agThumb { width: 60px; height: 40px; object-fit: cover; border-radius: 8px; border: 1px solid #e5e7eb; cursor: pointer; }
.agNoImg { color: #6b7280; font-size: .85rem; }
#adminGallery .ag__btn { white-space: nowrap; }
#adminGallery #agLockBtn { white-space: nowrap; }
#adminGallery .agNoImg { color: rgba(255,255,255,.75); font-size: 14px; padding: 12px 14px; border: 1px dashed rgba(255,255,255,.25); border-radius: 12px; }

@media(max-width: 1350px) {
  .nav-login, .nav-register { display: none !important; }
  .header-auth .header-auth-icon { display: inline-flex !important; }
}

@media(max-width: 1100px) {
  .site-header.header-search-open { padding-bottom: 3.2rem; }
  .site-header-inner { position: relative; }
  .site-search {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 0 0.5rem;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    flex: 1 1 auto;
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    display: none;
    z-index: 900;
    flex-direction: row;
    align-items: stretch;
    gap: 0.4rem;
  }
  .site-header.header-search-open .site-search { display: flex; }
  .site-search-type-wrap { position: absolute; right: 53px; top: 1px; width: auto; }
  .site-search-type { width: auto; }
  .header-search-toggle { display: inline-flex !important; }
}

@media(max-width: 992px) {
  .site-footer-top {
    grid-template-columns: 1fr 1fr;
  }
}

@media(max-width: 768px) {
  .site-header-inner { gap: 0.8rem; }
  .header-left { gap: 0.6rem; }
  .header-right { gap: 0.6rem; }
  .header-new-recipe { display: none !important; }
  .main-nav { display: flex; align-items: center; gap: 0.4rem; }
  .main-nav > a { display: none !important; }
  .header-new-recipe-icon, .header-menu-toggle { display: inline-flex !important; }
  
  .mobile-menu { padding-inline: 1.4rem; }
  .mobile-menu a {
    display: block;
    padding: 0.75rem 0;
    text-decoration: none;
    font-size: 0.98rem;
    color: var(--color-text);
    border-bottom: 1px solid rgba(226,232,240,0.7);
  }
  .mobile-menu a:last-child { border-bottom: none; }
  .mobile-menu a:hover { background: var(--color-surface-soft); }
  .site-header.header-menu-open .mobile-menu {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }
  .site-header.header-menu-open .header-menu-toggle {
    background: #efefef;
    border-color: #efefef;
    box-shadow: 0 0 0 1px rgba(211,211,211,0.5);
  }
  .site-header.header-menu-open .header-menu-toggle::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><line x1='18' y1='6' x2='6' y2='18'></line><line x1='6' y1='6' x2='18' y2='18'></line></svg>");
  }
}

@media(max-width: 600px) {
  .site-footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .site-footer-newsletter {
    order: 4;
  }
}

@media(max-width: 420px) {
  .header-auth .header-auth-icon, .header-new-recipe-icon { display: none !important; }
}

@media(prefers-color-scheme: dark) {
  body { background: #020617; color: #e5e7eb; }
  .site-header { background: #020617; border-bottom-color: #1e293b; box-shadow: 0 10px 40px rgba(0,0,0,.7); }
  .site-header-inner { border-color: transparent; }
  .logo-mark { background: linear-gradient(135deg, #4c0519, #881337); color: #fecdd3; }
  .main-nav a { color: #cbd5f5; }
  .main-nav a:hover { background: #0f172a; color: #ffffff; }
  .nav-register { background: var(--color-primary-strong); color: #fff !important; }
  .nav-register:hover { background: #f43f5e; color: #fff !important; }
  .header-new-recipe { background: transparent; border: 1px solid var(--color-primary-soft); color: var(--color-primary-soft); }
  .header-new-recipe:hover { background: #111827; border-color: var(--color-primary); color: var(--color-primary); }
  .site-search input[type="search"] { background: #020617; border-color: #1f2937; color: #e5e7eb; }
  .site-search input[type="search"]:focus { background: #020617; border-color: #d81b60; box-shadow: 0 0 0 1px rgba(248,113,113,0.4); }
  .card { border-color: #1e293b; background: #020617; }
  .hero { background: linear-gradient(180deg, #020617, #020617); }
  .process-result { background: #020617; border-color: #1e293b; box-shadow: 0 6px 24px rgba(0,0,0,.6); color: #e5e7eb; }
  .process-result .btn-main { background: #3b82f6; }
  .process-result .btn-main:hover { background: #2563eb; }
  
  .site-search-suggestions { background: #020617; border-color: #1f2937; box-shadow: 0 20px 40px rgba(0,0,0,0.85); }
  .site-search-suggestion:hover { background: #0f172a; }
  .site-search-suggestion-thumb { background: #0f172a; }
  
  .header-icon-btn { background: #020617; border-color: #1e293b; }
  .header-icon-btn:hover { background: #0f172a; border-color: #334155; }
  .header-auth-icon::before { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e5e7eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='8' r='4'></circle><path d='M4 20a8 8 0 0 1 16 0'></path></svg>"); }
  .header-search-toggle::before { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23e5e7eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'></circle><line x1='21' y1='21' x2='16.65' y2='16.65'></line></svg>"); }
  .mobile-menu { background: #020617; box-shadow: -10px 0 30px rgba(0,0,0,0.9); }
}

@media(prefers-color-scheme: dark) and (max-width: 768px) {
  .mobile-menu a { color: #e5e7eb; border-bottom-color: #1f2937; }
  .mobile-menu a:hover { background: #0f172a; }
}
.np{
	display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: #f8fafc; color: #cbd5e1; font-size: 3rem; user-select: none;
}