/* ============================================
   GOOD MORNING WISHES — SAFFRON THEME
   ============================================ */

:root {
  --saf: #E8670A;
  --saf-dark: #B04E06;
  --saf-bg: #FEF0E6;
  --saf-border: #F5A96A;
  --white: #ffffff;
  --bg: #F7F4F0;
  --card-bg: #ffffff;
  --text-primary: #1a1a1a;
  --text-secondary: #6b6b6b;
  --text-muted: #999;
  --border: #e8e0d8;
  --green-wa: #25D366;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-card: 0 4px 20px rgba(232,103,10,0.15);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  font-family: 'Noto Sans', 'Noto Sans Devanagari', 'Noto Sans Tamil', 'Noto Sans Telugu', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  overflow: hidden;
  font-size: 15px;
  line-height: 1.5;
}

/* ---- SPLASH ---- */
.splash {
  position: fixed; inset: 0;
  background: linear-gradient(160deg, #FEF0E6 0%, #FBCFA0 100%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 999;
  transition: opacity 0.4s;
}
.splash-icon { font-size: 64px; margin-bottom: 16px; }
.splash-title { font-size: 28px; font-weight: 600; color: var(--saf-dark); }
.splash-sub { font-size: 15px; color: var(--saf); margin-top: 4px; }

/* ---- APP SHELL ---- */
.app {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
  max-width: 480px;
  margin: 0 auto;
}
.hidden { display: none !important; }
.invisible { opacity: 0; pointer-events: none; }

/* ---- SCREENS ---- */
.screen {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 70px;
  -webkit-overflow-scrolling: touch;
}
.screen.active { display: flex; }

/* ---- HEADER ---- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.header-greeting {
  font-size: 17px; font-weight: 600; color: var(--saf-dark);
  line-height: 1.2;
}
.header-tagline { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.header-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--saf-bg); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-fallback {
  display: none; width: 100%; height: 100%;
  align-items: center; justify-content: center;
  font-weight: 600; font-size: 16px; color: var(--saf);
}
.page-title { font-size: 20px; font-weight: 600; color: var(--text-primary); }
.search-btn { background: none; border: none; font-size: 20px; cursor: pointer; }

/* ---- SEARCH BAR ---- */
.search-bar { padding: 10px 16px; background: var(--white); border-bottom: 1px solid var(--border); }
.search-bar input {
  width: 100%; padding: 10px 16px; border-radius: 24px;
  border: 1.5px solid var(--saf-border); background: var(--saf-bg);
  font-size: 14px; color: var(--text-primary); outline: none;
  font-family: inherit;
}

/* ---- QUOTE STRIP ---- */
.quote-strip {
  display: flex; align-items: center; gap: 8px;
  margin: 12px 16px; padding: 10px 14px;
  background: var(--white); border-radius: var(--radius-sm);
  border: 1px solid var(--saf-border);
}
.quote-icon { font-size: 16px; flex-shrink: 0; }
.quote-text { font-size: 13px; color: var(--saf-dark); flex: 1; font-weight: 500; }

/* ---- CATEGORY CHIPS ---- */
.category-scroll {
  display: flex; gap: 8px; padding: 0 16px 12px;
  overflow-x: auto; scrollbar-width: none;
}
.category-scroll::-webkit-scrollbar { display: none; }
.cat-chip {
  flex-shrink: 0; padding: 7px 16px; border-radius: 20px;
  font-size: 13px; font-weight: 500; cursor: pointer;
  border: 1.5px solid var(--border); background: var(--white);
  color: var(--text-secondary); transition: all 0.15s; font-family: inherit;
}
.cat-chip.active {
  background: var(--saf-bg); border-color: var(--saf-border);
  color: var(--saf-dark);
}

/* ---- CARD CAROUSEL ---- */
.carousel-wrap { padding: 0 16px; }
.carousel {
  display: flex; gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; padding-bottom: 8px;
}
.carousel::-webkit-scrollbar { display: none; }

.card-item {
  flex-shrink: 0;
  width: calc(100vw - 32px);
  height: calc(100vw - 32px);
  scroll-snap-align: start;
  border-radius: var(--radius);
  overflow: hidden; position: relative;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.card-bg {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px; gap: 10px;
}
.card-bg img,
.card-item > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  border-radius: var(--radius);
}
.card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.45) 100%);
  border-radius: var(--radius);
}
.card-text-wrap {
  position: absolute; bottom: 48px; left: 0; right: 0;
  padding: 12px 16px; text-align: center;
}
.card-emoji { font-size: 52px; position: relative; z-index: 2; }
.card-title {
  font-size: 22px; font-weight: 600;
  color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  position: relative; z-index: 2;
}
.card-msg {
  font-size: 13px; color: rgba(255,255,255,0.92);
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
  position: relative; z-index: 2; line-height: 1.5;
}
.card-heart {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.9);
  border: none; cursor: pointer; z-index: 5;
  font-size: 18px; display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s;
}
.card-heart:active { transform: scale(0.85); }

/* CAROUSEL DOTS */
.carousel-dots {
  display: flex; justify-content: center; gap: 6px; margin: 8px 0;
}
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--saf-border); transition: all 0.2s;
}
.dot.active { width: 20px; border-radius: 3px; background: var(--saf); }

/* ---- ACTION BUTTONS ---- */
.action-buttons { display: flex; flex-direction: column; gap: 10px; padding: 4px 16px 12px; }

.btn-whatsapp {
  width: 100%; padding: 15px;
  background: var(--green-wa); color: white;
  border: none; border-radius: 50px; cursor: pointer;
  font-size: 16px; font-weight: 600; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: opacity 0.15s;
}
.btn-whatsapp:active { opacity: 0.85; }

/* ---- SOCIAL SHARE ROW ---- */
.social-row {
  display: flex; gap: 8px; justify-content: space-between;
}
.social-btn {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px;
  padding: 10px 4px; border-radius: 14px; border: none;
  cursor: pointer; transition: opacity 0.15s; font-family: inherit;
}
.social-btn:active { opacity: 0.75; transform: scale(0.95); }
.social-btn span { font-size: 10px; font-weight: 600; color: white; }
.social-btn.telegram  { background: #2AABEE; }
.social-btn.facebook  { background: #1877F2; }
.social-btn.instagram { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.social-btn.twitter   { background: #000000; }
.social-btn.save      { background: #34A853; }
.social-btn.more      { background: #6b6b6b; }

.btn-edit {
  width: 100%; padding: 14px;
  background: var(--saf-bg); color: var(--saf-dark);
  border: 2px solid var(--saf-border); border-radius: 50px; cursor: pointer;
  font-size: 14px; font-weight: 600; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: opacity 0.15s;
}
.btn-edit:active { opacity: 0.75; }
.btn-icon { font-size: 16px; }

/* ---- SIMILAR CARDS ---- */
.similar-section { padding: 0 16px 16px; }
.similar-title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 10px; }
.similar-scroll { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.similar-scroll::-webkit-scrollbar { display: none; }
.similar-card {
  flex-shrink: 0; width: 110px; height: 110px;
  border-radius: 12px; overflow: hidden;
  cursor: pointer; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.similar-card .card-emoji { font-size: 36px; }

/* ---- CATEGORIES SCREEN ---- */
.cat-list { padding: 8px 0; }
.cat-section-title {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  padding: 12px 16px 4px; letter-spacing: 0.5px; text-transform: uppercase;
}
.cat-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  cursor: pointer; background: var(--white);
}
.cat-row:active { background: var(--saf-bg); }
.cat-row-left { display: flex; align-items: center; gap: 14px; }
.cat-row-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--saf-bg); display: flex;
  align-items: center; justify-content: center; font-size: 22px;
}
.cat-row-name { font-size: 15px; font-weight: 500; color: var(--text-primary); }
.cat-row-count { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.cat-row-arrow { font-size: 20px; color: var(--text-muted); }

/* ---- FAVORITES & MY CARDS GRID ---- */
.fav-grid, .mycards-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; padding: 12px;
}
.grid-card {
  border-radius: 12px; overflow: hidden;
  aspect-ratio: 1; cursor: pointer; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.grid-card .card-emoji { font-size: 36px; }
.remove-fav {
  position: absolute; top: 6px; right: 6px;
  background: rgba(255,255,255,0.9); border: none;
  border-radius: 50%; width: 28px; height: 28px;
  font-size: 14px; cursor: pointer;
}

/* ---- EMPTY STATE ---- */
.empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 60px 32px; text-align: center; gap: 8px;
}
.empty-icon { font-size: 48px; margin-bottom: 8px; }
.empty-state p { font-size: 16px; font-weight: 500; color: var(--text-primary); }
.empty-state span { font-size: 13px; color: var(--text-muted); }

/* ---- PROFILE / SETTINGS ---- */
.profile-card {
  display: flex; align-items: center; gap: 14px;
  margin: 14px 16px; padding: 16px;
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--border);
}
.profile-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--saf-bg); display: flex; align-items: center;
  justify-content: center; font-size: 22px; font-weight: 600; color: var(--saf);
}
.profile-info h3 { font-size: 16px; font-weight: 600; color: var(--text-primary); }
.profile-info p { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.premium-card {
  display: flex; align-items: center; gap: 12px;
  margin: 0 16px 14px; padding: 14px;
  background: var(--saf-bg); border-radius: var(--radius);
  border: 1.5px solid var(--saf-border);
}
.premium-icon { font-size: 24px; }
.premium-text { flex: 1; }
.premium-text h4 { font-size: 14px; font-weight: 600; color: var(--saf-dark); }
.premium-text p { font-size: 12px; color: var(--saf); margin-top: 2px; }
.premium-btn {
  padding: 8px 16px; background: var(--saf); color: white;
  border: none; border-radius: 20px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit; white-space: nowrap;
}

.settings-list { padding-bottom: 20px; }
.settings-section-title {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  padding: 14px 16px 6px; text-transform: uppercase; letter-spacing: 0.5px;
}
.settings-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  background: var(--white); cursor: pointer;
}
.settings-row:active { background: var(--saf-bg); }
.settings-icon { font-size: 18px; width: 24px; text-align: center; }
.settings-label { flex: 1; font-size: 15px; color: var(--text-primary); }
.settings-value { font-size: 13px; color: var(--saf); font-weight: 500; }
.settings-arrow { font-size: 20px; color: var(--text-muted); }
.settings-select {
  border: none; background: transparent; font-size: 13px;
  color: var(--saf); font-weight: 500; outline: none; cursor: pointer;
  font-family: inherit;
}

/* TOGGLE SWITCH */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; border-radius: 12px;
  background: var(--border); transition: 0.3s; cursor: pointer;
}
.toggle-slider::before {
  content: ''; position: absolute;
  width: 18px; height: 18px; border-radius: 50%;
  background: white; left: 3px; top: 3px; transition: 0.3s;
}
.toggle input:checked + .toggle-slider { background: var(--saf); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ---- BOTTOM NAV ---- */
.bottom-nav {
  display: flex; align-items: center;
  height: 60px; background: var(--white);
  border-top: 1px solid var(--border);
  position: sticky; bottom: 0; z-index: 20;
  padding: 0 4px;
}
.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px; border: none; background: transparent;
  cursor: pointer; padding: 6px 4px; border-radius: 12px;
  transition: background 0.15s;
}
.nav-item:active { background: var(--saf-bg); }
.nav-icon { font-size: 22px; }
.nav-label { font-size: 10px; color: var(--text-muted); font-weight: 500; font-family: inherit; }
.nav-item.active .nav-label { color: var(--saf); }
.nav-item.active .nav-icon { filter: none; }

/* ---- MODALS ---- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: flex-end;
}
.modal.hidden { display: none; }

/* EDITOR MODAL */
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: var(--white);
  border-bottom: 1px solid var(--border);
}
.modal-back { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--saf); }
.modal-header h2 { font-size: 16px; font-weight: 600; }
.modal-preview {
  background: var(--saf-bg); border: 1.5px solid var(--saf-border);
  color: var(--saf-dark); border-radius: 20px; padding: 6px 14px;
  font-size: 13px; font-weight: 500; cursor: pointer; font-family: inherit;
}
.modal-body {
  background: var(--bg); flex: 1; overflow-y: auto;
  padding-bottom: 20px; -webkit-overflow-scrolling: touch;
}

/* Editor card preview */
.editor-card {
  margin: 14px 16px; border-radius: var(--radius);
  overflow: hidden; aspect-ratio: 1; box-shadow: var(--shadow-card);
}
.editor-bg {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px; gap: 8px;
}
.editor-title-text { font-size: 26px; font-weight: 700; }
.editor-msg-text { font-size: 14px; text-align: center; line-height: 1.6; }
.editor-name-text { font-size: 13px; font-weight: 500; margin-top: 8px; }

/* Editor fields */
.editor-fields { padding: 0 16px; display: flex; flex-direction: column; gap: 6px; }
.editor-fields label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; margin-top: 10px; }
.editor-fields input, .editor-fields textarea {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--white);
  font-size: 15px; color: var(--text-primary); outline: none; font-family: inherit;
  transition: border-color 0.15s;
}
.editor-fields input:focus, .editor-fields textarea:focus { border-color: var(--saf-border); }
.editor-fields textarea { height: 80px; resize: none; }

.font-choices { display: flex; gap: 8px; flex-wrap: wrap; }
.font-btn {
  padding: 8px 16px; border-radius: 20px; border: 1.5px solid var(--border);
  background: var(--white); font-size: 13px; cursor: pointer; font-family: inherit;
  color: var(--text-secondary);
}
.font-btn.active { border-color: var(--saf-border); background: var(--saf-bg); color: var(--saf-dark); }

.color-choices { display: flex; gap: 10px; }
.color-btn {
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  border: 3px solid transparent; transition: border-color 0.15s;
}
.color-btn.active { border-color: var(--saf); }

.editor-actions {
  display: flex; gap: 10px; padding: 16px;
}
.btn-save-draft {
  flex: 1; padding: 14px; border-radius: 50px;
  border: 1.5px solid var(--border); background: var(--white);
  font-size: 14px; font-weight: 500; cursor: pointer; font-family: inherit;
  color: var(--text-secondary);
}
.btn-save-share {
  flex: 2; padding: 14px; border-radius: 50px;
  background: var(--saf); color: white; border: none;
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
}

/* NAME MODAL */
.name-modal-box {
  background: var(--white); border-radius: var(--radius) var(--radius) 0 0;
  padding: 32px 24px; width: 100%; text-align: center;
}
.name-modal-box h3 { font-size: 20px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.name-modal-box p { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }
.name-modal-box input {
  width: 100%; padding: 14px 16px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--saf-border); font-size: 16px;
  text-align: center; outline: none; font-family: inherit;
  margin-bottom: 16px;
}
.name-modal-box button {
  width: 100%; padding: 15px; background: var(--saf); color: white;
  border: none; border-radius: 50px; font-size: 16px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}

/* PREMIUM MODAL */
.premium-modal-box {
  background: var(--white); border-radius: var(--radius) var(--radius) 0 0;
  padding: 28px 24px; width: 100%; text-align: center;
  max-height: 90vh; overflow-y: auto;
}
.premium-modal-icon { font-size: 48px; margin-bottom: 12px; }
.premium-modal-box h3 { font-size: 22px; font-weight: 700; color: var(--text-primary); }
.premium-modal-box > p { font-size: 14px; color: var(--text-muted); margin: 6px 0 20px; }
.premium-features { list-style: none; text-align: left; margin-bottom: 24px; display: flex; flex-direction: column; gap: 10px; }
.premium-features li { font-size: 15px; color: var(--text-primary); }
.premium-buy-btn {
  width: 100%; padding: 16px; background: var(--saf); color: white;
  border: none; border-radius: 50px; font-size: 16px; font-weight: 700;
  cursor: pointer; font-family: inherit; margin-bottom: 12px;
}
.premium-close-btn {
  width: 100%; padding: 12px; background: transparent; color: var(--text-muted);
  border: none; font-size: 14px; cursor: pointer; font-family: inherit;
}

/* ---- AD BANNERS ---- */
.ad-banner-top {
  width: 100%; min-height: 52px; background: #f9f9f9;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.ad-banner-bottom {
  width: 100%; min-height: 52px; background: #f9f9f9;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.ad-placeholder {
  width: 100%; min-height: 50px;
  display: flex; align-items: center; justify-content: center;
}
.ad-label {
  font-size: 11px; color: var(--text-muted); letter-spacing: 0.5px;
}
/* Hide ads for premium users */
.premium-user .ad-banner-top,
.premium-user .ad-banner-bottom { display: none !important; }

/* ---- EDITOR FULLSCREEN ---- */
.editor-fullscreen {
  position: fixed; inset: 0; background: var(--bg);
  display: flex; flex-direction: column; z-index: 101;
  overflow: hidden;
}
.editor-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; background: var(--white);
  border-bottom: 1px solid var(--border);
}
.editor-back-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--saf-bg); border: none;
  font-size: 22px; color: var(--saf); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.editor-header-title { flex: 1; }
.editor-header-title span { font-size: 15px; font-weight: 600; display: block; }
.editor-header-title small { font-size: 11px; color: var(--text-muted); }
.editor-preview-btn {
  padding: 8px 14px; background: var(--saf-bg);
  border: 1.5px solid var(--saf-border); color: var(--saf-dark);
  border-radius: 20px; font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit;
}

/* Card preview + sidebar */
.editor-preview-wrap {
  display: flex; gap: 8px; padding: 12px;
  background: var(--white); border-bottom: 1px solid var(--border);
}
.editor-sidebar {
  display: flex; flex-direction: column; gap: 6px;
}
.sidebar-btn {
  width: 60px; padding: 8px 4px; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--surface-1, #fafafa);
  cursor: pointer; font-size: 10px; display: flex; flex-direction: column;
  align-items: center; gap: 4px; color: var(--text-secondary);
  font-family: inherit;
}
.sidebar-btn:active { background: var(--saf-bg); border-color: var(--saf-border); }
.editor-card-preview {
  flex: 1; aspect-ratio: 1; border-radius: 12px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 16px; gap: 6px; min-height: 0;
  background: linear-gradient(135deg, #FEF0E6, #F5A96A);
}
.editor-title-text {
  font-size: 22px; font-weight: 600; text-align: center;
  color: #7A3504; line-height: 1.2;
}
.editor-msg-text {
  font-size: 12px; text-align: center;
  color: #7A3504; opacity: 0.85; line-height: 1.5;
}
.editor-name-text {
  font-size: 11px; font-weight: 600; color: #7A3504;
  margin-top: 4px;
}

/* Editor tabs */
.editor-tabs {
  display: flex; background: var(--white);
  border-bottom: 1px solid var(--border);
}
.etab {
  flex: 1; padding: 10px 4px; border: none; background: transparent;
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  cursor: pointer; font-family: inherit; border-bottom: 2px solid transparent;
  transition: all 0.15s;
}
.etab.active { color: var(--saf); border-bottom-color: var(--saf); }

/* Tab content */
.etab-content {
  display: none; overflow-y: auto; padding: 14px 16px;
  flex: 1; -webkit-overflow-scrolling: touch;
}
.etab-content.active { display: block; }
.tab-hint { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }

/* Language tip */
.lang-tip {
  background: var(--saf-bg); border: 1px solid var(--saf-border);
  border-radius: 10px; padding: 10px 12px;
  font-size: 12px; color: var(--saf-dark); margin-bottom: 14px;
  line-height: 1.5;
}
.lang-tip strong { color: var(--saf); }

/* Editor fields */
.editor-field-group { margin-bottom: 14px; }
.editor-label {
  display: block; font-size: 11px; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.5px; margin-bottom: 6px;
}
.editor-field-group input,
.editor-field-group textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid var(--border); background: var(--white);
  font-size: 15px; color: var(--text-primary); outline: none;
  font-family: inherit; transition: border-color 0.15s;
}
.editor-field-group input:focus,
.editor-field-group textarea:focus { border-color: var(--saf-border); }
.editor-field-group textarea { height: 80px; resize: none; }

/* Text effects */
.text-effects-row {
  display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap;
}
.effect-toggle {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-secondary); cursor: pointer;
  padding: 7px 14px; border-radius: 20px;
  border: 1.5px solid var(--border); background: var(--white);
}
.effect-toggle input { accent-color: var(--saf); }

/* Text size */
.size-row {
  display: flex; align-items: center; gap: 10px;
}
.size-a-sm { font-size: 13px; color: var(--text-muted); }
.size-a-lg { font-size: 22px; color: var(--text-muted); font-weight: 600; }
.size-row input[type=range] {
  flex: 1; accent-color: var(--saf);
}

/* Alignment */
.align-row { display: flex; gap: 8px; }
.align-btn {
  width: 44px; height: 36px; border-radius: 8px;
  border: 1.5px solid var(--border); background: var(--white);
  font-size: 16px; cursor: pointer;
}
.align-btn.active { background: var(--saf-bg); border-color: var(--saf-border); }

/* Font grid */
.font-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.font-card {
  padding: 14px 10px; border-radius: 12px;
  border: 1.5px solid var(--border); background: var(--white);
  cursor: pointer; display: flex; flex-direction: column;
  align-items: center; gap: 6px; transition: all 0.15s;
}
.font-card.active { border-color: var(--saf); background: var(--saf-bg); }
.font-preview { font-size: 17px; color: var(--saf-dark); }
.font-name { font-size: 11px; color: var(--text-muted); font-weight: 600; }

/* Font families */
.elegant-font     { font-family: 'Playfair Display', serif; font-style: italic; }
.handwritten-font { font-family: 'Dancing Script', cursive; }
.modern-font      { font-family: 'Poppins', sans-serif; letter-spacing: 1px; }
.classic-font     { font-family: 'Satisfy', cursive; }
.hindi-font       { font-family: 'Hind', 'Noto Sans Devanagari', sans-serif; }
.bold-font        { font-family: 'Noto Sans', sans-serif; font-weight: 700; }

/* Applied to card preview */
.font-elegant     .editor-title-text { font-family: 'Playfair Display', serif; font-style: italic; }
.font-handwritten .editor-title-text { font-family: 'Dancing Script', cursive; font-size: 26px; }
.font-modern      .editor-title-text { font-family: 'Poppins', sans-serif; letter-spacing: 1px; font-size: 18px; }
.font-classic     .editor-title-text { font-family: 'Satisfy', cursive; }
.font-hindi       .editor-title-text { font-family: 'Hind', 'Noto Sans Devanagari', sans-serif; }
.font-bold        .editor-title-text { font-family: 'Noto Sans', sans-serif; font-weight: 700; font-size: 24px; }

/* Color palette */
.color-palette {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 4px;
}
.cp-btn {
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  border: 3px solid transparent; transition: transform 0.15s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.cp-btn:active { transform: scale(0.9); }
.cp-btn.active { border-color: var(--saf); transform: scale(1.15); }

/* Background palette */
.bg-palette { display: flex; flex-wrap: wrap; gap: 10px; }
.bg-btn {
  width: 48px; height: 48px; border-radius: 10px; cursor: pointer;
  border: 3px solid transparent; transition: transform 0.15s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.bg-btn.active { border-color: var(--saf); transform: scale(1.1); }

/* Logo upload */
.logo-upload-box {
  border: 2px dashed var(--saf-border); border-radius: 12px;
  padding: 24px; text-align: center; cursor: pointer;
  background: var(--saf-bg); margin-top: 10px;
}
.logo-upload-box span { font-size: 28px; display: block; margin-bottom: 6px; }
.logo-upload-box p { font-size: 14px; font-weight: 500; color: var(--saf-dark); }
.logo-upload-box small { font-size: 12px; color: var(--text-muted); }
#logo-preview-wrap {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; background: var(--white);
  border-radius: 10px; border: 1px solid var(--border); margin-top: 10px;
}
#logo-preview { width: 60px; height: 60px; object-fit: contain; border-radius: 8px; }
#logo-preview-wrap button {
  background: none; border: none; color: #e24b4a;
  font-size: 13px; cursor: pointer; font-family: inherit;
}

/* Editor bottom actions */
.editor-bottom-actions {
  display: flex; gap: 10px; padding: 12px 16px;
  background: var(--white); border-top: 1px solid var(--border);
}
.btn-save-draft {
  flex: 1; padding: 14px; border-radius: 50px;
  border: 1.5px solid var(--border); background: var(--white);
  font-size: 14px; font-weight: 500; cursor: pointer;
  font-family: inherit; color: var(--text-secondary);
}
.btn-save-share {
  flex: 2; padding: 14px; border-radius: 50px;
  background: var(--saf); color: white; border: none;
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
}

/* ---- CARD NAME + PHOTO BADGE (on card preview) ---- */
.card-name-badge {
  display: flex; align-items: center; gap: 8px;
  margin-top: auto; padding-top: 8px;
  width: 100%;
}
.card-photo-circle {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.3); border: 2px solid rgba(255,255,255,0.6);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0; font-size: 16px;
}
.card-photo-circle img {
  width: 100%; height: 100%; object-fit: cover;
}
.editor-name-text {
  font-size: 11px; font-weight: 600;
  color: inherit; opacity: 0.9;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* Name + Photo badge on actual shared card (larger, for canvas reference) */
.card-badge-large {
  display: flex; align-items: center; gap: 10px;
  background: rgba(0,0,0,0.25); backdrop-filter: blur(4px);
  border-radius: 50px; padding: 6px 14px 6px 6px;
  width: fit-content;
}

/* ---- PHOTO SECTION (Name tab) ---- */
.photo-section {
  display: flex; align-items: center; gap: 14px;
  background: var(--saf-bg); border: 1.5px solid var(--saf-border);
  border-radius: 14px; padding: 14px;
}
.photo-circle-wrap {
  width: 64px; height: 64px; border-radius: 50%;
  border: 2.5px dashed var(--saf-border); background: var(--white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden; flex-shrink: 0; font-size: 28px;
  position: relative;
}
.photo-circle-wrap img {
  width: 100%; height: 100%; object-fit: cover;
}
.photo-section-text { flex: 1; }
.photo-section-text p { font-size: 13px; font-weight: 600; color: var(--saf-dark); }
.photo-section-text small { font-size: 11px; color: var(--text-muted); line-height: 1.4; display: block; margin-top: 2px; }
.photo-remove-btn {
  background: none; border: none; color: #e24b4a;
  font-size: 18px; cursor: pointer; padding: 4px;
}

/* Name position row */
.position-row { display: flex; gap: 6px; flex-wrap: wrap; }
.pos-btn {
  padding: 7px 10px; border-radius: 8px; font-size: 11px; font-weight: 600;
  border: 1.5px solid var(--border); background: var(--white);
  cursor: pointer; font-family: inherit; color: var(--text-secondary);
  white-space: nowrap;
}
.pos-btn.active { border-color: var(--saf); background: var(--saf-bg); color: var(--saf-dark); }

/* ---- HOME CARD — name/photo badge overlay ---- */
.card-user-badge {
  position: absolute; bottom: 12px; left: 12px;
  display: flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,0.35); backdrop-filter: blur(6px);
  border-radius: 50px; padding: 5px 12px 5px 5px;
  max-width: 70%;
}
.card-user-badge .badge-photo {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.7);
  object-fit: cover; background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; overflow: hidden; flex-shrink: 0;
}
.card-user-badge .badge-photo img { width: 100%; height: 100%; object-fit: cover; }
.card-user-badge .badge-name {
  font-size: 11px; font-weight: 600; color: white;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* SCROLLBAR HIDE */
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }
