/* ============================================================
   SchemaForge — Style System
   Dark theme, teal accents, developer-tool aesthetic
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: #1a2235;
  --bg-input: #0f1629;
  --bg-code: #0d1117;
  --border: #1e2d4a;
  --border-focus: #14b8a6;
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #14b8a6;
  --accent-hover: #2dd4bf;
  --accent-glow: rgba(20, 184, 166, 0.15);
  --accent-subtle: rgba(20, 184, 166, 0.08);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.1);
  --warning: #f59e0b;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 30px rgba(20, 184, 166, 0.1);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  --transition: 0.2s ease;
  --container: 1280px;
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 { line-height: 1.3; font-weight: 700; }
h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.35rem, 3vw, 2rem); letter-spacing: -0.02em; }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }
p { color: var(--text-secondary); }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --- Navigation --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.navbar-brand svg { flex-shrink: 0; }

.navbar-brand span.accent { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  background: var(--accent-subtle);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 0.75rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 1rem; width: 100%; }
}

/* --- Hero Section --- */
.hero {
  text-align: center;
  padding: 4rem 0 3rem;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero h1 { margin-bottom: 1rem; position: relative; }
.hero h1 .accent { color: var(--accent); }

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 2rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-subtle);
  border: 1px solid rgba(20, 184, 166, 0.2);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* --- Schema Type Cards (Home) --- */
.schema-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  padding: 1rem 0 3rem;
}

.schema-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.schema-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.schema-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

.schema-card:hover::before { opacity: 1; }

.schema-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--accent-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 1.5rem;
}

.schema-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.schema-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  flex: 1;
  margin-bottom: 1rem;
}

.schema-card-arrow {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.3s ease;
}

.schema-card:hover .schema-card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* --- Generator Layout --- */
.generator-page {
  padding: 2rem 0;
}

.generator-header {
  margin-bottom: 2rem;
}

.generator-header h1 {
  margin-bottom: 0.5rem;
}

.generator-header p {
  font-size: 1rem;
}

.generator-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

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

/* --- Panels --- */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}

.panel-header h2 {
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-header .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}

.panel-body {
  padding: 1.25rem;
}

/* --- Forms --- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group label .required {
  color: var(--danger);
  margin-left: 2px;
}

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

@media (max-width: 540px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .form-row-3 { grid-template-columns: 1fr; }
}

input[type="text"],
input[type="url"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
textarea,
select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  padding: 0.65rem 0.85rem;
  transition: all var(--transition);
  outline: none;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

input.invalid, textarea.invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-bg);
}

textarea {
  min-height: 80px;
  resize: vertical;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 6l3.5 4 3.5-4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}

select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #0a0e17;
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 20px rgba(20, 184, 166, 0.3);
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid transparent;
}
.btn-danger:hover {
  border-color: var(--danger);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
}

.btn-copy {
  background: var(--accent);
  color: #0a0e17;
  font-weight: 700;
}

.btn-copy:hover {
  background: var(--accent-hover);
}

.btn-copy.copied {
  background: var(--success);
}

/* --- Code Preview --- */
.code-preview {
  position: relative;
}

.code-preview pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--text-secondary);
  max-height: 500px;
  overflow-y: auto;
  tab-size: 2;
}

.code-preview pre::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.code-preview pre::-webkit-scrollbar-track {
  background: transparent;
}

.code-preview pre::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.code-actions {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

/* --- JSON Syntax Highlighting --- */
.json-key { color: #7dd3fc; }
.json-string { color: #86efac; }
.json-number { color: #fbbf24; }
.json-bool { color: #c084fc; }
.json-null { color: #f87171; }
.json-bracket { color: #64748b; }

/* --- Rich Result Preview --- */
.rich-preview {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-top: 1rem;
  color: #202124;
  font-family: Arial, sans-serif;
}

.rich-preview-title {
  font-size: 1.15rem;
  color: #1a0dab;
  font-weight: normal;
  margin-bottom: 0.15rem;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.rich-preview-url {
  font-size: 0.8rem;
  color: #202124;
  margin-bottom: 0.25rem;
}

.rich-preview-url span {
  color: #4d5156;
}

.rich-preview-desc {
  font-size: 0.85rem;
  color: #4d5156;
  line-height: 1.5;
}

.rich-preview-breadcrumb {
  font-size: 0.75rem;
  color: #70757a;
}

.rich-preview-faq {
  border-top: 1px solid #dadce0;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}

.rich-preview-faq-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid #dadce0;
}

.rich-preview-faq-item:last-child {
  border-bottom: none;
}

.rich-preview-faq-q {
  font-size: 0.9rem;
  color: #202124;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rich-preview-faq-q::after {
  content: '▼';
  font-size: 0.6rem;
  color: #70757a;
}

.rich-preview-rating {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.rich-preview-stars {
  color: #fbbc04;
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.rich-preview-rating-text {
  font-size: 0.8rem;
  color: #70757a;
}

.rich-preview-price {
  font-size: 0.9rem;
  color: #202124;
  font-weight: 600;
  margin-top: 0.25rem;
}

.rich-preview-event-date {
  font-size: 0.85rem;
  color: #70757a;
  margin-top: 0.25rem;
}

.rich-preview-recipe-meta {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: #70757a;
}

.rich-preview-label {
  display: inline-block;
  background: #e8f0fe;
  color: #1967d2;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  margin-bottom: 0.5rem;
}

/* --- Dynamic Items (Q&A pairs, Steps, etc.) --- */
.dynamic-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dynamic-item {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  position: relative;
  animation: slideIn 0.25s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.dynamic-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.dynamic-item-number {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dynamic-item .btn-danger {
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
}

.add-item-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.add-item-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-subtle);
}

/* --- Cross-links / Schema Type Nav --- */
.schema-type-nav {
  padding: 3rem 0;
}

.schema-type-nav h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.schema-type-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.schema-type-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
}

.schema-type-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-subtle);
}

.schema-type-pill.current {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0e17;
}

/* --- Guide Section --- */
.guide-section {
  padding: 3rem 0;
}

.guide-section h2 {
  margin-bottom: 1.5rem;
}

.guide-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}

.guide-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.guide-step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-subtle);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.guide-step h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.guide-step p {
  font-size: 0.85rem;
}

/* --- Ad Slots --- */
.ad-slot {
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  margin: 1.5rem 0;
  opacity: 0.5;
}

.ad-slot-sidebar {
  min-height: 250px;
}

/* --- Validation Messages --- */
.validation-msg {
  font-size: 0.75rem;
  margin-top: 0.3rem;
  display: none;
}

.validation-msg.show { display: block; }
.validation-msg.error { color: var(--danger); }
.validation-msg.success { color: var(--success); }

/* --- Test Link Banner --- */
.test-banner {
  background: linear-gradient(135deg, var(--bg-card), rgba(20, 184, 166, 0.05));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.test-banner-text h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.test-banner-text p {
  font-size: 0.85rem;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 3rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-brand a {
  color: var(--text-secondary);
}

.footer-brand a:hover { color: var(--accent); }

.footer-links {
  display: flex;
  gap: 1.25rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-links a:hover { color: var(--accent); }

/* --- Section Divider --- */
.section-divider {
  height: 1px;
  background: var(--border);
  margin: 2.5rem 0;
}

/* --- Tooltip / Toast --- */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
  pointer-events: none;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* --- Feature Badges --- */
.features-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin: 2rem 0 0;
}

.feature-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.feature-badge svg {
  color: var(--accent);
}

/* --- Tabs --- */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.tab {
  padding: 0.6rem 1.1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font-sans);
}

.tab:hover { color: var(--text-secondary); }

.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* --- Breadcrumb --- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { opacity: 0.5; }

/* --- Stats Section (Home) --- */
.stats-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  padding: 2rem 0;
}

.stat-card {
  text-align: center;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* --- Utility --- */
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.gap-1 { gap: 0.5rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* --- Scrollbar global --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* --- Buy Me a Coffee --- */
.bmc-footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 100px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}

.bmc-footer-btn:hover {
  background: var(--accent);
  color: #0a0e17;
  box-shadow: 0 0 20px rgba(20, 184, 166, 0.25);
}

.bmc-floating {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  text-decoration: none;
}

.bmc-floating:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(20, 184, 166, 0.15);
}

/* --- Print --- */
@media print {
  .navbar, .footer, .ad-slot, .test-banner, .schema-type-nav, .guide-section { display: none; }
  body { background: #fff; color: #000; }
  .panel { border: 1px solid #ccc; }
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.fade-in { animation: fadeIn 0.4s ease; }

/* --- Opening Hours Grid --- */
.hours-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hours-row {
  display: grid;
  grid-template-columns: 120px 1fr 1fr auto;
  gap: 0.5rem;
  align-items: center;
}

@media (max-width: 540px) {
  .hours-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
  }
  .hours-row .day-label {
    grid-column: 1 / -1;
  }
}

.day-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* --- Checkbox --- */
.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.checkbox-wrapper input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* --- Multi-input (tags-style for ingredients, social, etc.) --- */
.multi-input-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.multi-input-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.multi-input-row input {
  flex: 1;
}

/* --- Sticky sidebar --- */
@media (min-width: 1025px) {
  .sticky-panel {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }
}
