:root {
  --bg: #1a2830;
  --bg-warm: #243545;
  --gold: #D9B671;
  --gold-dk: #b89550;
  --cream: #F4EBE0;
  --burg: #602537;
  --burg-lt: #8c3a52;
  --border: rgba(217,182,113,0.18);
  --text-dim: rgba(244,235,224,0.6);
  --text-faint: rgba(244,235,224,0.4);
  --safe-top: env(safe-area-inset-top, 0);
  --safe-bottom: env(safe-area-inset-bottom, 0);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--cream); -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
#app-root { min-height: 100vh; padding-top: var(--safe-top); padding-bottom: var(--safe-bottom); display: flex; flex-direction: column; }

/* SPLASH */
.splash { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.splash-logo { font-family: 'Playfair Display', serif; font-size: 96px; font-weight: 700; color: var(--cream); }
.splash-logo span { color: var(--gold); font-style: italic; }
.splash-tag { font-size: 11px; letter-spacing: 6px; color: var(--gold); }

/* AUTH SCREENS */
.auth-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 40px 24px; }
.auth-hero { text-align: center; margin-bottom: 28px; }
.auth-logo {
  width: min(280px, 82vw);
  aspect-ratio: 900 / 465;
  margin: 0 auto;
  background: url('/app/images/ke-wellness-logo-transparent.png') center / contain no-repeat;
  filter: drop-shadow(0 18px 34px rgba(0,0,0,0.18));
  font-size: 0;
  line-height: 0;
}
.auth-logo span { display: none; }
.auth-tag { display: none; }
.auth-title { font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 700; margin: 24px 0 6px; }
.auth-sub { font-family: 'Cormorant Garamond', serif; font-style: italic; color: var(--text-dim); font-size: 16px; margin-bottom: 28px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-input { background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; color: var(--cream); font-size: 15px; font-family: inherit; outline: none; }
.auth-input:focus { border-color: var(--gold); background: rgba(217,182,113,0.06); }
.auth-input::placeholder { color: var(--text-faint); }
.auth-password-wrap { position: relative; display: flex; align-items: center; }
.auth-password-wrap .auth-input { width: 100%; padding-right: 70px; }
.auth-password-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); min-width: 48px; min-height: 36px; border: 0; background: transparent; color: var(--gold); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.auth-password-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 8px; }
.auth-error { color: #ff8a8a; font-size: 13px; min-height: 18px; }
.auth-btn { background: var(--gold); color: var(--bg); border: none; border-radius: 28px; padding: 15px; font-weight: 700; font-size: 14px; letter-spacing: 0.4px; text-transform: uppercase; cursor: pointer; }
.auth-btn:disabled { opacity: 0.5; }
.auth-btn-secondary { background: transparent; color: var(--gold); border: 1px solid var(--border); }
.auth-link { color: var(--gold); text-align: center; font-style: italic; font-family: 'Cormorant Garamond', serif; font-size: 14px; cursor: pointer; padding: 8px; background: none; border: none; }
.auth-divider { text-align: center; color: var(--text-faint); font-size: 12px; margin: 16px 0; font-style: italic; font-family: 'Cormorant Garamond', serif; }
.auth-legal { color: var(--text-dim); font-size: 12px; line-height: 1.45; margin-top: 8px; text-align: center; }
.auth-legal a { color: var(--gold); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* APP CHROME */
.app-shell { flex: 1; display: flex; flex-direction: column; }
.top-bar { background: var(--bg-warm); padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.top-bar-title { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700; }
.top-bar-back { background: none; border: none; color: var(--cream); font-size: 22px; cursor: pointer; padding: 4px 8px; }
.screen { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.screen::-webkit-scrollbar { display: none; }

/* GROUPS LIST */
.grouplist { padding: 20px 16px; }
.grouplist-hero { text-align: center; margin-bottom: 20px; }
.grouplist-hero h1 { font-family: 'Playfair Display', serif; font-size: 30px; font-weight: 700; }
.grouplist-hero p { font-family: 'Cormorant Garamond', serif; font-style: italic; color: var(--text-dim); font-size: 15px; margin-top: 4px; }
.group-list-card { background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin-bottom: 12px; cursor: pointer; }
.group-list-card-name { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700; }
.group-list-card-tag { font-family: 'Cormorant Garamond', serif; font-style: italic; color: var(--text-dim); font-size: 14px; margin-top: 4px; line-height: 1.4; }
.group-list-card-meta { display: flex; gap: 10px; margin-top: 10px; font-size: 11px; color: var(--text-faint); }
.badge-joined { background: rgba(217,182,113,0.15); color: var(--gold); padding: 3px 8px; border-radius: 10px; font-size: 10px; font-weight: 700; letter-spacing: 1px; }

/* GROUP FEED */
.feed { padding: 0 0 100px; }
.composer { background: var(--bg-warm); padding: 12px 14px; display: flex; gap: 10px; align-items: center; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.composer-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--burg), var(--burg-lt)); border: 1px solid var(--gold); display: flex; align-items: center; justify-content: center; font-family: 'Playfair Display', serif; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.composer-input { flex: 1; background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: 20px; padding: 8px 14px; color: var(--cream); font-family: inherit; font-size: 14px; outline: none; }
.composer-send { background: var(--gold); color: var(--bg); border: none; border-radius: 50%; width: 34px; height: 34px; font-weight: 700; cursor: pointer; }

/* COMPOSER MODAL */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(6px); z-index: 1000; display: flex; align-items: flex-end; justify-content: center; padding: 0; }
.modal-card { background: var(--bg); border: 1px solid var(--border); border-radius: 22px 22px 0 0; width: 100%; max-width: 500px; padding: 20px; padding-bottom: calc(20px + var(--safe-bottom)); }
.modal-title { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.modal-textarea { width: 100%; min-height: 120px; background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 12px; padding: 12px; color: var(--cream); font-family: inherit; font-size: 15px; resize: vertical; outline: none; }
.modal-actions { display: flex; gap: 10px; margin-top: 14px; align-items: center; }
.modal-anon { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-dim); }
.modal-anon input { accent-color: var(--gold); }
.modal-cancel { flex: 1; background: transparent; border: 1px solid var(--border); color: var(--cream); border-radius: 22px; padding: 11px; cursor: pointer; }
.modal-post { flex: 1; background: var(--gold); color: var(--bg); border: none; border-radius: 22px; padding: 11px; font-weight: 700; cursor: pointer; }
.modal-post:disabled { opacity: 0.4; }

/* POST */
.post { padding: 14px; border-bottom: 1px solid var(--border); }
.post.pinned { background: linear-gradient(135deg, rgba(96,37,55,0.15), rgba(217,182,113,0.04)); border-left: 3px solid var(--gold); }
.post-pin-tag { font-size: 9px; color: var(--gold); letter-spacing: 1.5px; font-weight: 700; text-transform: uppercase; margin-bottom: 6px; }
.post-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.post-avatar { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: 'Playfair Display', serif; font-size: 13px; font-weight: 700; flex-shrink: 0; background: linear-gradient(135deg, #5C7589, #243545); }
.post-avatar.karamo { background: var(--bg-warm); border: 1.5px solid var(--gold); padding: 0; }
.post-avatar.karamo svg { width: 100%; height: 100%; }
.post-meta { flex: 1; min-width: 0; }
.post-author { font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 4px; }
.post-author .verified { color: var(--gold); font-size: 11px; }
.post-time { font-size: 10px; color: var(--text-faint); margin-top: 2px; }
.post-more { color: var(--text-faint); cursor: pointer; padding: 4px 8px; font-size: 18px; }
.post-body { font-size: 14px; line-height: 1.5; margin-bottom: 10px; white-space: pre-wrap; word-wrap: break-word; }
.reactions { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; }
.reaction-pill { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; padding: 3px 9px; font-size: 11px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.reaction-pill.mine { background: rgba(217,182,113,0.15); border-color: rgba(217,182,113,0.3); color: var(--gold); }
.reaction-add { background: transparent; border: 1px dashed var(--border); color: var(--text-faint); border-radius: 14px; padding: 3px 9px; cursor: pointer; font-size: 11px; }
.post-actions { display: flex; gap: 14px; font-size: 11px; color: var(--text-dim); }
.post-actions span { cursor: pointer; }
.replies { margin-left: 42px; margin-top: 10px; border-left: 2px solid rgba(217,182,113,0.2); padding-left: 10px; }
.reply { margin-bottom: 10px; }
.reply-author { font-size: 11px; font-weight: 700; }
.reply-time { font-size: 9px; color: var(--text-faint); margin-left: 5px; }
.reply-body { font-size: 12px; color: rgba(244,235,224,0.85); line-height: 1.4; }

/* REACTION PICKER */
.reaction-picker { position: absolute; background: var(--bg-warm); border: 1px solid var(--border); border-radius: 24px; padding: 6px; display: flex; gap: 4px; z-index: 100; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.reaction-picker button { background: transparent; border: none; font-size: 22px; padding: 4px 8px; cursor: pointer; }
.reaction-picker button:hover { transform: scale(1.2); }

/* GROUP INFO MODAL (Sobriety join) */
.info-modal { padding: 24px; text-align: center; }
.info-modal h2 { font-family: 'Playfair Display', serif; font-size: 22px; margin-bottom: 8px; }
.info-modal p { font-family: 'Cormorant Garamond', serif; font-style: italic; color: var(--text-dim); font-size: 15px; line-height: 1.5; margin-bottom: 20px; }

/* SETTINGS */
.settings { padding: 20px 16px; }
.settings-row { background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.settings-row.danger { color: #ff8a8a; }
.settings-label { font-size: 11px; color: var(--gold); letter-spacing: 2px; font-weight: 700; margin: 16px 0 8px; display: block; }

/* FAB */
.fab { position: fixed; right: 18px; bottom: calc(24px + var(--safe-bottom)); width: 56px; height: 56px; border-radius: 50%; background: var(--gold); color: var(--bg); border: none; font-size: 28px; font-weight: 700; box-shadow: 0 8px 24px rgba(0,0,0,0.4); cursor: pointer; z-index: 50; }

.empty { padding: 40px 20px; text-align: center; color: var(--text-dim); font-style: italic; font-family: 'Cormorant Garamond', serif; }
.loading { padding: 20px; text-align: center; color: var(--text-faint); font-size: 12px; }

/* ════════════════════════════════════════════════════════════
   KARAMO FLAIR GROUP FEED (Plan 1B-9)
   Cream/blush palette, editorial type, gold shimmer accents
   ════════════════════════════════════════════════════════════ */

#group-feed-overlay { background: #fdfbf7 !important; }
#group-feed-overlay.show { display: flex !important; flex-direction: column; color: #2d1d1d; }

.ig-topbar {
  flex-shrink: 0; height: 48px;
  background: rgba(253,251,247,0.95);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(217,182,113,0.15);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px; position: sticky; top: 0; z-index: 50;
  transition: transform 0.25s ease; will-change: transform;
}
.ig-topbar.hidden { transform: translateY(-100%); }
.ig-topbar-title { font-family: 'Playfair Display', serif; font-size: 17px; font-weight: 700; color: #2d1d1d; letter-spacing: -0.3px; }
.ig-icon-btn { width: 36px; height: 36px; background: transparent; border: none; color: #3a2c2c; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.ig-icon-btn:active { opacity: 0.5; }

.ig-screen { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; background: linear-gradient(180deg, #fdfbf7 0%, #faf5ee 100%); }
.ig-screen::-webkit-scrollbar { display: none; }
.ig-feed-scroll { padding-bottom: 80px; }
.ig-feed-body { display: flex; flex-direction: column; }

/* DAILY INTENTION */
.kf-intention { margin: 12px 14px 18px; padding: 14px 16px 16px 36px; background: linear-gradient(135deg, #f8e5d6 0%, #f5d8c4 50%, #efc7ad 100%); border-radius: 14px; position: relative; overflow: hidden; }
.kf-intention::before { content: ""; position: absolute; top: 0; left: -60%; width: 60%; height: 100%; background: linear-gradient(105deg, transparent 25%, rgba(255,255,255,0.5) 50%, transparent 75%); animation: kfShimmer 8s ease-in-out infinite; pointer-events: none; }
@keyframes kfShimmer { 0%, 100% { transform: translateX(-50%); opacity: 0; } 40% { opacity: 0; } 50% { transform: translateX(250%); opacity: 0.85; } 60% { opacity: 0; } }
.kf-intention-label { font-size: 9px; letter-spacing: 2.4px; text-transform: uppercase; color: #602537; font-weight: 700; margin-bottom: 4px; }
.kf-intention-text { font-family: 'Cormorant Garamond', serif; font-size: 17px; font-style: italic; color: #3a1d2c; line-height: 1.32; font-weight: 500; }
.kf-intention-author { font-size: 10px; color: rgba(96,37,55,0.65); margin-top: 8px; letter-spacing: 0.6px; }

/* SECTION HEADERS */
.kf-section-hdr { display: flex; align-items: center; padding: 4px 14px 10px; gap: 10px; }
.kf-section-hdr-line { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(217,182,113,0.4), transparent); }
.kf-section-hdr-line:last-child { background: linear-gradient(270deg, rgba(217,182,113,0.4), transparent); }
.kf-section-hdr-text { font-family: 'DM Sans', sans-serif; font-size: 9px; letter-spacing: 2.4px; text-transform: uppercase; color: rgba(96,37,55,0.55); font-weight: 700; }

/* POST CARDS */
.ig-post { background: #ffffff; padding: 12px 14px 12px; border-bottom: 1px solid rgba(217,182,113,0.12); position: relative; }
.ig-post-pinned { background: linear-gradient(180deg, rgba(217,182,113,0.08) 0%, #ffffff 50%); border-left: 3px solid #D9B671; overflow: hidden; }
.ig-post-pinned::after { content: ""; position: absolute; top: 0; left: -100%; width: 60%; height: 100%; background: linear-gradient(105deg, transparent 25%, rgba(217,182,113,0.18) 50%, transparent 75%); animation: kfShimmerPin 8s ease-in-out infinite; pointer-events: none; }
@keyframes kfShimmerPin { 0%, 100% { transform: translateX(0); opacity: 0; } 45% { opacity: 0; } 55% { transform: translateX(280%); opacity: 1; } 65% { opacity: 0; } }
.ig-pin-tag { font-size: 9px; letter-spacing: 1.6px; text-transform: uppercase; color: #c8a558; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 5px; }

/* HEADER */
.ig-post-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ig-avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; font-family: 'Playfair Display', serif; }
.ig-avatar-p1 { background: linear-gradient(135deg, #f5d8c4, #efc7ad); color: #602537; }
.ig-avatar-p2 { background: linear-gradient(135deg, #e8d5e0, #d8b8d0); color: #4a2540; }
.ig-avatar-p3 { background: linear-gradient(135deg, #d8e0d0, #b8c8a8); color: #3a4a2d; }
.ig-avatar-p4 { background: linear-gradient(135deg, #e6d4c0, #d8bfa0); color: #5a3d20; }
.ig-avatar-p5 { background: linear-gradient(135deg, #c4d8e0, #a0c0d0); color: #2d4a5a; }
.ig-avatar-karamo { background: #243545; color: #F4EBE0; border: 2px solid #D9B671; font-size: 13px; }
.ig-avatar-anon { background: #c7c7c7; color: #ffffff; }

.ig-post-author-stack { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ig-post-username { font-size: 14px; font-weight: 700; color: #2d1d1d; font-family: 'DM Sans', sans-serif; letter-spacing: -0.1px; display: inline-flex; align-items: center; gap: 4px; }
.ig-verified { width: 13px; height: 13px; color: #D9B671; display: inline-flex; align-items: center; }
.ig-verified svg { width: 100%; height: 100%; display: block; }
.ig-post-meta-row { font-size: 10.5px; color: rgba(96,37,55,0.5); letter-spacing: 0.2px; margin-top: 1px; }
.ig-post-more { width: 28px; height: 28px; color: rgba(96,37,55,0.5); background: transparent; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }

/* POST BODY */
.ig-post-body { font-family: 'Cormorant Garamond', serif; font-size: 15px; line-height: 1.42; color: #2d1d1d; font-weight: 400; margin-bottom: 8px; cursor: pointer; white-space: pre-wrap; word-wrap: break-word; }
.ig-post-karamo .ig-post-body { font-family: 'Playfair Display', serif; font-size: 14.5px; font-style: italic; color: #1a1010; }

/* META LINE */
.ig-meta-line { display: flex; align-items: center; gap: 10px; padding-top: 4px; }
.ig-meta-icon-btn { width: 28px; height: 28px; background: transparent; border: none; color: rgba(96,37,55,0.7); cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ig-meta-icon-btn:active { opacity: 0.4; }
.ig-meta-heart.ig-heart-active { color: #c83a52; }
.ig-meta-heart.ig-heart-active svg { fill: #c83a52 !important; stroke: #c83a52 !important; }
.ig-meta-text { background: transparent; border: none; padding: 0; margin-left: 2px; font-size: 11.5px; color: rgba(96,37,55,0.7); font-weight: 500; cursor: pointer; text-align: left; font-family: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; letter-spacing: 0.2px; }
.ig-meta-text strong { color: #2d1d1d; font-weight: 700; }
.ig-meta-text:active { opacity: 0.5; }

/* ENGAGEMENT FACES */
.ig-faces { display: flex; margin-right: 4px; flex-shrink: 0; }
.ig-face { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #ffffff; margin-left: -6px; font-size: 8px; font-weight: 700; display: flex; align-items: center; justify-content: center; font-family: 'Playfair Display', serif; color: #2d1d1d; }
.ig-face:first-child { margin-left: 0; }
.ig-face-1 { background: linear-gradient(135deg, #f5d8c4, #efc7ad); }
.ig-face-2 { background: linear-gradient(135deg, #e8d5e0, #d8b8d0); }
.ig-face-3 { background: linear-gradient(135deg, #d8e0d0, #b8c8a8); }
.ig-face-4 { background: linear-gradient(135deg, #e6d4c0, #d8bfa0); }
.ig-face-5 { background: linear-gradient(135deg, #c4d8e0, #a0c0d0); }

/* UNREAD DIVIDER */
.ig-unread-divider { display: flex; align-items: center; padding: 14px 16px; gap: 10px; }
.ig-unread-line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(217,182,113,0.6) 50%, transparent); }
.ig-unread-label { color: #c8a558; font-size: 10px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; flex-shrink: 0; }

/* GROUPS LIST */
.ig-grouplist { padding: 8px 0; }
.ig-group-row { padding: 14px 16px; border-bottom: 1px solid rgba(217,182,113,0.12); cursor: pointer; }
.ig-group-row:active { background: rgba(217,182,113,0.06); }
.ig-group-row-name { font-size: 16px; font-weight: 600; color: #2d1d1d; margin-bottom: 4px; font-family: 'Playfair Display', serif; }
.ig-group-row-tag { font-size: 13px; color: rgba(96,37,55,0.55); line-height: 1.3; margin-bottom: 6px; font-family: 'Cormorant Garamond', serif; font-style: italic; }
.ig-group-row-meta { font-size: 12px; color: rgba(96,37,55,0.55); display: flex; gap: 8px; align-items: center; }
.ig-joined-pill { background: rgba(217,182,113,0.18); color: #602537; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }

/* POST DETAIL + COMMENTS */
.ig-detail { position: fixed; inset: 0; background: #fdfbf7 !important; z-index: 9500; display: flex; flex-direction: column; color: #2d1d1d; }
.ig-comments-wrap { padding: 8px 0; border-top: 1px solid rgba(217,182,113,0.12); background: #ffffff; }
.ig-comment-row { display: flex; align-items: flex-start; padding: 8px 14px; gap: 9px; flex-wrap: wrap; position: relative; }
.ig-comment-body { flex: 1; min-width: 0; }
.ig-comment-line { font-size: 14px; line-height: 1.4; color: #2d1d1d; }
.ig-comment-username { font-weight: 600; color: #2d1d1d; }
.ig-comment-text { color: #2d1d1d; }
.ig-comment-meta { display: flex; gap: 14px; align-items: center; margin-top: 4px; font-size: 12px; color: rgba(96,37,55,0.5); }
.ig-comment-likes { color: #2d1d1d; font-weight: 600; }
.ig-comment-reply-link { background: transparent; border: none; color: rgba(96,37,55,0.55) !important; font-size: 12px; font-weight: 600; cursor: pointer; padding: 0; font-family: inherit; }
.ig-comment-reply-link:active { color: #2d1d1d !important; }
.ig-comment-heart { background: transparent; border: none; width: 24px; height: 24px; color: #262626; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex-shrink: 0; margin-top: 2px; }
.ig-comment-heart:active { opacity: 0.4; }
.ig-comment-more { background: transparent; border: none; width: 24px; height: 18px; color: #8e8e8e; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; margin-top: 2px; }
.ig-comment-more:active { opacity: 0.4; }
.ig-comment-children { width: 100%; margin-left: 44px; border-left: 1px solid rgba(217,182,113,0.18); }
.ig-comment-children .ig-comment-row { padding-left: 12px; }

/* COMPOSER */
.ig-composer-wrap { flex-shrink: 0; background: #ffffff; border-top: 1px solid rgba(217,182,113,0.18); }
.ig-composer-wrap .ig-composer { border-top: none; }
.ig-composer { flex-shrink: 0; border-top: 1px solid rgba(217,182,113,0.18); padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0)); display: flex; align-items: center; gap: 8px; background: #ffffff; }
.ig-composer-input { flex: 1; border: none; outline: none; background: transparent; font-size: 14px; color: #2d1d1d; padding: 8px 0; font-family: inherit; }
.ig-composer-input::placeholder { color: rgba(96,37,55,0.4); }
.ig-composer-submit { background: transparent; border: none; color: #c8a558; font-size: 14px; font-weight: 600; cursor: pointer; padding: 4px 0; }
.ig-composer-submit:active { opacity: 0.4; }
.ig-reply-context { background: #fafafa; border-bottom: 1px solid rgba(217,182,113,0.12); padding: 8px 16px; display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: rgba(96,37,55,0.5); }
.ig-reply-context-text { font-weight: 500; }
.ig-reply-context-cancel { background: transparent; border: none; color: rgba(96,37,55,0.5); font-size: 14px; cursor: pointer; padding: 0 4px; }

/* MODALS */
.ig-modal-bg { position: fixed; inset: 0; background: rgba(45,29,29,0.45); z-index: 10000; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-end; }
.ig-modal-card { background: #fdfbf7; border-radius: 0; width: 100%; height: 100%; color: #2d1d1d; display: flex; flex-direction: column; }
.ig-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid rgba(217,182,113,0.18); flex-shrink: 0; }
.ig-modal-title { font-size: 16px; font-weight: 600; color: #2d1d1d; font-family: 'Playfair Display', serif; }
.ig-modal-cancel-btn, .ig-modal-share-btn { background: transparent; border: none; font-size: 14px; font-weight: 600; cursor: pointer; padding: 4px 8px; font-family: inherit; }
.ig-modal-cancel-btn { color: #2d1d1d; }
.ig-modal-share-btn { color: #c8a558; }
.ig-modal-textarea { flex: 1; border: none; outline: none; padding: 16px; font-family: inherit; font-size: 16px; color: #2d1d1d; background: #fdfbf7; resize: none; }
.ig-modal-textarea::placeholder { color: rgba(96,37,55,0.4); }

.ig-action-sheet { background: #fdfbf7; border-radius: 12px 12px 0 0; width: 100%; padding-bottom: env(safe-area-inset-bottom, 0); display: flex; flex-direction: column; }
.ig-action-sheet-btn { background: transparent; border: none; border-bottom: 1px solid rgba(217,182,113,0.18); padding: 16px; font-size: 16px; color: #2d1d1d; cursor: pointer; text-align: center; font-family: inherit; }
.ig-action-sheet-btn:active { background: rgba(217,182,113,0.08); }
.ig-action-sheet-btn.ig-danger { color: #c83a52; font-weight: 600; }
.ig-action-cancel { border-bottom: none !important; margin-top: 8px; background: rgba(217,182,113,0.08) !important; font-weight: 600; }

.ig-info-card { background: #ffffff; border-radius: 12px; margin: 16px; padding: 20px; color: #2d1d1d; text-align: center; }
.ig-info-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; color: #2d1d1d; font-family: 'Playfair Display', serif; }
.ig-info-tagline { font-size: 14px; color: rgba(96,37,55,0.6); line-height: 1.4; margin-bottom: 20px; font-family: 'Cormorant Garamond', serif; font-style: italic; }
.ig-info-actions { display: flex; gap: 8px; }
.ig-info-cancel, .ig-info-join { flex: 1; border: none; padding: 12px; font-size: 14px; font-weight: 600; border-radius: 4px; cursor: pointer; font-family: inherit; }
.ig-info-cancel { background: rgba(217,182,113,0.18); color: #2d1d1d; }
.ig-info-join { background: #c8a558; color: #fdfbf7; }

.ig-empty { color: rgba(96,37,55,0.5); font-family: 'Cormorant Garamond', serif; font-style: italic; padding: 40px 20px; text-align: center; }

/* SLIDE-IN PANEL */
.ig-detail-slide { left: 15vw !important; transform: translateX(100%); animation: slideInFromRight 0.3s ease forwards; box-shadow: -12px 0 40px rgba(45,29,29,0.18); border-left: 1px solid rgba(217,182,113,0.18); }
@keyframes slideInFromRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes slideOutToRight { from { transform: translateX(0); } to { transform: translateX(100%); } }

/* ════════════════════════════════════════════════════════════
   END KARAMO FLAIR
   ════════════════════════════════════════════════════════════ */

/* PROFILE SCREEN OVERLAY */
#profile-overlay {
  position: fixed; inset: 0;
  background: var(--bg, #1a2830);
  z-index: 9700;
  display: none;
  flex-direction: column;
  color: var(--cream, #F4EBE0);
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
#profile-overlay.show { display: flex; }
.profile-topbar {
  flex-shrink: 0;
  height: 56px;
  background: var(--bg-warm, #243545);
  border-bottom: 1px solid var(--border, rgba(217,182,113,0.2));
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 8px;
}
.profile-topbar-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px; font-weight: 700;
  color: var(--cream);
}
.profile-back {
  width: 36px; height: 36px;
  background: transparent; border: none;
  color: var(--cream);
  font-size: 22px; cursor: pointer;
  padding: 4px 8px;
}
.profile-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px;
}
.profile-loading, .profile-error {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-faint, rgba(244,235,224,0.5));
  font-style: italic;
  font-family: 'Cormorant Garamond', serif;
}
.profile-avatar-wrap {
  display: flex; flex-direction: column;
  align-items: center;
  margin-bottom: 32px;
}
.profile-avatar-large {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, #D9B671, #A88550);
  color: #243545;
  font-family: 'Playfair Display', serif;
  font-size: 40px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.profile-avatar-hint {
  font-size: 12px;
  color: var(--text-faint, rgba(244,235,224,0.5));
  font-style: italic;
}
.profile-form {
  display: flex; flex-direction: column;
  gap: 6px;
  max-width: 400px;
  margin: 0 auto;
}
.profile-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim, rgba(244,235,224,0.6));
  margin-top: 14px;
  margin-bottom: 2px;
}
.profile-input {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border, rgba(217,182,113,0.18));
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  color: var(--cream);
  font-family: 'DM Sans', sans-serif;
  outline: none;
}
.profile-input:focus { border-color: var(--gold, #D9B671); }
.profile-input-readonly {
  background: rgba(255,255,255,0.03);
  color: rgba(244,235,224,0.5);
  cursor: not-allowed;
}
.profile-save-btn {
  margin-top: 24px;
  background: var(--gold, #D9B671);
  color: var(--bg, #1a2830);
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.5px;
  cursor: pointer;
}
.profile-save-btn:disabled { opacity: 0.6; }
.profile-signout-btn {
  margin-top: 12px;
  background: transparent;
  border: 1px solid rgba(237, 73, 86, 0.4);
  color: #ed4956;
  border-radius: 10px;
  padding: 12px;
  font-size: 14px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
}
