/* ==========================================================================
   TopQnA - Flower Bouquet Generator Stylesheet
   Theme: TopQnA Brand (Emerald Green #0F5B45 | Gold #C8962E | Cream #FBF7EC)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

:root {
  /* TopQnA Brand Palette */
  --primary: #0F5B45;
  --primary-hover: #147257;
  --primary-dark: #0A3C2E;
  --primary-light: #E7F2EE;

  --accent: #C8962E;
  --accent-hover: #DCAB43;
  --accent-dark: #986E18;
  --accent-light: #FAF4E5;

  /* Neutrals (Light Mode) */
  --bg-body: #FBF7EC;
  --bg-surface: #FFFFFF;
  --bg-surface-alt: #F5EFE1;
  --bg-muted: #EFE8D6;

  --text-main: #1A2621;
  --text-muted: #576760;
  --text-light: #8E9E97;
  --text-white: #FFFFFF;

  --border-color: #E6DDC8;
  --border-subtle: #F0EAD9;

  /* Elevation Shadows */
  --shadow-sm: 0 2px 6px rgba(15, 91, 69, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 91, 69, 0.08);
  --shadow-lg: 0 16px 36px rgba(15, 91, 69, 0.12);
  --shadow-gold: 0 8px 20px rgba(200, 150, 46, 0.25);

  /* Dimensions & Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --max-width: 1240px;
  --header-height: 72px;

  /* Typography */
  --font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Transitions */
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  /* Morph Glass Effect Tokens (Light Mode) */
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-bg-hover: rgba(255, 255, 255, 0.9);
  --glass-surface-alt: rgba(245, 239, 225, 0.65);
  --glass-header-bg: rgba(251, 247, 236, 0.94);
  --glass-border: rgba(255, 255, 255, 0.7);
  --glass-border-subtle: rgba(200, 150, 46, 0.2);
  --glass-border-hover: rgba(200, 150, 46, 0.5);
  --glass-blur: blur(14px);
  --glass-blur-lg: blur(24px);
}

/* Dark Mode Tokens */
[data-theme="dark"] {
  --primary: #158364;
  --primary-hover: #1EB086;
  --primary-dark: #093427;
  --primary-light: #16362C;

  --accent: #E0AC38;
  --accent-hover: #F2C259;
  --accent-light: #2D2613;

  --bg-body: #0A1411;
  --bg-surface: #11201B;
  --bg-surface-alt: #162923;
  --bg-muted: #1B332B;

  --text-main: #F2F7F4;
  --text-muted: #A3B5AE;
  --text-light: #6E857C;

  --border-color: #1F3B32;
  --border-subtle: #172F27;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 8px 24px rgba(224, 172, 56, 0.15);

  --glass-bg: rgba(17, 32, 27, 0.82);
  --glass-bg-hover: rgba(17, 32, 27, 0.95);
  --glass-surface-alt: rgba(22, 41, 35, 0.7);
  --glass-header-bg: rgba(10, 20, 17, 0.9);
  --glass-border: rgba(255, 255, 255, 0.1);
}

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

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  color: var(--text-main);
  background-color: var(--bg-body);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Main Content Area */
.main-content {
  flex: 1 0 auto;
  padding-top: 2rem;
  padding-bottom: 3.5rem;
}

/* ==========================================================================
   TopQnA Site Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--glass-header-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(15, 91, 69, 0.05);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Brand Logo */
.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
}

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

.brand-name {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  letter-spacing: -0.5px;
}

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

.brand-tagline {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Navigation Links */
.main-nav {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

@media (min-width: 992px) {
  .main-nav {
    display: flex;
  }
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-main);
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  background: transparent;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: var(--primary-light) !important;
}

.nav-link.nav-gold-link {
  color: var(--accent);
  font-weight: 600;
}

.nav-link.nav-gold-link:hover {
  color: var(--accent-hover);
}

/* Dropdown */
.nav-item-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-dropdown-toggle {
  cursor: pointer;
  background: transparent;
  border: none;
  font-family: inherit;
}

.nav-dropdown-toggle .chevron-icon {
  width: 10px;
  height: 10px;
  transition: transform 0.25s ease;
  stroke-width: 2.5;
  opacity: 0.75;
}

.nav-item-dropdown:hover .nav-dropdown-toggle .chevron-icon,
.nav-item-dropdown:focus-within .nav-dropdown-toggle .chevron-icon {
  transform: rotate(180deg);
  opacity: 1;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 210px;
  background-color: var(--bg-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.35rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  z-index: 1050;
}

.nav-item-dropdown:hover .nav-dropdown-menu,
.nav-item-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-item {
  display: block;
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  text-decoration: none;
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
  white-space: nowrap;
}

.nav-dropdown-item:last-child {
  border-bottom: none;
}

.nav-dropdown-item:hover {
  background-color: var(--primary-light);
  color: var(--primary);
  padding-left: 1.5rem;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.action-btn {
  background: var(--bg-surface-alt);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.action-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 91, 69, 0.12);
}

.badge-pill {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--accent);
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.hamburger-btn {
  display: flex;
}

@media (min-width: 992px) {
  .hamburger-btn {
    display: none;
  }
}

/* ==========================================================================
   Mobile Navigation Drawer & Overlays
   ========================================================================== */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100%;
  background-color: var(--bg-surface);
  backdrop-filter: var(--glass-blur-lg);
  -webkit-backdrop-filter: var(--glass-blur-lg);
  border-left: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  z-index: 1060;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.mobile-drawer.active {
  right: 0;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.drawer-nav .nav-link {
  font-size: 0.95rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
}

/* Bookmarks Drawer */
.bookmarks-drawer {
  position: fixed;
  top: 0;
  right: -380px;
  width: 360px;
  max-width: 90vw;
  height: 100%;
  background-color: var(--bg-surface);
  backdrop-filter: var(--glass-blur-lg);
  -webkit-backdrop-filter: var(--glass-blur-lg);
  border-left: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  z-index: 1060;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.bookmarks-drawer.active {
  right: 0;
}

/* Back to Top Button */
.btn-back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 990;
}

.btn-back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.btn-back-to-top:hover {
  background: var(--accent);
  transform: translateY(-3px);
}

/* ==========================================================================
   Article & Bouquet Generator Styles (TopQnA Themed)
   ========================================================================== */
.seo-article {
  display: grid;
  gap: 2rem;
  max-width: 1080px;
  margin: 0 auto;
}

.article-header {
  text-align: center;
  padding: 0.5rem 0 0.5rem;
}

.article-kicker {
  display: inline-block;
  margin: 0 0 0.75rem;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.35rem 1rem;
}

[data-theme="dark"] .article-kicker {
  color: var(--accent);
  background: rgba(224, 172, 56, 0.12);
  border-color: rgba(224, 172, 56, 0.3);
}

.article-header h1 {
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  font-weight: 800;
  margin: 0;
  color: var(--primary);
  line-height: 1.2;
  letter-spacing: -0.5px;
}

[data-theme="dark"] .article-header h1 {
  color: var(--text-main);
}

.lede {
  margin: 1rem auto 0;
  max-width: 46rem;
  color: var(--text-muted);
  font-size: clamp(1rem, 2.4vw, 1.1rem);
  line-height: 1.7;
}

.article-section {
  text-align: center;
}

.article-section h2 {
  font-size: clamp(1.45rem, 3.2vw, 1.95rem);
  font-weight: 700;
  color: var(--primary);
  margin: 0 auto 0.8rem;
  line-height: 1.3;
}

[data-theme="dark"] .article-section h2 {
  color: var(--accent);
}

.article-section p {
  margin: 0 auto 0.95rem;
  max-width: 46rem;
  color: var(--text-main);
  font-size: clamp(0.95rem, 2.2vw, 1.02rem);
  line-height: 1.75;
}

.article-section p:last-child {
  margin-bottom: 0;
}

.tool-section {
  scroll-margin-top: 5rem;
}

.tool-section .app {
  margin-top: 1.5rem;
  text-align: left;
}

/* Cards */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.35rem 1.45rem;
  transition: var(--transition);
}

.app {
  display: grid;
  gap: 1.25rem;
}

/* Name Input Card */
.name-card .name-row {
  display: flex;
  gap: 0.85rem;
  align-items: flex-end;
  flex-wrap: wrap;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field.grow {
  flex: 1 1 260px;
  min-width: 0;
}

.field label, .group-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin: 0 0 0.15rem;
}

[data-theme="dark"] .field label,
[data-theme="dark"] .group-title {
  color: var(--accent);
}

#nameInput {
  width: 100%;
  font-family: var(--font-family);
  font-size: clamp(1.15rem, 3.2vw, 1.45rem);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-main);
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.7rem 1rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#nameInput:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15, 91, 69, 0.15);
}

[data-theme="dark"] #nameInput:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(224, 172, 56, 0.2);
}

.btn-col {
  display: flex;
  gap: 0.6rem;
  flex: 0 0 auto;
}

/* Buttons */
.btn {
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  padding: 0.68rem 1.15rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: var(--transition);
  color: var(--text-main);
  background: var(--bg-surface);
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(200, 150, 46, 0.35);
}

.btn-icon {
  font-size: 1.1em;
  line-height: 1;
}

/* Primary Button (Emerald TopQnA Gradient) */
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  border-color: var(--primary);
  color: #FFFFFF;
  width: 100%;
  box-shadow: 0 4px 14px rgba(15, 91, 69, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, #0A3C2E 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(15, 91, 69, 0.35);
}

/* Secondary Button (Gold / Elegant Accent or Outline) */
.btn-secondary {
  background: var(--bg-surface);
  border-color: var(--border-color);
  color: var(--primary);
  width: 100%;
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--primary-light);
  color: var(--primary-dark);
}

[data-theme="dark"] .btn-secondary {
  color: var(--accent);
}

[data-theme="dark"] .btn-secondary:hover {
  background: rgba(224, 172, 56, 0.12);
  border-color: var(--accent);
}

/* Ghost Button */
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text-main);
  background: var(--bg-surface-alt);
}

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.hint {
  margin: 0.6rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* App Grid Layout */
.app-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

/* Preview Card */
.preview-card {
  padding: 1.25rem;
}

.preview-wrap {
  position: relative;
  width: min(100%, 440px);
  margin: 0 auto;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--preview-bg, #fbf7ec);
  border: 1.5px solid var(--border-color);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.04);
}

.preview-wrap.is-transparent {
  background-color: #ffffff;
  background-image:
    conic-gradient(#e6ddc8 90deg, #ffffff 90deg 180deg, #e6ddc8 180deg 270deg, #ffffff 270deg);
  background-size: 22px 22px;
  background-position: 0 0;
}

#previewCanvas {
  display: block;
  width: 100%;
  height: 100%;
}

.empty-hint {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 1.5rem;
  text-align: center;
  font-family: var(--font-family);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text-muted);
  pointer-events: none;
}

.empty-hint[hidden] {
  display: none;
}

/* Legend Chips */
.legend-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: center;
  margin-top: 1rem;
  min-height: 0.5rem;
}

.chip {
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  padding: 0.25rem 0.75rem;
  background: var(--primary-light);
  border: 1px solid var(--border-color);
  color: var(--primary);
  display: inline-flex;
  gap: 0.4rem;
  align-items: baseline;
}

[data-theme="dark"] .chip {
  background: rgba(21, 131, 100, 0.2);
  color: #8ce1c3;
  border-color: rgba(21, 131, 100, 0.35);
}

.chip .chip-letter {
  font-weight: 800;
  color: var(--accent);
}

/* Controls Card */
.controls-card {
  display: grid;
  gap: 1.25rem;
}

.control-group {
  display: grid;
  gap: 0.65rem;
}

/* Bow Selector Gallery (Image 3 Feature) */
.bow-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.4rem;
}

.bow-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.55rem 0.35rem 0.45rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  outline: none;
}

.bow-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(15, 91, 69, 0.08);
}

.bow-card.is-active {
  border-color: var(--accent);
  background: var(--primary-light);
  box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 4px var(--accent);
}

[data-theme="dark"] .bow-card.is-active {
  background: rgba(224, 172, 56, 0.15);
}

.bow-card-canvas {
  width: 48px;
  height: 40px;
  display: block;
  pointer-events: none;
}

.bow-card-title {
  font-family: var(--font-family);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-main);
  text-align: center;
  line-height: 1.15;
  pointer-events: none;
}

.celebrate-pulse {
  animation: pulseBouquet 0.6s ease;
}

@keyframes pulseBouquet {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.swatch {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.1);
  cursor: pointer;
  padding: 0;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  background-clip: padding-box;
}

.swatch:hover {
  transform: scale(1.12);
}

.swatch:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(200, 150, 46, 0.4);
}

.swatch.is-active {
  box-shadow: 0 0 0 2.5px var(--bg-surface), 0 0 0 5px var(--accent);
}

.swatch.swatch-transparent {
  background-image:
    conic-gradient(#d9d4ce 90deg, #ffffff 90deg 180deg, #d9d4ce 180deg 270deg, #ffffff 270deg);
  background-size: 10px 10px;
  border-color: #cfc8c0;
}

.swatch.swatch-transparent::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  background: linear-gradient(45deg, transparent 45%, #e2574c 45%, #e2574c 55%, transparent 55%);
}

.color-field {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.color-field input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  width: 2.8rem;
  height: 2rem;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: none;
  padding: 2px;
  cursor: pointer;
}

.color-field input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-field input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 4px;
}

.controls-card .btn + .btn {
  margin-top: 0.2rem;
}

/* Accordion: A-Z Flower Mapping */
.mapping-card summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--primary);
  font-size: 1rem;
  padding: 0.2rem 0.3rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

[data-theme="dark"] .mapping-card summary {
  color: var(--accent);
}

.mapping-card summary::-webkit-details-marker {
  display: none;
}

.mapping-card summary::before {
  content: "▶";
  font-size: 0.8em;
  color: var(--accent);
  transition: transform 0.2s ease;
}

.mapping-card[open] summary::before {
  transform: rotate(90deg);
}

.mapping-card summary:focus-visible {
  outline: 2px solid var(--accent);
  border-radius: 6px;
}

.mapping-list {
  list-style: none;
  margin: 1rem 0 0.25rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.45rem 0.85rem;
}

.mapping-list li {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  font-size: 0.88rem;
  color: var(--text-main);
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.mapping-list li.is-used {
  background: var(--primary-light);
  border-color: var(--border-color);
}

[data-theme="dark"] .mapping-list li.is-used {
  background: rgba(21, 131, 100, 0.2);
  border-color: rgba(21, 131, 100, 0.4);
}

.mapping-list .map-letter {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--accent);
  min-width: 1.2rem;
  text-align: center;
}

.mapping-list .map-name {
  color: var(--text-muted);
}

/* Conclusion Banner */
.conclusion {
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-surface-alt) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-md);
}

.cta-btn {
  display: inline-flex;
  width: auto;
  margin-top: 0.75rem;
  text-decoration: none;
  padding: 0.78rem 1.75rem;
  font-size: 1rem;
}

/* ==========================================================================
   TopQnA Site Footer
   ========================================================================== */
.site-footer {
  background-color: #08281E;
  color: #CFE0D9;
  border-top: 4px solid var(--accent);
  padding: 4.5rem 0 2rem;
  margin-top: 4rem;
  position: relative;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3.5rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

.footer-brand-desc {
  font-size: 0.92rem;
  line-height: 1.7;
  color: #A3BFB5;
  margin: 1.25rem 0;
  max-width: 380px;
}

.footer-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: #F8DF9D;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background-color: var(--accent);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.footer-links a {
  color: #B4CCC3;
  font-size: 0.9rem;
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: #F8DF9D;
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: #8CA99E;
}

.footer-bottom a {
  color: #8CA99E;
  text-decoration: none;
  transition: var(--transition);
}

.footer-bottom a:hover {
  color: #F8DF9D;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
  }
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(140%);
  background: #1A2621;
  color: #FFFFFF;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-left: 4px solid var(--accent);
  z-index: 2000;
  max-width: min(92vw, 440px);
  text-align: center;
  transition: transform 0.28s ease;
  pointer-events: none;
}

.toast.is-visible {
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (min-width: 880px) {
  .app-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  }

  .preview-card {
    order: 0;
    position: sticky;
    top: 5.5rem;
  }

  .controls-card {
    order: 1;
  }
}

@media (max-width: 879px) {
  .name-card {
    order: 0;
  }

  .app-grid {
    display: contents;
  }

  .preview-card {
    order: 1;
  }

  .controls-card {
    order: 2;
  }

  .mapping-card {
    order: 3;
  }

  .btn-col {
    flex: 1 1 100%;
  }

  .btn-col .btn {
    flex: 1;
  }

  .card {
    padding: 1.1rem 1.15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
