/* ================================================================
   Tim Ray Family Directory v2.0 — style.css
   Aesthetic: warm editorial, like a well-loved family cookbook.
   Fonts: Playfair Display (headings) + Lato (body)
   All rules scoped to .trf- prefix.
   ================================================================ */

:root {
	--trf-cream:      #FAF7F2;
	--trf-parchment:  #F2EDE4;
	--trf-tan:        #EDE8DF;
	--trf-taupe:      #D6CEBF;
	--trf-brown:      #7A5C3E;
	--trf-brown-dk:   #5C4229;
	--trf-brown-lt:   #A07855;
	--trf-ink:        #2C2417;
	--trf-muted:      #6B5B4E;
	--trf-muted-lt:   #A89880;
	--trf-white:      #FFFFFF;
	--trf-success:    #2E6B2E;
	--trf-success-bg: #EAF4EA;
	--trf-error:      #8B0000;
	--trf-error-bg:   #FFF0F0;
	--trf-notice-bg:  #FFF8E1;
	--trf-notice-txt: #5C4A00;
	--trf-serif:      'Playfair Display', Georgia, serif;
	--trf-sans:       'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--trf-radius:     12px;
	--trf-shadow-sm:  0 2px 8px rgba(44,36,23,.08);
	--trf-shadow-md:  0 6px 24px rgba(44,36,23,.12);
	--trf-shadow-lg:  0 16px 48px rgba(44,36,23,.18);
	--trf-panel-w:    460px;
	--trf-card-w:     220px;
	--trf-card-h:     300px;
}

/* ── RESET ───────────────────────────────────────────────────── */
.trf-app, .trf-app *, .trf-panel, .trf-panel *,
.trf-outer, .trf-outer * {
	box-sizing: border-box;
	-webkit-font-smoothing: antialiased;
}

/* ── APP SHELL ───────────────────────────────────────────────── */
.trf-app {
	background: var(--trf-cream);
	min-height: 60vh;
	font-family: var(--trf-sans);
	color: var(--trf-ink);
	padding-bottom: 80px;
}

/* ── SUCCESS BANNER ──────────────────────────────────────────── */
.trf-success-banner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--trf-success-bg);
	color: var(--trf-success);
	border-bottom: 2px solid #4CAF50;
	padding: 12px 24px;
	font-size: 14px;
	font-weight: 600;
	font-family: var(--trf-sans);
}
.trf-success-banner button {
	background: none; border: none; cursor: pointer;
	font-size: 20px; color: var(--trf-success); line-height: 1;
}

/* ── GLOBAL NOTICE ───────────────────────────────────────────── */
.trf-notice {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	background: var(--trf-notice-bg);
	color: var(--trf-notice-txt);
	border-bottom: 2px solid #F0C040;
	padding: 12px 24px;
	font-size: 13px;
	font-family: var(--trf-sans);
	line-height: 1.5;
}
.trf-notice-text { flex: 1; }
.trf-notice-close {
	background: none; border: none; cursor: pointer;
	font-size: 20px; color: var(--trf-notice-txt);
	line-height: 1; flex-shrink: 0; padding: 0;
}

/* ── TOOLBAR (two-tier) ──────────────────────────────────────── */
/* Top row: title left, sign-out right */
.trf-toolbar-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 32px 4px;
	gap: 16px;
}
.trf-page-title {
	font-family: var(--trf-serif);
	font-size: 28px;
	font-weight: 700;
	color: var(--trf-ink);
	margin: 0;
	letter-spacing: -0.5px;
}
/* Sign Out — intentionally subtle, top-right, not a button */
.trf-signout-link {
	font-family: var(--trf-sans);
	font-size: 12px;
	color: var(--trf-muted-lt);
	text-decoration: none;
	letter-spacing: .2px;
	transition: color .2s;
	white-space: nowrap;
}
.trf-signout-link:hover { color: #c0392b; }
/* Bottom row: search left, action buttons right */
.trf-toolbar-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 32px 16px;
	gap: 12px;
	border-bottom: 1px solid var(--trf-taupe);
	flex-wrap: wrap;
}
.trf-action-btns {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}
.trf-search-wrap {
	position: relative;
}
.trf-search-icon {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--trf-muted-lt);
	font-size: 16px;
	pointer-events: none;
}
#trf-search {
	padding: 9px 14px 9px 34px;
	border: 1.5px solid var(--trf-taupe);
	border-radius: 24px;
	font-family: var(--trf-sans);
	font-size: 14px;
	color: var(--trf-ink);
	background: var(--trf-white);
	width: 200px;
	transition: border-color .2s, width .3s;
	outline: none;
}
#trf-search:focus {
	border-color: var(--trf-brown);
	width: 260px;
	box-shadow: 0 0 0 3px rgba(122,92,62,.1);
}
#trf-search::placeholder { color: var(--trf-muted-lt); }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.trf-btn-primary {
	background: var(--trf-brown);
	color: #fff;
	border: none;
	border-radius: var(--trf-radius);
	padding: 10px 22px;
	font-family: var(--trf-sans);
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	letter-spacing: .2px;
	transition: background .2s, transform .1s;
	white-space: nowrap;
}
.trf-btn-primary:hover { background: var(--trf-brown-dk); }
.trf-btn-primary:active { transform: scale(.98); }
.trf-btn-sm { padding: 8px 16px; font-size: 13px; }

.trf-btn-outline {
	background: transparent;
	border: 1.5px solid var(--trf-taupe);
	color: var(--trf-muted);
	border-radius: var(--trf-radius);
	padding: 9px 18px;
	font-family: var(--trf-sans);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: border-color .2s, color .2s;
	white-space: nowrap;
	display: inline-block;
}
.trf-btn-outline:hover {
	border-color: var(--trf-brown);
	color: var(--trf-brown);
}

.trf-btn-ghost {
	background: none;
	border: none;
	color: var(--trf-brown);
	font-family: var(--trf-sans);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	padding: 6px 10px;
	border-radius: 6px;
}
.trf-btn-ghost:hover { background: var(--trf-tan); }

/* ── CAROUSEL ────────────────────────────────────────────────── */
.trf-carousel-wrap {
	position: relative;
	padding: 32px 0 16px;
	display: flex;
	align-items: center;
}
.trf-carousel {
	display: flex;
	gap: 22px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	padding: 12px 48px 24px;
	flex: 1;
	scrollbar-width: none;
}
.trf-carousel::-webkit-scrollbar { display: none; }

/* ── CARD ────────────────────────────────────────────────────── */
.trf-card {
	scroll-snap-align: start;
	flex: 0 0 var(--trf-card-w);
	height: var(--trf-card-h);
	background: var(--trf-white);
	border-radius: 16px;
	box-shadow: var(--trf-shadow-sm);
	border: 1px solid var(--trf-taupe);
	cursor: pointer;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	position: relative;
	transition: transform .25s cubic-bezier(.4,0,.2,1), box-shadow .25s;
	outline: none;
}
.trf-card:hover, .trf-card:focus {
	transform: translateY(-6px);
	box-shadow: var(--trf-shadow-lg);
}
.trf-card:focus-visible {
	box-shadow: var(--trf-shadow-lg), 0 0 0 3px var(--trf-brown);
}
.trf-card[data-hidden="true"] { display: none; }

/* Card select checkbox overlay */
.trf-card-select {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 10;
}
.trf-check {
	width: 20px;
	height: 20px;
	accent-color: var(--trf-brown);
	cursor: pointer;
}

/* Card bubble (initials section) */
.trf-card-bubble {
	height: 130px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	flex-shrink: 0;
}
.trf-initials {
	font-family: var(--trf-serif);
	font-size: 48px;
	font-weight: 700;
	color: rgba(255,255,255,.9);
	letter-spacing: -2px;
	line-height: 1;
	text-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.trf-bday-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	font-size: 20px;
	line-height: 1;
}

/* Card body */
.trf-card-body {
	padding: 16px 16px 14px;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
	border-top: 1px solid rgba(0,0,0,.06);
}
.trf-card-name {
	font-family: var(--trf-serif);
	font-size: 17px;
	font-weight: 600;
	color: var(--trf-ink);
	margin: 0;
	line-height: 1.2;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.trf-card-detail {
	font-size: 12px;
	color: var(--trf-muted);
	margin: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.trf-card-event {
	font-size: 11px;
	color: var(--trf-brown-lt);
	margin: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	margin-top: 2px;
}

/* ── CAROUSEL NAV ARROWS ─────────────────────────────────────── */
.trf-nav-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--trf-white);
	border: 1.5px solid var(--trf-taupe);
	color: var(--trf-muted);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
	box-shadow: var(--trf-shadow-sm);
	padding: 0;
}
.trf-nav-btn:hover {
	background: var(--trf-brown);
	color: #fff;
	border-color: var(--trf-brown);
	box-shadow: var(--trf-shadow-md);
}
.trf-prev { left: 4px; }
.trf-next { right: 4px; }

/* ── DOTS (mobile) ───────────────────────────────────────────── */
.trf-dots {
	display: none;
	justify-content: center;
	gap: 6px;
	padding-bottom: 8px;
}
.trf-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--trf-taupe);
	cursor: pointer;
	transition: background .2s, transform .2s;
}
.trf-dot-active {
	background: var(--trf-brown);
	transform: scale(1.3);
}

/* ── FOOTER ──────────────────────────────────────────────────── */
.trf-footer {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 16px;
	font-size: 12px;
	color: var(--trf-muted-lt);
	font-family: var(--trf-sans);
}
.trf-footer-sep { opacity: .4; }
.trf-version { letter-spacing: .5px; }
.trf-admin-link {
	background: none; border: none; cursor: pointer;
	color: var(--trf-brown); font-size: 12px;
	font-family: var(--trf-sans); text-decoration: underline;
	padding: 0;
}
.trf-admin-link:hover { color: var(--trf-brown-dk); }

/* ── PANEL OVERLAY ───────────────────────────────────────────── */
.trf-overlay {
	position: fixed;
	inset: 0;
	background: rgba(44,36,23,.4);
	backdrop-filter: blur(2px);
	z-index: 9000;
	opacity: 0;
	pointer-events: none;
	transition: opacity .35s ease;
}
.trf-overlay.trf-open {
	opacity: 1;
	pointer-events: auto;
}

/* ── DETAIL PANEL ────────────────────────────────────────────── */
.trf-panel {
	position: fixed;
	top: 0;
	right: 0;
	width: var(--trf-panel-w);
	max-width: 100vw;
	height: 100dvh;
	background: var(--trf-white);
	z-index: 9100;
	transform: translateX(100%);
	transition: transform .35s cubic-bezier(.4,0,.2,1);
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	box-shadow: var(--trf-shadow-lg);
}
.trf-panel.trf-open {
	transform: translateX(0);
}
.trf-panel-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 36px;
	height: 36px;
	background: rgba(255,255,255,.8);
	border: 1px solid var(--trf-taupe);
	border-radius: 50%;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	color: var(--trf-muted);
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .2s, color .2s;
	padding: 0;
}
.trf-panel-close:hover { background: var(--trf-brown); color: #fff; border-color: var(--trf-brown); }

/* Panel header */
.trf-panel-head {
	flex-shrink: 0;
	min-height: 160px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 40px 24px 24px;
	position: relative;
}
.trf-panel-bubble {
	width: 90px;
	height: 90px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 14px;
	box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.trf-panel-initials {
	font-family: var(--trf-serif);
	font-size: 36px;
	font-weight: 700;
	color: rgba(255,255,255,.92);
	line-height: 1;
}
.trf-panel-name {
	font-family: var(--trf-serif);
	font-size: 24px;
	font-weight: 700;
	color: var(--trf-ink);
	margin: 0 0 4px;
	text-align: center;
}
.trf-panel-sub {
	font-size: 13px;
	color: var(--trf-muted);
	margin: 0;
	text-align: center;
}

/* Panel actions row */
.trf-panel-actions {
	display: flex;
	gap: 8px;
	justify-content: center;
	padding: 0 24px 20px;
	flex-wrap: wrap;
	flex-shrink: 0;
	border-bottom: 1px solid var(--trf-tan);
}

/* Panel content sections */
.trf-panel-inner {
	flex: 1;
	padding: 0 0 24px;
}
.trf-panel-section {
	padding: 18px 24px;
	border-bottom: 1px solid var(--trf-tan);
}
.trf-panel-section:last-child { border-bottom: none; }
.trf-panel-section h4 {
	font-family: var(--trf-serif);
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--trf-muted-lt);
	margin: 0 0 12px;
}
.trf-panel-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 10px;
	font-size: 14px;
}
.trf-panel-row:last-child { margin-bottom: 0; }
.trf-panel-icon { width: 18px; flex-shrink: 0; text-align: center; color: var(--trf-brown); font-size: 14px; margin-top: 1px; }
.trf-panel-val { color: var(--trf-ink); line-height: 1.5; }
.trf-panel-val a { color: var(--trf-brown); text-decoration: none; }
.trf-panel-val a:hover { text-decoration: underline; }

.trf-social-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.trf-social-chip {
	padding: 4px 12px;
	background: var(--trf-tan);
	border: 1px solid var(--trf-taupe);
	border-radius: 20px;
	font-size: 12px;
	font-weight: 700;
	color: var(--trf-muted);
	text-decoration: none;
	transition: background .2s, color .2s;
}
.trf-social-chip:hover { background: var(--trf-brown); color: #fff; }

.trf-panel-download-note {
	font-size: 11px;
	color: var(--trf-muted-lt);
	text-align: center;
	padding: 0 24px 8px;
}

/* ── SELECT BAR ──────────────────────────────────────────────── */
.trf-select-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: var(--trf-ink);
	color: #fff;
	padding: 14px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	z-index: 8000;
	box-shadow: 0 -4px 20px rgba(0,0,0,.2);
	gap: 12px;
	flex-wrap: wrap;
}
.trf-select-count {
	font-family: var(--trf-sans);
	font-size: 14px;
	font-weight: 600;
}
.trf-select-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.trf-select-bar .trf-btn-ghost { color: rgba(255,255,255,.7); }
.trf-select-bar .trf-btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.trf-select-bar .trf-btn-outline { border-color: rgba(255,255,255,.3); color: rgba(255,255,255,.8); }
.trf-select-bar .trf-btn-outline:hover { border-color: #fff; color: #fff; }

/* ── LOGIN / PASSWORD CARD ───────────────────────────────────── */
.trf-outer {
	background: var(--trf-cream);
	min-height: 70vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 48px 16px;
	font-family: var(--trf-sans);
}
.trf-login-card {
	background: var(--trf-white);
	border-radius: 20px;
	box-shadow: var(--trf-shadow-lg);
	border: 1px solid var(--trf-taupe);
	padding: 48px 40px 40px;
	width: 100%;
	max-width: 420px;
}
.trf-card-header { text-align: center; margin-bottom: 28px; }
.trf-card-icon { font-size: 44px; margin-bottom: 12px; line-height: 1; }
.trf-card-title { font-family: var(--trf-serif); font-size: 28px; font-weight: 700; color: var(--trf-ink); margin: 0 0 10px; letter-spacing: -.5px; }
.trf-card-sub { font-size: 14px; color: var(--trf-muted); margin: 0; line-height: 1.6; }
.trf-form-card .trf-field { margin-bottom: 16px; }
.trf-form-card .trf-field label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--trf-muted); margin-bottom: 6px; }
.trf-form-card .trf-field input { display: block; width: 100%; padding: 11px 14px; border: 1.5px solid var(--trf-taupe); border-radius: 8px; font-family: var(--trf-sans); font-size: 15px; color: var(--trf-ink); background: var(--trf-white); transition: border-color .2s; -webkit-appearance: none; }
.trf-form-card .trf-field input:focus { outline: none; border-color: var(--trf-brown); box-shadow: 0 0 0 3px rgba(122,92,62,.1); }
.trf-field-hint { font-size: 12px; color: var(--trf-muted-lt); margin: 0 0 16px; }
.trf-remember-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.trf-remember { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--trf-muted); cursor: pointer; }
.trf-remember input { width: 15px; height: 15px; accent-color: var(--trf-brown); }
.trf-link { font-size: 13px; color: var(--trf-brown); text-decoration: none; }
.trf-link:hover { text-decoration: underline; }
.trf-form-card .trf-btn-primary { width: 100%; padding: 13px; font-size: 15px; border-radius: 8px; }
.trf-error-msg { background: var(--trf-error-bg); color: var(--trf-error); border-left: 4px solid #c0392b; padding: 10px 14px; border-radius: 6px; font-size: 14px; margin-bottom: 16px; }

/* ── EDIT FORM ───────────────────────────────────────────────── */
.trf-edit-wrap { max-width: 700px; margin: 0 auto; padding: 32px 24px 64px; }
.trf-edit-top { display: flex; align-items: baseline; gap: 20px; margin-bottom: 24px; }
.trf-back-link { font-size: 13px; color: var(--trf-brown); text-decoration: none; white-space: nowrap; }
.trf-back-link:hover { text-decoration: underline; }
.trf-edit-heading { font-family: var(--trf-serif); font-size: 26px; font-weight: 700; color: var(--trf-ink); margin: 0; }
.trf-data-notice { background: var(--trf-notice-bg); color: var(--trf-notice-txt); border-left: 4px solid #F0C040; padding: 12px 16px; border-radius: 8px; font-size: 13px; line-height: 1.5; margin-bottom: 24px; }
.trf-edit-section { background: var(--trf-white); border: 1px solid var(--trf-taupe); border-radius: var(--trf-radius); padding: 24px; margin-bottom: 16px; box-shadow: var(--trf-shadow-sm); }
.trf-edit-section h3 { font-family: var(--trf-serif); font-size: 16px; font-weight: 600; color: var(--trf-brown); margin: 0 0 18px; padding-bottom: 10px; border-bottom: 1px solid var(--trf-tan); }
.trf-section-hint { font-size: 13px; color: var(--trf-muted); margin: -10px 0 16px; }
.trf-field { margin-bottom: 16px; }
.trf-field:last-child { margin-bottom: 0; }
.trf-field label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--trf-muted); margin-bottom: 6px; }
.trf-req { color: #c0392b; font-weight: 700; }
.trf-opt { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--trf-muted-lt); }
.trf-edit-form input[type="text"],
.trf-edit-form input[type="email"],
.trf-edit-form input[type="url"],
.trf-edit-form input[type="month"],
.trf-edit-form select,
.trf-edit-form textarea {
	display: block; width: 100%; padding: 10px 13px;
	border: 1.5px solid var(--trf-taupe); border-radius: 8px;
	font-family: var(--trf-sans); font-size: 14px; color: var(--trf-ink);
	background: var(--trf-white); transition: border-color .2s;
	-webkit-appearance: none;
}
.trf-edit-form input:focus, .trf-edit-form select:focus, .trf-edit-form textarea:focus {
	outline: none; border-color: var(--trf-brown); box-shadow: 0 0 0 3px rgba(122,92,62,.1);
}
.trf-edit-form textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.trf-grid { display: grid; gap: 14px; margin-bottom: 16px; }
.trf-grid-2 { grid-template-columns: 1fr 1fr; }
.trf-grid-3 { grid-template-columns: 2fr 1fr 1fr; }
.trf-grid .trf-field { margin-bottom: 0; }
.trf-event-row { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.trf-event-row input[type="text"] { flex: 1; }
.trf-event-row input[type="month"] { width: 160px; flex-shrink: 0; }
.trf-remove-ev { background: none; border: 1px solid #c0392b; color: #c0392b; border-radius: 50%; width: 26px; height: 26px; cursor: pointer; font-size: 11px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: background .2s; padding: 0; }
.trf-remove-ev:hover { background: #c0392b; color: #fff; }
.trf-edit-footer { display: flex; justify-content: flex-end; padding-top: 8px; }

/* ── EMPTY / NO PROFILE ──────────────────────────────────────── */
.trf-empty { text-align: center; color: var(--trf-muted); font-family: var(--trf-serif); font-size: 18px; padding: 60px 24px; width: 100%; }
.trf-no-profile { text-align: center; color: var(--trf-muted); font-family: var(--trf-serif); font-size: 18px; padding: 60px 24px; }
.trf-no-profile a { color: var(--trf-brown); }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 640px) {
	.trf-toolbar-top { padding: 14px 16px 4px; }
	.trf-page-title { font-size: 20px; }
	.trf-toolbar-actions { padding: 8px 16px 12px; }
	.trf-action-btns { width: 100%; justify-content: flex-end; }
	#trf-search { width: 100%; }
	#trf-search:focus { width: 100%; }
	.trf-search-wrap { flex: 1; }

	.trf-carousel { padding: 8px 16px 16px; gap: 14px; }
	--trf-card-w: calc(80vw);
	.trf-card { flex: 0 0 80vw; }
	.trf-nav-btn { display: none; }
	.trf-dots { display: flex; }

	.trf-panel { top: auto; bottom: 0; left: 0; right: 0; width: 100%; height: 92dvh; border-radius: 20px 20px 0 0; transform: translateY(100%); }
	.trf-panel.trf-open { transform: translateY(0); }

	.trf-login-card { padding: 32px 20px; }
	.trf-grid-2, .trf-grid-3 { grid-template-columns: 1fr; }
	.trf-edit-wrap { padding: 20px 16px 80px; }
	.trf-event-row { flex-wrap: wrap; }
	.trf-event-row input[type="month"] { width: 100%; }
	.trf-edit-footer .trf-btn-primary { width: 100%; }

	.trf-select-bar { padding: 12px 16px; }
	.trf-select-actions { width: 100%; justify-content: flex-end; }
}

/* ── EXPORT MODAL ────────────────────────────────────────────── */
.trf-export-modal {
	position: fixed;
	inset: 0;
	z-index: 9500;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.trf-export-overlay {
	position: absolute;
	inset: 0;
	background: rgba(44,36,23,.5);
	backdrop-filter: blur(3px);
}
.trf-export-inner {
	position: relative;
	z-index: 1;
	background: var(--trf-white);
	border-radius: 16px;
	box-shadow: var(--trf-shadow-lg);
	width: 100%;
	max-width: 480px;
	max-height: 85vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.trf-export-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 20px 0;
	flex-shrink: 0;
}
.trf-export-title {
	font-family: var(--trf-serif);
	font-size: 20px;
	font-weight: 700;
	color: var(--trf-ink);
	margin: 0;
}
.trf-export-close {
	background: none; border: none; cursor: pointer;
	font-size: 24px; color: var(--trf-muted); line-height: 1; padding: 0;
}
.trf-export-close:hover { color: var(--trf-ink); }
.trf-export-search-wrap { padding: 14px 20px 0; flex-shrink: 0; }
.trf-export-search {
	width: 100%; padding: 10px 14px;
	border: 1.5px solid var(--trf-taupe); border-radius: 8px;
	font-family: var(--trf-sans); font-size: 14px; color: var(--trf-ink);
	outline: none;
}
.trf-export-search:focus { border-color: var(--trf-brown); }
.trf-export-bulk {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 10px 20px;
	border-bottom: 1px solid var(--trf-tan);
	flex-shrink: 0;
}
.trf-export-count {
	margin-left: auto;
	font-size: 13px;
	font-weight: 600;
	color: var(--trf-muted);
	font-family: var(--trf-sans);
}
.trf-export-list {
	list-style: none;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	flex: 1;
}
.trf-export-item { border-bottom: 1px solid var(--trf-tan); }
.trf-export-item:last-child { border-bottom: none; }
.trf-export-label {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 20px;
	cursor: pointer;
}
.trf-export-label:hover { background: var(--trf-parchment); }
.trf-export-label input[type="checkbox"] {
	width: 18px; height: 18px;
	accent-color: var(--trf-brown); flex-shrink: 0;
}
.trf-export-bubble {
	width: 38px; height: 38px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-family: var(--trf-serif); font-size: 14px; font-weight: 700;
	color: rgba(255,255,255,.9); flex-shrink: 0;
}
.trf-export-info { display: flex; flex-direction: column; gap: 2px; }
.trf-export-name { font-size: 14px; font-weight: 600; color: var(--trf-ink); font-family: var(--trf-sans); }
.trf-export-loc  { font-size: 12px; color: var(--trf-muted); font-family: var(--trf-sans); }
.trf-export-footer {
	display: flex; align-items: center; justify-content: flex-end;
	gap: 10px; padding: 16px 20px;
	border-top: 1px solid var(--trf-tan); flex-shrink: 0;
}

/* ── GMAIL FALLBACK BANNER ───────────────────────────────────── */
.trf-gmail-fallback {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--trf-notice-bg);
	color: var(--trf-notice-txt);
	border-left: 4px solid #F0C040;
	padding: 10px 16px;
	font-size: 13px;
	font-family: var(--trf-sans);
	animation: trf-slide-in .3s ease;
}
.trf-fallback-close {
	background: none; border: none; cursor: pointer;
	font-size: 18px; color: var(--trf-notice-txt);
	margin-left: auto; padding: 0; line-height: 1;
}
@keyframes trf-slide-in { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:none; } }

/* ── STICKY EDIT FORM HEADER/FOOTER ─────────────────────────── */
.trf-edit-top {
	position: sticky;
	top: 0;
	background: var(--trf-cream);
	z-index: 100;
	padding: 16px 0 12px;
	border-bottom: 1px solid var(--trf-taupe);
	margin-bottom: 20px;
}
.trf-edit-footer {
	position: sticky;
	bottom: 0;
	background: var(--trf-cream);
	padding: 16px 0;
	border-top: 1px solid var(--trf-taupe);
	margin-top: 8px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

/* ── PRINT STYLES ────────────────────────────────────────────── */
@media print {
	.trf-toolbar, .trf-carousel-wrap, .trf-dots, .trf-footer,
	.trf-overlay, .trf-panel-close, .trf-panel-actions .trf-btn-outline,
	.trf-panel-actions .trf-btn-primary, .trf-panel-download-note,
	.trf-notice, .trf-success-banner { display: none !important; }
	.trf-panel {
		position: static !important;
		transform: none !important;
		box-shadow: none !important;
		height: auto !important;
		width: 100% !important;
		max-width: 100% !important;
	}
}

/* ── CHECKBOX LABELS IN EDIT FORM ────────────────────────────── */
.trf-checkbox-label {
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	font-size: 14px;
	color: var(--trf-ink);
}
.trf-checkbox-label input[type="checkbox"] {
	width: 18px;
	height: 18px;
	accent-color: var(--trf-brown);
	flex-shrink: 0;
}

/* ── LOGOUT BUTTON ───────────────────────────────────────────── */
.trf-btn-logout {
	background: transparent;
	border: 1.5px solid var(--trf-taupe);
	color: var(--trf-muted);
	border-radius: var(--trf-radius);
	padding: 9px 14px;
	font-family: var(--trf-sans);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: border-color .2s, color .2s, background .2s;
	white-space: nowrap;
	display: inline-block;
}
.trf-btn-logout:hover {
	border-color: #c0392b;
	color: #c0392b;
}

/* ── PERMANENT NOTICE (no dismiss) ──────────────────────────── */
.trf-notice-permanent {
	display: flex !important;
}
.trf-notice-permanent .trf-notice-close {
	display: none;
}

/* ── IMPROVED PRINT STYLES ───────────────────────────────────── */
@media print {
	/* Hide everything except the panel content */
	body > *:not(.trf-panel) { display: none !important; }
	.trf-app, .trf-overlay, .trf-toolbar,
	.trf-carousel-wrap, .trf-dots, .trf-footer,
	.trf-notice, .trf-success-banner,
	.trf-panel-close, .trf-panel-actions,
	.trf-panel-download-note { display: none !important; }

	/* Make panel static and full-width for printing */
	.trf-panel {
		position: static !important;
		transform: none !important;
		box-shadow: none !important;
		height: auto !important;
		width: 100% !important;
		max-width: 100% !important;
		overflow: visible !important;
		border: none !important;
	}
	.trf-panel-inner { padding: 0 !important; }

	/* Clean print typography */
	.trf-panel-name { font-size: 20pt !important; }
	.trf-panel-section h4 { font-size: 9pt !important; }
	.trf-panel-row { font-size: 11pt !important; margin-bottom: 6pt !important; }

	/* Keep subtle URL footer - browser handles this natively */
}

/* ── FORGOT PASSWORD LINK IN LOGIN FORM ──────────────────────── */
.trf-forgot-pwd {
	display: block;
	text-align: center;
	font-size: 12px;
	color: var(--trf-muted-lt);
	margin-top: 14px;
	text-decoration: none;
}
.trf-forgot-pwd:hover { color: var(--trf-brown); text-decoration: underline; }

/* ── PASSWORD STRENGTH METER ─────────────────────────────────── */
.trf-pwd-strength { margin-bottom: 12px; }
.trf-pwd-bar {
	height: 4px; background: var(--trf-taupe);
	border-radius: 2px; margin-bottom: 4px; overflow: hidden;
}
.trf-pwd-bar-fill {
	height: 100%; width: 0; border-radius: 2px;
	transition: width .3s, background .3s;
}
.trf-pwd-strength-label {
	font-size: 11px; font-weight: 600;
}

/* ── SIGN OUT BUTTON ─────────────────────────────────────────── */
.trf-btn-logout {
	background: transparent;
	border: 1.5px solid var(--trf-taupe);
	color: var(--trf-muted);
	border-radius: var(--trf-radius);
	padding: 9px 14px;
	font-family: var(--trf-sans);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
	transition: border-color .2s, color .2s;
	white-space: nowrap;
}
.trf-btn-logout:hover { border-color: #c0392b; color: #c0392b; }

/* ── PERMANENT NOTICE ────────────────────────────────────────── */
.trf-notice-permanent .trf-notice-close { display: none !important; }
.trf-notice { display: flex !important; }

/* ── FORGOT PASSWORD LINK ────────────────────────────────────── */
.trf-forgot-pwd {
	display: block; text-align: center;
	font-size: 12px; color: var(--trf-muted-lt);
	margin-top: 14px; text-decoration: none;
}
.trf-forgot-pwd:hover { color: var(--trf-brown); text-decoration: underline; }

/* ── STICKY EDIT HEADER/FOOTER ───────────────────────────────── */
.trf-edit-top {
	position: sticky; top: 0;
	background: var(--trf-cream); z-index: 100;
	padding: 16px 0 12px;
	border-bottom: 1px solid var(--trf-taupe);
	margin-bottom: 20px;
}
.trf-edit-footer {
	position: sticky; bottom: 0;
	background: var(--trf-cream);
	padding: 16px 0;
	border-top: 1px solid var(--trf-taupe);
	margin-top: 8px;
	display: flex; align-items: center;
	justify-content: space-between; gap: 12px;
}

/* ── PASSWORD STRENGTH METER ─────────────────────────────────── */
.trf-pwd-strength { margin-bottom: 12px; }
.trf-pwd-bar { height: 4px; background: var(--trf-taupe); border-radius: 2px; margin-bottom: 4px; overflow: hidden; }
.trf-pwd-bar-fill { height: 100%; width: 0; border-radius: 2px; transition: width .3s, background .3s; }
.trf-pwd-strength-label { font-size: 11px; font-weight: 600; }

/* ── EXPORT MODAL: DOWNLOAD ALL ROW ─────────────────────────── */
.trf-export-all-row {
	display: flex; align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	background: var(--trf-parchment);
	border-bottom: 1px solid var(--trf-taupe);
	gap: 12px; flex-wrap: wrap;
}
.trf-export-all-label { font-size: 13px; color: var(--trf-muted); font-family: var(--trf-sans); }
.trf-export-divider {
	display: flex; align-items: center; gap: 10px;
	padding: 0 20px; margin: 10px 0 0;
	font-size: 12px; color: var(--trf-muted-lt);
	font-family: var(--trf-sans);
	text-transform: uppercase; letter-spacing: .5px;
}
.trf-export-divider::before, .trf-export-divider::after {
	content: ''; flex: 1; height: 1px; background: var(--trf-taupe);
}
.trf-export-footer .trf-btn-primary:disabled {
	background: var(--trf-taupe); cursor: not-allowed; opacity: .6;
}

/* ── PRINT ───────────────────────────────────────────────────── */
#trf-print-area { display: none; }
body.trf-is-printing #trf-print-area { display: block !important; }
@media print {
	body.trf-is-printing > *:not(#trf-print-area) { display: none !important; }
	#trf-print-area { display: block !important; }
}

/* ── CHECKBOX LABELS ─────────────────────────────────────────── */
.trf-checkbox-label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--trf-ink); }
.trf-checkbox-label input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--trf-brown); flex-shrink: 0; }

/* ── YOU BADGE (current user's card) ────────────────────────── */
.trf-you-badge {
	display: inline-block;
	font-family: var(--trf-sans);
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .6px;
	color: var(--trf-brown);
	background: var(--trf-tan);
	border: 1px solid var(--trf-taupe);
	border-radius: 4px;
	padding: 1px 6px;
	margin-left: 6px;
	vertical-align: middle;
	line-height: 1.6;
}

/* ── INLINE EDIT SECTION (below directory) ───────────────────── */
.trf-inline-edit-section {
	border-top: 2px solid var(--trf-taupe);
	margin-top: 32px;
	padding-top: 8px;
}
/* Shrink the top padding of the edit wrap when inline */
.trf-inline-edit-section .trf-edit-wrap {
	padding-top: 24px;
}

/* ── WELCOME MODAL ───────────────────────────────────────────── */
.trf-welcome-overlay {
	position: fixed;
	inset: 0;
	background: rgba(44, 36, 23, .55);
	backdrop-filter: blur(3px);
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.trf-welcome-modal {
	background: var(--trf-white);
	border-radius: 20px;
	box-shadow: var(--trf-shadow-lg);
	padding: 40px 36px 32px;
	max-width: 480px;
	width: 100%;
	position: relative;
	text-align: center;
}
.trf-welcome-close {
	position: absolute;
	top: 14px;
	right: 16px;
	background: none;
	border: none;
	font-size: 24px;
	color: var(--trf-muted-lt);
	cursor: pointer;
	line-height: 1;
	padding: 0;
}
.trf-welcome-close:hover { color: var(--trf-ink); }
.trf-welcome-icon { font-size: 48px; margin-bottom: 12px; line-height: 1; }
.trf-welcome-title {
	font-family: var(--trf-serif);
	font-size: 24px;
	font-weight: 700;
	color: var(--trf-ink);
	margin: 0 0 20px;
	letter-spacing: -.3px;
}
.trf-welcome-body {
	text-align: left;
	font-family: var(--trf-sans);
	font-size: 14px;
	color: var(--trf-ink);
	line-height: 1.6;
}
.trf-welcome-body p { margin: 0 0 12px; }
.trf-welcome-body ul {
	margin: 0 0 16px;
	padding-left: 20px;
}
.trf-welcome-body li { margin-bottom: 8px; }
.trf-welcome-closing {
	text-align: center;
	color: var(--trf-muted);
	font-size: 13px;
	margin-top: 4px !important;
}
.trf-welcome-btn {
	width: 100%;
	margin-top: 20px;
	padding: 13px;
	font-size: 15px;
	border-radius: 10px;
}

@media (max-width: 640px) {
	.trf-welcome-modal { padding: 32px 20px 24px; }
	.trf-welcome-title { font-size: 20px; }
}

/* ── COMING SOON BUTTON (calendar placeholder) ───────────────── */
.trf-btn-coming-soon {
	opacity: .5;
	cursor: not-allowed !important;
	position: relative;
}
.trf-btn-coming-soon:hover {
	border-color: var(--trf-taupe) !important;
	color: var(--trf-muted) !important;
}

/* ── QUOTE DISPLAY IN PANEL ──────────────────────────────────── */
.trf-panel-val em {
	display: block;
	margin-top: 3px;
	font-style: italic;
}

/* ── QUOTE DOT INDICATOR ON CARD ─────────────────────────────── */
.trf-quote-dot {
	font-size: 9px;
	color: var(--trf-brown-lt);
	vertical-align: middle;
	margin-left: 4px;
	opacity: .7;
	cursor: help;
}

/* ── CARD ENTRANCE ANIMATION (staggered fade-up) ─────────────── */
@keyframes trf-card-in {
	from { opacity: 0; transform: translateY(14px); }
	to   { opacity: 1; transform: translateY(0); }
}
.trf-card {
	animation: trf-card-in .4s ease both;
}
/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
	.trf-card { animation: none; }
}

/* ── TOOLBAR TITLE GROUP ─────────────────────────────────────── */
.trf-toolbar-title-group {
	display: flex;
	align-items: baseline;
	gap: 10px;
}
.trf-member-count {
	font-family: var(--trf-sans);
	font-size: 12px;
	color: var(--trf-muted-lt);
	letter-spacing: .2px;
}

/* ── WELCOME BACK in sign-out link ───────────────────────────── */
/* Already inherits .trf-signout-link styles — no extra CSS needed */

/* ── BIRTHDAY BANNER ─────────────────────────────────────────── */
.trf-birthday-banner {
	background: linear-gradient(135deg, #FFF8E1 0%, #FFF3CD 100%);
	border-left: 4px solid #F0C040;
	border-bottom: 1px solid #F0C040;
	color: #5C4A00;
	padding: 12px 24px;
	font-family: var(--trf-sans);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .1px;
	/* Fade-in handled by JS */
}

/* ── COMING SOON WRAPPER (enables tooltip on disabled button) ── */
.trf-coming-soon-wrap {
	display: inline-block;
	cursor: help;
	position: relative;
}
.trf-coming-soon-wrap:hover::after {
	content: attr(title);
	position: absolute;
	bottom: calc(100% + 8px);
	left: 50%;
	transform: translateX(-50%);
	background: var(--trf-ink);
	color: #fff;
	font-size: 12px;
	font-family: var(--trf-sans);
	padding: 6px 10px;
	border-radius: 6px;
	white-space: nowrap;
	pointer-events: none;
	z-index: 1000;
	box-shadow: var(--trf-shadow-sm);
}

/* ── RECENTLY UPDATED BADGE ──────────────────────────────────── */
.trf-updated-badge {
	display: inline-block;
	font-family: var(--trf-sans);
	font-size: 9px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .5px;
	color: var(--trf-success);
	background: var(--trf-success-bg);
	border: 1px solid #c3e6cb;
	border-radius: 4px;
	padding: 1px 5px;
	margin-left: 4px;
	vertical-align: middle;
	line-height: 1.6;
}

/* ── NOTIFY FAMILY ROW (life events section) ─────────────────── */
.trf-notify-row {
	margin-top: 12px;
	padding: 12px 14px;
	background: var(--trf-notice-bg);
	border: 1px solid #f0e080;
	border-radius: var(--trf-radius);
}
.trf-notify-row .trf-checkbox-label {
	font-size: 13px;
	color: var(--trf-notice-txt);
	align-items: flex-start;
	gap: 10px;
}
.trf-notify-row em {
	font-style: italic;
}

/* ── TWO-ROW TOOLBAR ─────────────────────────────────────────── */
.trf-toolbar-row1 {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 32px 6px;
	flex-wrap: wrap;
}
.trf-toolbar-row2 {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 32px 14px;
	border-bottom: 1px solid var(--trf-taupe);
	flex-wrap: wrap;
}
.trf-toolbar-row1 .trf-search-wrap { flex: 1; }
.trf-toolbar-row2 .trf-btn-active {
	background: var(--trf-brown);
	color: #fff;
	border-color: var(--trf-brown);
}
@media (max-width: 640px) {
	.trf-toolbar-row1, .trf-toolbar-row2 { padding: 8px 16px; }
	.trf-toolbar-row1 { flex-direction: column; align-items: stretch; }
	.trf-toolbar-row2 { flex-direction: column; align-items: stretch; }
}

/* ── RECIPE BOX SECTION ──────────────────────────────────────── */
.trf-recipe-box-section {
	border-top: 2px solid var(--trf-taupe);
	background: var(--trf-cream);
	padding: 0 0 40px;
}
.trf-recipe-box {
	max-width: 960px;
	margin: 0 auto;
	padding: 24px 24px 0;
}
.trf-recipe-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
	gap: 12px;
	flex-wrap: wrap;
}
.trf-recipe-search-wrap { position: relative; flex: 1; max-width: 320px; }
.trf-recipe-search-wrap .trf-search-icon {
	position: absolute; left: 12px; top: 50%;
	transform: translateY(-50%); color: var(--trf-muted-lt);
	pointer-events: none;
}
#trf-recipe-search {
	width: 100%; padding: 9px 14px 9px 34px;
	border: 1.5px solid var(--trf-taupe); border-radius: 24px;
	font-family: var(--trf-sans); font-size: 14px; outline: none;
}
#trf-recipe-search:focus { border-color: var(--trf-brown); }
.trf-recipe-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.trf-recipe-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 20px;
}
.trf-recipe-card {
	background: var(--trf-white);
	border-radius: 12px;
	border: 1px solid var(--trf-taupe);
	box-shadow: var(--trf-shadow-sm);
	cursor: pointer;
	overflow: hidden;
	transition: transform .2s, box-shadow .2s;
}
.trf-recipe-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--trf-shadow-md);
}
.trf-recipe-photo {
	height: 140px;
	background-size: cover;
	background-position: center;
	background-color: var(--trf-tan);
}
.trf-recipe-no-photo {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 40px;
}
.trf-recipe-card-body { padding: 14px; }
.trf-recipe-card-title {
	font-family: var(--trf-serif);
	font-size: 16px;
	font-weight: 700;
	color: var(--trf-ink);
	margin: 0 0 4px;
}
.trf-recipe-card-owner {
	font-size: 12px;
	color: var(--trf-muted-lt);
	margin: 0 0 6px;
	font-style: italic;
}
.trf-recipe-card-memory {
	font-size: 12px;
	color: var(--trf-muted);
	margin: 0;
	line-height: 1.4;
}
.trf-recipe-empty {
	text-align: center;
	padding: 60px 24px;
	color: var(--trf-muted);
	font-family: var(--trf-serif);
	font-size: 18px;
}

/* Add recipe form */
.trf-add-recipe-form {
	background: var(--trf-white);
	border: 1px solid var(--trf-taupe);
	border-radius: var(--trf-radius);
	padding: 24px;
	margin-bottom: 24px;
	box-shadow: var(--trf-shadow-sm);
}
.trf-recipe-form-title {
	font-family: var(--trf-serif);
	font-size: 18px;
	color: var(--trf-brown);
	margin: 0 0 16px;
}

/* Tag list */
.trf-tag-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	max-height: 160px;
	overflow-y: auto;
	padding: 8px;
	border: 1px solid var(--trf-taupe);
	border-radius: 6px;
}
.trf-tag-compact { max-height: 120px; }
.trf-tag-item {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--trf-ink);
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 20px;
	background: var(--trf-tan);
	border: 1px solid var(--trf-taupe);
	transition: background .15s;
}
.trf-tag-item:hover { background: var(--trf-row-hover); }
.trf-tag-item input { width: 14px; height: 14px; accent-color: var(--trf-brown); }

/* Recipe detail panel */
.trf-recipe-overlay {
	position: fixed; inset: 0;
	background: rgba(44,36,23,.4);
	backdrop-filter: blur(2px);
	z-index: 9000; opacity: 0; pointer-events: none;
	transition: opacity .3s;
}
.trf-recipe-overlay.trf-open { opacity: 1; pointer-events: auto; }
.trf-recipe-panel {
	position: fixed; top: 0; right: 0;
	width: var(--trf-panel-w); max-width: 100vw; height: 100dvh;
	background: var(--trf-white); z-index: 9100;
	transform: translateX(100%);
	transition: transform .35s cubic-bezier(.4,0,.2,1);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch; /* iOS momentum scrolling */
	box-shadow: var(--trf-shadow-lg);
}
.trf-recipe-panel.trf-open { transform: translateX(0); }
.trf-recipe-panel-close {
	position: absolute; top: 16px; right: 16px;
	width: 36px; height: 36px; border-radius: 50%;
	background: rgba(255,255,255,.9); border: 1px solid var(--trf-taupe);
	font-size: 20px; cursor: pointer; z-index: 10;
	display: flex; align-items: center; justify-content: center;
	padding: 0; color: var(--trf-muted);
}
.trf-recipe-panel-close:hover { background: var(--trf-brown); color: #fff; }
.trf-recipe-detail-photo {
	height: 220px; background-size: cover; background-position: center;
}
.trf-recipe-detail-body { padding: 24px; }
.trf-recipe-detail-title {
	font-family: var(--trf-serif); font-size: 24px; font-weight: 700;
	color: var(--trf-ink); margin: 0 0 4px;
}
.trf-recipe-detail-owner {
	font-size: 13px; color: var(--trf-muted-lt);
	font-style: italic; margin: 0 0 16px;
}
.trf-recipe-memory {
	border-left: 3px solid var(--trf-brown);
	margin: 0 0 16px; padding: 8px 14px;
	font-style: italic; color: var(--trf-muted);
	font-size: 14px; line-height: 1.6;
	background: var(--trf-parchment); border-radius: 0 6px 6px 0;
}
.trf-recipe-section { margin-bottom: 16px; }
.trf-recipe-section h4 {
	font-family: var(--trf-serif); font-size: 14px; font-weight: 700;
	color: var(--trf-brown); margin: 0 0 8px;
	text-transform: uppercase; letter-spacing: .5px;
}
.trf-recipe-text {
	font-family: var(--trf-sans); font-size: 13px; color: var(--trf-ink);
	white-space: pre-wrap; margin: 0; line-height: 1.7;
}
.trf-recipe-tagged {
	font-size: 12px; color: var(--trf-muted-lt);
	margin: 12px 0 0; font-style: italic;
}
.trf-recipe-detail-actions { margin-top: 20px; }

/* ── RECIPE PRINT CARD — Farmhouse Notecard ──────────────────── */
.trf-recipe-print-card {
	font-family: 'Playfair Display', Georgia, serif;
	max-width: 540px; margin: 0 auto;
	padding: 36px 40px;
	background: #FDFAF4;
	border: 2px solid #C4A882;
	border-radius: 4px;
	box-shadow: 2px 2px 8px rgba(0,0,0,.08);
}
.trf-recipe-print-header {
	display: flex; align-items: flex-start;
	gap: 16px; margin-bottom: 16px;
	border-bottom: 1px dashed #C4A882; padding-bottom: 14px;
}
.trf-recipe-print-photo {
	width: 80px; height: 80px;
	object-fit: cover; border: 1px solid #C4A882;
	flex-shrink: 0;
}
.trf-recipe-print-title {
	font-size: 22pt; font-weight: 700;
	color: #3C2415; margin: 0 0 4px;
	letter-spacing: -.3px; line-height: 1.2;
}
.trf-recipe-print-owner {
	font-size: 11pt; color: #8B6F5E;
	font-style: italic; margin: 0;
}
.trf-recipe-print-memory {
	font-style: italic; color: #6B5B4E;
	font-size: 11pt; line-height: 1.6;
	margin: 0 0 14px; padding: 8px 12px;
	border-left: 3px solid #C4A882;
}
.trf-recipe-print-section h3 {
	font-size: 11pt; font-weight: 700;
	text-transform: uppercase; letter-spacing: 1px;
	color: #8B6F5E; margin: 12px 0 6px;
}
.trf-recipe-print-text {
	font-family: 'Lato', -apple-system, sans-serif;
	font-size: 10pt; color: #2C2417;
	line-height: 1.7; margin: 0 0 8px;
}
.trf-recipe-print-footer {
	font-size: 9pt; color: #C4A882;
	text-align: center; margin-top: 16px;
	font-style: italic;
}

/* ── CORK BOARD ──────────────────────────────────────────────── */
.trf-cork-board-wrap {
	margin-top: 8px;
}
.trf-cork-board-header {
	display: flex; align-items: center;
	justify-content: space-between; margin-bottom: 14px;
}
.trf-cork-section-title {
	font-family: var(--trf-serif); font-size: 15px;
	color: var(--trf-brown); margin: 0;
}
.trf-cork-add-btn { font-size: 13px; }
.trf-cork-empty {
	font-size: 13px; color: var(--trf-muted-lt);
	font-style: italic; text-align: center;
	padding: 16px 0;
}

/* Cork Board — desktop: Pinterest-style column grid */
.trf-cork-board {
	background: #b5883e url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='4' height='4' fill='%23c49a4f' opacity='.3'/%3E%3Crect width='2' height='2' fill='%23a07438' opacity='.2'/%3E%3C/svg%3E");
	border-radius: 10px;
	padding: 20px 16px 16px;
	columns: 2;
	column-gap: 14px;
	box-shadow: inset 0 2px 8px rgba(0,0,0,.15), 0 4px 12px rgba(0,0,0,.1);
}

/* Cork Board item — pinned card */
.trf-cork-item {
	break-inside: avoid;
	position: relative;
	background: var(--trf-white);
	border-radius: 3px;
	padding: 10px 10px 8px;
	margin-bottom: 14px;
	box-shadow: 2px 3px 8px rgba(0,0,0,.18), 0 1px 2px rgba(0,0,0,.1);
	display: inline-block;
	width: 100%;
	box-sizing: border-box;
}
.trf-cork-note-item {
	background: #fffde7; /* Pale yellow sticky note */
}

/* Pushpin */
.trf-cork-pin {
	position: absolute;
	top: -8px; left: 50%;
	transform: translateX(-50%);
	width: 16px; height: 16px;
	border-radius: 50%;
	box-shadow: 0 2px 4px rgba(0,0,0,.4), inset 0 -1px 2px rgba(255,255,255,.3);
	z-index: 2;
}
.trf-cork-pin::after {
	content: '';
	position: absolute;
	bottom: -6px; left: 50%;
	transform: translateX(-50%);
	width: 2px; height: 8px;
	background: rgba(0,0,0,.3);
	border-radius: 1px;
}

/* Photo items */
.trf-cork-photo-frame {
	cursor: pointer;
	margin: 0 -10px 8px;
	border-top: 4px solid var(--trf-white);
	overflow: hidden;
}
.trf-cork-photo-img {
	display: block; width: 100%;
	border: 4px solid var(--trf-white);
	border-top: none;
	box-shadow: none;
	transition: opacity .2s;
}
.trf-cork-photo-frame:hover .trf-cork-photo-img { opacity: .9; }

.trf-cork-desc {
	font-family: var(--trf-sans);
	font-size: 12px; color: var(--trf-ink);
	margin: 0 0 6px; line-height: 1.5;
}
.trf-cork-credit {
	font-size: 10px; color: var(--trf-muted-lt);
	margin: 0; font-style: italic;
	display: flex; align-items: center; gap: 6px;
}
.trf-cork-date {
	font-size: 10px; color: var(--trf-muted-lt);
}

/* Cork Board form */
.trf-cork-add-form {
	background: var(--trf-white);
	border: 1px solid var(--trf-taupe);
	border-radius: var(--trf-radius);
	padding: 16px;
	margin-bottom: 16px;
	box-shadow: var(--trf-shadow-sm);
}
.trf-cork-form .trf-field label {
	font-size: 11px; font-weight: 700;
	text-transform: uppercase; letter-spacing: .5px;
	color: var(--trf-muted); margin-bottom: 4px; display: block;
}
.trf-cork-form .trf-field textarea,
.trf-cork-form .trf-field input[type="file"] {
	width: 100%;
	border: 1.5px solid var(--trf-taupe);
	border-radius: 6px; padding: 8px 10px;
	font-family: var(--trf-sans); font-size: 13px;
	box-sizing: border-box;
}
.trf-cork-form .trf-field textarea:focus { border-color: var(--trf-brown); outline: none; }
.trf-cork-form-footer {
	display: flex; justify-content: flex-end;
	gap: 8px; margin-top: 12px;
}

/* Mobile: single column cork board */
@media (max-width: 640px) {
	.trf-cork-board { columns: 1; }
	.trf-recipe-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 400px) {
	.trf-recipe-grid { grid-template-columns: 1fr; }
}

/* ── LIGHTBOX ────────────────────────────────────────────────── */
.trf-lightbox {
	position: fixed; inset: 0; z-index: 9999;
}
.trf-lightbox-overlay {
	position: absolute; inset: 0;
	background: rgba(0,0,0,.85);
}
.trf-lightbox-inner {
	position: relative; z-index: 1;
	display: flex; flex-direction: column;
	align-items: center; justify-content: center;
	height: 100%; padding: 40px 20px 20px;
}
.trf-lightbox-close {
	position: absolute; top: 16px; right: 20px;
	background: none; border: none; cursor: pointer;
	color: #fff; font-size: 32px; line-height: 1; padding: 0;
}
.trf-lightbox-img {
	max-width: 90vw; max-height: 80vh;
	object-fit: contain;
	box-shadow: 0 8px 40px rgba(0,0,0,.6);
}
.trf-lightbox-hint {
	color: rgba(255,255,255,.5);
	font-size: 12px; margin-top: 12px;
	font-family: var(--trf-sans);
}

/* ── PROFILE COMPLETION METER ────────────────────────────────── */
.trf-completion-wrap {
	background: var(--trf-white);
	border: 1px solid var(--trf-taupe);
	border-radius: var(--trf-radius);
	padding: 16px 20px;
	margin-bottom: 20px;
	box-shadow: var(--trf-shadow-sm);
}
.trf-completion-header {
	display: flex; align-items: center;
	justify-content: space-between; margin-bottom: 8px;
}
.trf-completion-label {
	font-family: var(--trf-sans); font-size: 13px;
	font-weight: 700; color: var(--trf-muted);
	text-transform: uppercase; letter-spacing: .5px;
}
.trf-completion-pct {
	font-family: var(--trf-serif); font-size: 22px;
	font-weight: 700; line-height: 1;
}
.trf-completion-bar-bg {
	height: 8px; background: var(--trf-tan);
	border-radius: 4px; overflow: hidden; margin-bottom: 8px;
}
.trf-completion-bar-fill {
	height: 100%; border-radius: 4px;
	transition: width .6s ease;
}
.trf-completion-msg {
	font-size: 13px; color: var(--trf-muted);
	margin: 0 0 4px; font-family: var(--trf-sans);
}
.trf-meter-hint {
	font-size: 12px; color: var(--trf-muted-lt);
	margin: 0; font-style: italic;
}

/* ── RECIPE BOX MODAL OVERLAY ────────────────────────────────── */
.trf-recipe-modal-overlay {
	position: fixed; inset: 0; z-index: 8000;
	background: rgba(30, 20, 10, .6);
	backdrop-filter: blur(3px);
	display: flex; align-items: center; justify-content: center;
	padding: 20px;
}
.trf-recipe-modal {
	background: #F5EDD8;
	border-radius: 12px 12px 8px 8px;
	box-shadow: 0 20px 60px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.2);
	width: 90vw; max-width: 860px;
	max-height: 90vh;
	display: flex; flex-direction: column;
	overflow: hidden;
}

/* Recipe box lid — the nostalgic plastic box top */
.trf-recipe-modal-header {
	background: linear-gradient(180deg, #E8C547 0%, #D4A830 60%, #C49520 100%);
	padding: 14px 20px 10px;
	display: flex; align-items: center;
	justify-content: space-between;
	box-shadow: 0 2px 6px rgba(0,0,0,.2);
	border-radius: 12px 12px 0 0;
	flex-shrink: 0;
}
.trf-recipe-box-lid {
	display: flex; align-items: center; gap: 10px;
}
.trf-recipe-box-title {
	font-family: var(--trf-serif);
	font-size: 18px; font-weight: 700;
	color: #3C2415;
	text-shadow: 0 1px 2px rgba(255,255,255,.3);
}

/* White daisy pattern accent on lid (purely decorative via ::before) */
.trf-recipe-box-lid::before {
	content: '✿ ✿ ✿';
	font-size: 14px; color: rgba(255,255,255,.5);
	letter-spacing: 4px;
}

.trf-recipe-modal-close {
	background: rgba(0,0,0,.15); border: none; cursor: pointer;
	color: #3C2415; font-size: 22px; width: 32px; height: 32px;
	border-radius: 50%; display: flex; align-items: center;
	justify-content: center; padding: 0;
	transition: background .2s;
}
.trf-recipe-modal-close:hover { background: rgba(0,0,0,.3); color: #fff; }

.trf-recipe-modal-body {
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	flex: 1;
	background: #FAF6EC;
}

/* ── RECIPE CARDS — NOSTALGIC INDEX CARD BOX STYLE ──────────── */

/* Override the grid inside the modal for the nostalgic card look */
.trf-recipe-modal-body .trf-recipe-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	padding: 20px 20px 8px;
}

/* Each card looks like a tabbed index card */
.trf-recipe-modal-body .trf-recipe-card {
	width: 200px;
	background: #FDFAF2;
	border: 1.5px solid #C8A96E;
	border-radius: 0 8px 4px 4px;
	box-shadow: 2px 3px 6px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.8);
	margin: 0 10px 16px 0;
	position: relative;
	transition: transform .15s, box-shadow .15s;
}
.trf-recipe-modal-body .trf-recipe-card:hover {
	transform: translateY(-6px) rotate(-1deg);
	box-shadow: 4px 8px 16px rgba(0,0,0,.18);
}

/* The TAB at the top of each card */
.trf-recipe-modal-body .trf-recipe-card::before {
	content: attr(data-title);
	position: absolute;
	top: -28px; left: -1.5px;
	background: #4A9EA8;
	color: #fff;
	font-family: var(--trf-serif);
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .5px;
	padding: 5px 10px 4px;
	border-radius: 4px 4px 0 0;
	border: 1.5px solid #3A8E98;
	border-bottom: none;
	max-width: 160px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.2;
}

/* Alternate tab colors for variety, like a real recipe box */
.trf-recipe-modal-body .trf-recipe-card:nth-child(3n+1)::before { background: #4A9EA8; border-color: #3A8E98; }
.trf-recipe-modal-body .trf-recipe-card:nth-child(3n+2)::before { background: #D4956A; border-color: #C4854A; }
.trf-recipe-modal-body .trf-recipe-card:nth-child(3n)::before   { background: #7EA87A; border-color: #6E986A; }

/* Recipe photo in nostalgic card */
.trf-recipe-modal-body .trf-recipe-photo {
	height: 110px;
	border-bottom: 1px solid #C8A96E;
}
.trf-recipe-modal-body .trf-recipe-no-photo {
	background: #F0E8D0;
	font-size: 32px;
}
.trf-recipe-modal-body .trf-recipe-card-body {
	padding: 10px 12px 12px;
}
.trf-recipe-modal-body .trf-recipe-card-title {
	font-size: 13px;
	font-weight: 700;
	color: #3C2415;
	margin: 0 0 2px;
	line-height: 1.3;
}
.trf-recipe-modal-body .trf-recipe-card-owner {
	font-size: 10px;
	color: #8B6F5E;
	margin: 0 0 4px;
}
.trf-recipe-modal-body .trf-recipe-card-memory {
	font-size: 10px;
	color: #6B5B4E;
	line-height: 1.4;
	margin: 0;
	font-style: italic;
}

/* Recipe toolbar inside modal */
.trf-recipe-modal-body .trf-recipe-box { padding: 28px 20px 0; }
.trf-recipe-modal-body .trf-recipe-toolbar { margin-bottom: 10px; }

/* ── ADD MEMORY MODAL ────────────────────────────────────────── */
.trf-memory-modal-overlay {
	position: fixed; inset: 0; z-index: 8500;
	background: rgba(30,20,10,.65);
	backdrop-filter: blur(3px);
	display: flex; align-items: center; justify-content: center;
	padding: 20px;
}
.trf-memory-modal {
	background: var(--trf-white);
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0,0,0,.35);
	width: 90vw; max-width: 520px;
	max-height: 90vh; overflow-y: auto;
}
.trf-memory-modal-header {
	display: flex; align-items: center;
	justify-content: space-between;
	padding: 20px 20px 12px;
	border-bottom: 1px solid var(--trf-taupe);
	position: sticky; top: 0;
	background: var(--trf-white); z-index: 1;
}
.trf-memory-modal-header h3 {
	margin: 0; font-family: var(--trf-serif);
	font-size: 18px; color: var(--trf-brown);
}
.trf-memory-modal-body { padding: 20px; }
.trf-memory-modal-footer {
	display: flex; justify-content: flex-end;
	gap: 10px; margin-top: 16px;
}

/* ── UPLOAD PROGRESS BAR ─────────────────────────────────────── */
.trf-upload-progress { margin-top: 12px; }
.trf-upload-bar {
	height: 6px; background: var(--trf-taupe);
	border-radius: 3px; overflow: hidden; margin-bottom: 6px;
}
.trf-upload-bar-fill {
	height: 100%; width: 0;
	background: var(--trf-brown);
	border-radius: 3px;
	transition: width .3s ease;
}
.trf-upload-label {
	font-size: 12px; color: var(--trf-muted); margin: 0;
	font-family: var(--trf-sans);
}
.trf-upload-hint { font-size: 12px; margin: 4px 0 0; }

/* ── TAG DROPDOWN ────────────────────────────────────────────── */
.trf-tag-dropdown-wrap { position: relative; }
.trf-tag-dropdown-trigger {
	width: 100%;
	text-align: left;
	background: var(--trf-white);
	border: 1.5px solid var(--trf-taupe);
	border-radius: 8px;
	padding: 10px 14px;
	font-family: var(--trf-sans);
	font-size: 14px;
	color: var(--trf-ink);
	cursor: pointer;
	transition: border-color .2s;
}
.trf-tag-dropdown-trigger:hover,
.trf-tag-dropdown-trigger:focus {
	border-color: var(--trf-brown);
	outline: none;
}
.trf-tag-count {
	font-size: 12px; color: var(--trf-brown);
	font-weight: 700; margin-left: 6px;
}
.trf-tag-dropdown-panel {
	position: absolute; top: calc(100% + 4px); left: 0; right: 0;
	background: var(--trf-white);
	border: 1.5px solid var(--trf-taupe);
	border-radius: 8px;
	box-shadow: var(--trf-shadow-md);
	max-height: 280px;
	display: flex; flex-direction: column; /* search + done sticky, list scrolls */
	z-index: 200;
}
.trf-tag-group { border-bottom: 1px solid var(--trf-tan); }
.trf-tag-group:last-child { border-bottom: none; }
.trf-tag-group-label {
	padding: 6px 14px 4px;
	font-size: 10px; font-weight: 700;
	text-transform: uppercase; letter-spacing: .5px;
	color: var(--trf-brown);
	background: var(--trf-parchment);
}
.trf-tag-dropdown-item {
	display: flex; align-items: center;
	gap: 8px; padding: 8px 14px;
	cursor: pointer; font-size: 14px;
	color: var(--trf-ink);
	transition: background .1s;
}
.trf-tag-dropdown-item:hover { background: var(--trf-tan); }
.trf-tag-dropdown-item input {
	width: 16px; height: 16px;
	accent-color: var(--trf-brown); flex-shrink: 0;
}

/* ── RECIPE BOX SECTION (now just hidden, modal handles display) */
.trf-recipe-box-section { display: none !important; }

/* ── TOOLBAR TOP-RIGHT (notifications + sign out) ────────────── */
.trf-toolbar-top-right {
	display: flex; align-items: center; gap: 12px;
}
.trf-toolbar-divider {
	color: var(--trf-taupe); font-size: 16px; user-select: none;
}
.trf-notif-btn {
	background: none; border: none; cursor: pointer;
	font-family: var(--trf-sans); font-size: 13px;
	color: var(--trf-muted-lt); display: flex; align-items: center;
	gap: 5px; padding: 4px 0;
	transition: color .2s;
}
.trf-notif-btn:hover { color: var(--trf-brown); }
.trf-notif-label { letter-spacing: .2px; }

/* ── STAR / FAVORITE BUTTON ──────────────────────────────────── */
.trf-star-btn {
	position: absolute;
	top: 7px; right: 7px;
	background: none; border: none; cursor: pointer;
	font-size: 18px; line-height: 1;
	color: rgba(255,255,255,.35);
	transition: color .2s, transform .2s;
	padding: 2px; z-index: 5;
}
.trf-card-bubble:hover .trf-star-btn {
	color: rgba(255,255,255,.75);
	transform: scale(1.15);
}
.trf-star-btn.trf-starred,
.trf-card-bubble:hover .trf-star-btn.trf-starred {
	color: #F5C518; /* Gold */
	text-shadow: 0 0 6px rgba(245,197,24,.5);
	transform: scale(1.1);
}
.trf-star-btn:hover { transform: scale(1.3) !important; }

/* Panel star button */
.trf-panel-star-btn {
	font-size: 13px;
}
.trf-panel-star-btn.trf-starred {
	color: #F5C518;
	border-color: #F5C518;
}

/* ── NOTIFICATIONS PANEL ─────────────────────────────────────── */
.trf-notif-overlay {
	position: fixed; inset: 0; z-index: 8900;
	background: rgba(0,0,0,.35); backdrop-filter: blur(2px);
	opacity: 0; pointer-events: none;
	transition: opacity .3s;
}
.trf-notif-overlay.trf-visible {
	opacity: 1; pointer-events: auto;
}
.trf-notif-panel {
	position: fixed; top: 0; right: 0;
	width: 380px; max-width: 100vw; height: 100dvh;
	background: var(--trf-cream); z-index: 9000;
	transform: translateX(100%);
	transition: transform .35s cubic-bezier(.4,0,.2,1);
	overflow-y: auto; box-shadow: var(--trf-shadow-lg);
}
.trf-notif-panel.trf-open { transform: translateX(0); }
.trf-notif-panel-inner { padding: 20px 24px 40px; }
.trf-notif-panel-header {
	display: flex; gap: 14px; align-items: flex-start;
	margin-bottom: 24px; padding-bottom: 20px;
	border-bottom: 1px solid var(--trf-taupe);
	padding-top: 40px; /* room for close button */
}
.trf-notif-panel-icon { font-size: 28px; line-height: 1; flex-shrink: 0; margin-top: 2px; }
.trf-notif-panel-title {
	font-family: var(--trf-serif); font-size: 20px;
	font-weight: 700; color: var(--trf-ink); margin: 0 0 6px;
}
.trf-notif-panel-sub {
	font-family: var(--trf-sans); font-size: 13px;
	color: var(--trf-muted); line-height: 1.5; margin: 0;
}
.trf-notif-section {
	margin-bottom: 28px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--trf-taupe);
}
.trf-notif-section:last-child { border-bottom: none; }
.trf-notif-section-title {
	font-family: var(--trf-serif); font-size: 16px;
	font-weight: 700; color: var(--trf-brown);
	margin: 0 0 4px;
}
.trf-notif-section-desc {
	font-size: 12px; color: var(--trf-muted-lt);
	margin: 0 0 12px; line-height: 1.5;
}
.trf-notif-groups {
	display: flex; flex-direction: column; gap: 8px;
}
.trf-notif-group-item {
	display: flex; align-items: center; gap: 10px;
	cursor: pointer; font-size: 14px; color: var(--trf-ink);
	padding: 8px 10px;
	border-radius: 6px;
	background: var(--trf-white);
	border: 1px solid var(--trf-taupe);
	transition: background .15s;
}
.trf-notif-group-item:hover { background: var(--trf-tan); }
.trf-notif-group-item input {
	width: 18px; height: 18px; accent-color: var(--trf-brown);
}
.trf-notif-empty {
	font-size: 13px; color: var(--trf-muted-lt);
	font-style: italic; margin: 8px 0;
}
.trf-notif-dedup-note {
	font-size: 11px; color: var(--trf-muted-lt);
	background: var(--trf-tan); border-radius: 6px;
	padding: 8px 10px; margin-top: 12px; line-height: 1.5;
}
.trf-notif-saved-msg {
	font-family: var(--trf-sans);
}

/* Favorites list in notification panel */
.trf-notif-fav-search-wrap { position: relative; margin-bottom: 12px; }
.trf-notif-fav-search {
	width: 100%; padding: 9px 14px;
	border: 1.5px solid var(--trf-taupe); border-radius: 24px;
	font-family: var(--trf-sans); font-size: 14px;
	outline: none; box-sizing: border-box;
}
.trf-notif-fav-search:focus { border-color: var(--trf-brown); }
.trf-notif-fav-results {
	position: absolute; top: calc(100% + 4px); left: 0; right: 0;
	background: var(--trf-white);
	border: 1.5px solid var(--trf-taupe); border-radius: 8px;
	box-shadow: var(--trf-shadow-md); z-index: 10;
	max-height: 200px; overflow-y: auto;
}
.trf-notif-search-result {
	display: flex; align-items: center; gap: 10px;
	padding: 9px 14px; cursor: pointer;
	font-size: 14px; color: var(--trf-ink);
	transition: background .1s;
}
.trf-notif-search-result:hover { background: var(--trf-tan); }
.trf-notif-sr-star { margin-left: auto; color: #F5C518; }
.trf-notif-no-results { padding: 10px 14px; font-size: 13px; color: var(--trf-muted-lt); }
.trf-notif-favs-list { display: flex; flex-direction: column; gap: 6px; }
.trf-notif-fav-item {
	display: flex; align-items: center; gap: 10px;
	padding: 8px 10px; background: var(--trf-white);
	border-radius: 6px; border: 1px solid var(--trf-taupe);
}
.trf-notif-fav-bubble {
	width: 32px; height: 32px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-family: var(--trf-serif); font-size: 12px;
	font-weight: 700; color: rgba(255,255,255,.9);
	flex-shrink: 0;
}
.trf-notif-fav-name { flex: 1; font-size: 14px; color: var(--trf-ink); }
.trf-notif-fav-remove {
	background: none; border: none; cursor: pointer;
	color: #F5C518; font-size: 16px;
	transition: transform .2s;
}
.trf-notif-fav-remove:hover { transform: scale(1.2); }

/* ── CORK BOARD: DELETE BUTTON ───────────────────────────────── */
.trf-cork-controls {
	position: absolute; top: 6px; right: 6px; z-index: 10;
	display: none;
}
.trf-cork-item:hover .trf-cork-controls { display: flex; }
.trf-cork-delete-btn {
	background: rgba(0,0,0,.55); border: none; cursor: pointer;
	color: #fff; font-size: 12px; width: 22px; height: 22px;
	border-radius: 50%; display: flex; align-items: center;
	justify-content: center; padding: 0;
	transition: background .2s;
}
.trf-cork-delete-btn:hover { background: #c0392b; }

/* ── CORK BOARD HOVER ANIMATION ──────────────────────────────── */
.trf-cork-item {
	transition: transform .2s ease, box-shadow .2s ease;
}
.trf-cork-item:hover {
	z-index: 5;
	box-shadow: 4px 6px 20px rgba(0,0,0,.3), 0 2px 4px rgba(0,0,0,.15);
	transform: rotate(0deg) translateY(-6px) !important;
}

/* ── TAG DROPDOWN: SEARCH INPUT ──────────────────────────────── */
.trf-tag-search-wrap {
	padding: 8px 10px; border-bottom: 1px solid var(--trf-taupe);
	background: var(--trf-parchment);
	flex-shrink: 0; /* pinned — never scrolls away */
}
.trf-tag-search-input {
	width: 100%; padding: 6px 10px;
	border: 1.5px solid var(--trf-taupe); border-radius: 20px;
	font-family: var(--trf-sans); font-size: 13px;
	outline: none; box-sizing: border-box;
}
.trf-tag-search-input:focus { border-color: var(--trf-brown); }
/* Scrollable list area — sits between the sticky search and sticky done button */
.trf-tag-dropdown-list {
	overflow-y: auto;
	flex: 1;
	-webkit-overflow-scrolling: touch;
}

/* ── ROW 1 ACTIONS FLEX ──────────────────────────────────────── */
.trf-row1-actions { display: flex; align-items: center; gap: 8px; }

/* ── TOOLBAR ROW 2 CENTERED ──────────────────────────────────── */
.trf-toolbar-row2 {
	justify-content: center;
}

/* ══════════════════════════════════════════════════════════════
   v2.9.6 FIXES AND IMPROVEMENTS
   ══════════════════════════════════════════════════════════════ */

/* ── TOOLBAR GRID LAYOUT ─────────────────────────────────────── */
/* Replace old row1/row2 with a proper 3-column grid */
.trf-toolbar-grid {
	display: grid;
	grid-template-columns: 1fr auto auto;
	gap: 10px;
	padding: 10px 32px 16px;
	border-bottom: 1px solid var(--trf-taupe);
	align-items: center;
}
.trf-toolbar-grid .trf-search-wrap {
	grid-column: 1;
	grid-row: 1;
}
.trf-toolbar-grid #trf-export-btn {
	grid-column: 2 / span 2;
	grid-row: 1;
	white-space: nowrap;
}
.trf-toolbar-grid > button:not(#trf-export-btn),
.trf-toolbar-grid > span {
	grid-row: 2;
}
/* Row 2: 3 equal columns */
.trf-toolbar-grid > button:nth-child(3),
.trf-toolbar-grid > div:nth-child(3) {
	grid-column: 1;
}
.trf-toolbar-grid > button:nth-child(4),
.trf-toolbar-grid > div:nth-child(4) {
	grid-column: 2;
}
.trf-toolbar-grid > button:nth-child(5),
.trf-toolbar-grid > span:nth-child(5) {
	grid-column: 3;
}
@media (max-width: 640px) {
	.trf-toolbar-grid {
		grid-template-columns: 1fr;
		padding: 10px 16px 12px;
	}
	.trf-toolbar-grid > * { grid-column: 1 !important; }
}

/* ── MEMBER COUNT BELOW TITLE ────────────────────────────────── */
.trf-toolbar-title-group {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
}
.trf-page-title {
	white-space: nowrap;
}
.trf-member-count {
	font-family: var(--trf-sans);
	font-size: 11px;
	color: var(--trf-muted-lt);
	letter-spacing: .3px;
	margin: 0;
}

/* ── RECIPE BOX TITLE — HANDWRITTEN FLOWER STYLE ─────────────── */
.trf-recipe-box-title {
	font-family: 'Dancing Script', 'Lucida Handwriting', cursive !important;
	font-size: 22px !important;
	font-weight: 700;
	color: #3C2415;
	text-shadow: 0 1px 2px rgba(255,255,255,.3);
	letter-spacing: .5px;
}
/* Remove old ::before dingbats - replace with flowers on both sides */
.trf-recipe-box-lid::before { display: none !important; }
.trf-recipe-box-lid::after  { display: none !important; }

/* ── DECORATIVE RECIPE PRINT BORDER ─────────────────────────── */
/* recipe print media block removed - handled by screen styles */
/* Print card — single clean border, flower ornaments via the JS printDiv */
.trf-recipe-print-card {
	position: relative;
	border: 2px solid #C4A882;
	padding: 36px 40px 36px !important;
	box-sizing: border-box;
}
/* NO ::before or ::after — they were creating a second box overlay */

/* ── CORK BOARD: GRID LAYOUT (fix single-column stacking) ─────── */
.trf-cork-board {
	columns: unset !important;
	display: grid !important;
	grid-template-columns: 1fr 1fr !important;
	gap: 20px !important;
	align-items: start !important;
}
@media (max-width: 400px) {
	.trf-cork-board { grid-template-columns: 1fr !important; }
}

/* ── NOTIFICATIONS: SECTION HEADER WITH ANCHOR LINK ──────────── */
.trf-notif-section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 4px;
}
.trf-notif-anchor-link {
	font-size: 11px;
	color: var(--trf-brown);
	text-decoration: none;
	font-family: var(--trf-sans);
	white-space: nowrap;
}
.trf-notif-anchor-link:hover { text-decoration: underline; }

/* ── NOTIFICATIONS SEARCH: INLINE RESULTS ─────────────────────── */
.trf-notif-fav-results {
	position: static !important; /* Override absolute from previous version */
	background: var(--trf-white);
	border: 1.5px solid var(--trf-taupe);
	border-radius: 8px;
	box-shadow: var(--trf-shadow-sm);
	margin-top: 6px;
	max-height: 200px;
	overflow-y: auto;
}
.trf-notif-star-toggle {
	background: none; border: none; cursor: pointer;
	font-size: 18px; color: var(--trf-muted-lt);
	padding: 2px; transition: color .15s, transform .15s;
	flex-shrink: 0;
}
.trf-notif-star-toggle:hover { transform: scale(1.2); color: #F5C518; }
.trf-notif-star-toggle.trf-starred { color: #F5C518; }
.trf-notif-search-result {
	display: flex; align-items: center; gap: 10px;
	padding: 8px 12px;
}

/* ── NOTIFY EXPLAIN TEXT ─────────────────────────────────────── */
.trf-notify-explain {
	font-size: 11px;
	color: var(--trf-muted-lt);
	margin: 4px 0 0;
	line-height: 1.5;
	font-style: italic;
}

/* ── MEMORY MODAL: BOUNDING BOXES FOR SECTIONS ───────────────── */
.trf-memory-modal-body .trf-field {
	background: var(--trf-white);
	border: 1px solid var(--trf-taupe);
	border-radius: 8px;
	padding: 14px;
	margin-bottom: 12px;
}
.trf-memory-modal-body .trf-field label {
	display: block;
	font-family: var(--trf-sans);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .5px;
	color: var(--trf-brown);
	margin-bottom: 8px;
}
.trf-memory-modal-body .trf-field textarea {
	width: 100%;
	border: 1.5px solid var(--trf-taupe);
	border-radius: 6px;
	padding: 8px 10px;
	font-family: var(--trf-sans);
	font-size: 14px;
	resize: vertical;
	box-sizing: border-box;
}
.trf-memory-modal-body .trf-field textarea:focus {
	border-color: var(--trf-brown); outline: none;
}

/* ── RECIPE LID FLOWERS ──────────────────────────────────────── */
.trf-recipe-lid-flowers {
	font-size: 16px;
	color: rgba(255,255,255,.5);
	letter-spacing: 3px;
	flex-shrink: 0;
}
.trf-recipe-box-lid {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1;
}

/* ── ADMIN NOTIFICATION MODE BANNER ─────────────────────────── */
.trf-admin-mode-banner {
	padding: 10px 24px;
	font-family: var(--trf-sans);
	font-size: 13px;
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.trf-admin-mode-banner a {
	color: inherit;
	text-decoration: underline;
	margin-left: 8px;
}
.trf-test-on {
	background: #e8f5e9;
	border-bottom: 2px solid #4caf50;
	color: #1b5e20;
}
.trf-live {
	background: #fff3e0;
	border-bottom: 2px solid #ff9800;
	color: #e65100;
}

/* ── NOTIFY EXPLAIN ──────────────────────────────────────────── */
.trf-notify-explain {
	font-size: 12px;
	color: var(--trf-muted-lt);
	margin: 6px 0 0 28px;
	line-height: 1.5;
	font-style: italic;
}

/* ── RECIPE PRINT FLOWER ORNAMENT ────────────────────────────── */
.trf-recipe-print-flowers {
	text-align: center;
	font-size: 14px;
	color: #C4A882;
	margin-bottom: 16px;
	letter-spacing: 4px;
}

/* ── CORK BOARD EDIT BUTTON ──────────────────────────────────── */
.trf-cork-edit-btn {
	background: rgba(60,36,21,.6); border: none; cursor: pointer;
	color: #fff; font-size: 12px; width: 22px; height: 22px;
	border-radius: 50%; display: flex; align-items: center;
	justify-content: center; padding: 0; margin-right: 3px;
	transition: background .2s;
}
.trf-cork-edit-btn:hover { background: var(--trf-brown); }
.trf-cork-controls {
	display: none; /* shown on hover via parent :hover */
	flex-direction: row;
	align-items: center;
}

/* ── LIFE EVENTS DATE FIELDS — site-congruent styling ───────── */
.trf-event-row {
	display: flex;
	gap: 10px;
	align-items: center;
	margin-bottom: 10px;
}
.trf-event-row input[type="text"] {
	flex: 1;
	padding: 10px 14px;
	border: 1.5px solid var(--trf-taupe);
	border-radius: 8px;
	font-family: var(--trf-sans);
	font-size: 14px;
	color: var(--trf-ink);
	background: var(--trf-white);
	outline: none;
	transition: border-color .2s;
}
.trf-event-row input[type="text"]:focus { border-color: var(--trf-brown); }
.trf-event-row input[type="date"] {
	padding: 9px 12px;
	border: 1.5px solid var(--trf-taupe);
	border-radius: 8px;
	font-family: var(--trf-sans);
	font-size: 13px;
	color: var(--trf-ink);
	background: var(--trf-white);
	outline: none;
	transition: border-color .2s;
	min-width: 160px;
}
.trf-event-row input[type="date"]:focus { border-color: var(--trf-brown); }
.trf-remove-ev {
	background: none;
	border: 1.5px solid var(--trf-taupe);
	border-radius: 50%;
	width: 28px; height: 28px;
	cursor: pointer;
	color: var(--trf-muted-lt);
	font-size: 13px;
	display: flex; align-items: center; justify-content: center;
	flex-shrink: 0;
	transition: border-color .2s, color .2s;
}
.trf-remove-ev:hover { border-color: #c0392b; color: #c0392b; }

/* ── RECIPE BOX TITLE UPPERCASE ──────────────────────────────── */
.trf-recipe-box-title {
	text-transform: uppercase;
	letter-spacing: 2px;
}

/* ── LIGHTBOX: X ON PHOTO CORNER ────────────────────────────── */
.trf-lightbox-img-wrap {
	position: relative;
	display: inline-block;
	max-width: 90vw;
	max-height: 80vh;
}
.trf-lightbox-img-wrap .trf-lightbox-close {
	position: absolute;
	top: -14px;
	right: -14px;
	background: rgba(0,0,0,.75);
	border: 2px solid rgba(255,255,255,.6);
	color: #fff;
	width: 32px; height: 32px;
	border-radius: 50%;
	font-size: 18px;
	cursor: pointer;
	z-index: 10;
	display: flex; align-items: center; justify-content: center;
	padding: 0; line-height: 1;
	transition: background .2s;
}
.trf-lightbox-img-wrap .trf-lightbox-close:hover { background: #c0392b; }

/* Override the old close button position */
.trf-lightbox-inner { align-items: center; }
.trf-lightbox-inner > .trf-lightbox-close { display: none; }

/* ── MAIDEN NAME FIELD ───────────────────────────────────────── */
.trf-maiden-toggle-wrap {
	margin-bottom: 8px;
}

/* ── LIGHTBOX v3.0.1 ─────────────────────────────────────────── */
/* Rewrite to fix click-off-to-close and X on image corner */
.trf-lightbox {
	position: fixed; inset: 0; z-index: 9999;
	cursor: pointer; /* whole area is clickable to close */
}
.trf-lightbox-overlay {
	position: absolute; inset: 0;
	background: rgba(0,0,0,.88);
}
.trf-lightbox-inner {
	position: relative; z-index: 1;
	display: flex; flex-direction: column;
	align-items: center; justify-content: center;
	height: 100%; padding: 20px;
	pointer-events: none; /* pass clicks through to .trf-lightbox for close */
}
.trf-lightbox-img-wrap {
	position: relative;
	display: inline-block;
	pointer-events: auto; /* re-enable only on the image wrap */
	cursor: default;
}
.trf-lightbox-img {
	display: block;
	max-width: 90vw; max-height: 85vh;
	object-fit: contain;
	box-shadow: 0 8px 40px rgba(0,0,0,.7);
	border-radius: 2px;
}
/* X button — top-right corner OF the photo, not the screen */
.trf-lightbox-close {
	position: absolute;
	top: -14px; right: -14px;
	width: 32px; height: 32px;
	border-radius: 50%;
	background: rgba(0,0,0,.75);
	border: 2px solid rgba(255,255,255,.6);
	color: #fff; font-size: 18px;
	cursor: pointer; z-index: 10;
	display: flex; align-items: center; justify-content: center;
	padding: 0; line-height: 1;
	transition: background .2s;
}
.trf-lightbox-close:hover { background: #c0392b; border-color: #fff; }
.trf-lightbox-hint {
	color: rgba(255,255,255,.45);
	font-size: 11px; margin-top: 10px;
	font-family: var(--trf-sans);
	pointer-events: none;
	text-align: center;
}

/* ── RECIPE CARD CONTROLS (edit/delete) ──────────────────────── */
.trf-recipe-card { position: relative; }
.trf-recipe-card-controls {
	position: absolute; top: 8px; right: 8px;
	display: none; gap: 4px;
}
.trf-recipe-card:hover .trf-recipe-card-controls { display: flex; }
.trf-recipe-edit-btn,
.trf-recipe-delete-btn {
	width: 26px; height: 26px; border-radius: 50%;
	border: none; cursor: pointer; font-size: 12px;
	display: flex; align-items: center; justify-content: center;
	transition: background .2s;
}
.trf-recipe-edit-btn  { background: rgba(60,36,21,.7); color: #fff; }
.trf-recipe-delete-btn{ background: rgba(60,36,21,.7); color: #fff; }
.trf-recipe-edit-btn:hover   { background: var(--trf-brown); }
.trf-recipe-delete-btn:hover { background: #c0392b; }

/* ── RECIPE EDIT/ADD SLIDE PANEL ─────────────────────────────── */
.trf-recipe-panel-overlay {
	position: fixed; inset: 0; z-index: 8900;
	background: rgba(0,0,0,.35); backdrop-filter: blur(2px);
	opacity: 0; pointer-events: none;
	transition: opacity .3s;
}
.trf-recipe-panel-overlay.trf-visible {
	opacity: 1; pointer-events: auto;
}
.trf-recipe-edit-panel {
	position: fixed; top: 0; right: 0;
	width: var(--trf-panel-w, 420px); max-width: 100vw;
	height: 100dvh; background: var(--trf-cream);
	z-index: 9000; transform: translateX(100%);
	transition: transform .35s cubic-bezier(.4,0,.2,1);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	box-shadow: var(--trf-shadow-lg);
}
.trf-recipe-edit-panel.trf-open { transform: translateX(0); }
.trf-recipe-edit-panel-inner { padding: 60px 24px 40px; }
.trf-recipe-edit-panel-title {
	font-family: var(--trf-serif); font-size: 22px;
	color: var(--trf-brown); margin: 0 0 20px;
}
.trf-recipe-panel-footer {
	display: flex; justify-content: flex-end;
	gap: 10px; margin-top: 20px;
}

/* ── MAIDEN NAME IN PANEL ────────────────────────────────────── */
.trf-panel-maiden {
	font-size: 0.7em;
	color: var(--trf-muted-lt);
	font-weight: 400;
	font-style: italic;
}

/* ══════════════════════════════════════════════════════════════
   WELCOME / GETTING STARTED GUIDE MODAL — v3.0.5
   ══════════════════════════════════════════════════════════════ */

.trf-welcome-overlay {
	position: fixed; inset: 0; z-index: 10000;
	background: rgba(30,20,10,.72);
	backdrop-filter: blur(4px);
	display: flex; align-items: center; justify-content: center;
	padding: 20px;
}

.trf-welcome-modal {
	position: relative;
	background: #F5EDD8; /* dark parchment — matches recipe box lid warm cream */
	border: 2px solid #C4A882;
	border-radius: 16px;
	box-shadow:
		0 24px 80px rgba(0,0,0,.45),
		0 4px 16px rgba(0,0,0,.2),
		inset 0 1px 0 rgba(255,255,255,.4);
	width: 90vw; max-width: 560px;
	max-height: 92vh; overflow-y: auto;
	padding: 28px 32px 32px;
	box-sizing: border-box;
}

/* Close X — top left */
.trf-welcome-close {
	position: absolute; top: 14px; left: 16px;
	background: rgba(60,36,21,.12); border: 1px solid rgba(60,36,21,.2);
	color: var(--trf-brown); font-size: 20px; width: 32px; height: 32px;
	border-radius: 50%; cursor: pointer; padding: 0;
	display: flex; align-items: center; justify-content: center;
	transition: background .2s;
}
.trf-welcome-close:hover { background: var(--trf-brown); color: #fff; }

/* "Don't show again" checkbox — top right area */
.trf-welcome-dismiss-label {
	position: absolute; top: 18px; right: 18px;
	display: flex; align-items: center; gap: 6px;
	font-family: var(--trf-sans); font-size: 11px;
	color: var(--trf-muted-lt); cursor: pointer;
	max-width: 180px; line-height: 1.3;
}
.trf-welcome-dismiss-label input {
	width: 14px; height: 14px; flex-shrink: 0;
	accent-color: var(--trf-brown);
}
.trf-welcome-dismiss-label:hover { color: var(--trf-brown); }

/* Header */
.trf-welcome-header { text-align: center; margin: 24px 0 20px; }
.trf-welcome-emblem {
	font-size: 40px; line-height: 1; margin-bottom: 10px;
}
.trf-welcome-title {
	font-family: var(--trf-serif); font-size: 22px; font-weight: 700;
	color: var(--trf-brown); margin: 0 0 8px;
}
.trf-welcome-subtitle {
	font-family: var(--trf-sans); font-size: 14px;
	color: var(--trf-muted); margin: 0; line-height: 1.5;
}

/* Steps */
.trf-welcome-steps {
	display: flex; flex-direction: column; gap: 18px;
	margin-bottom: 24px;
}
.trf-welcome-step {
	display: flex; gap: 16px; align-items: flex-start;
	background: rgba(255,255,255,.55);
	border: 1px solid rgba(196,168,130,.4);
	border-radius: 10px; padding: 14px 16px;
}
.trf-welcome-step-num {
	width: 32px; height: 32px; border-radius: 50%;
	background: var(--trf-brown); color: #fff;
	font-family: var(--trf-serif); font-size: 16px; font-weight: 700;
	display: flex; align-items: center; justify-content: center;
	flex-shrink: 0; margin-top: 2px;
}
.trf-welcome-step-body h3 {
	font-family: var(--trf-serif); font-size: 15px; font-weight: 700;
	color: var(--trf-ink); margin: 0 0 6px;
}
.trf-welcome-step-body p,
.trf-welcome-step-body ul {
	font-family: var(--trf-sans); font-size: 13px;
	color: var(--trf-muted); line-height: 1.6; margin: 0;
}
.trf-welcome-step-body ul {
	padding-left: 18px; margin-top: 6px;
}
.trf-welcome-step-body ul li { margin-bottom: 4px; }

/* Footer */
.trf-welcome-footer { text-align: center; }
.trf-welcome-btn {
	font-size: 15px; padding: 12px 32px;
	border-radius: 24px;
}
.trf-welcome-reopen-hint {
	font-family: var(--trf-sans); font-size: 11px;
	color: var(--trf-muted-lt); margin: 10px 0 0;
	font-style: italic;
}

/* Mobile */
@media (max-width: 480px) {
	.trf-welcome-modal { padding: 20px 18px 24px; }
	.trf-welcome-title { font-size: 18px; }
	.trf-welcome-dismiss-label { max-width: 140px; font-size: 10px; }
	.trf-welcome-step { padding: 12px; }
}

/* ══════════════════════════════════════════════════════════════
   MOBILE LAYOUT FIXES — v3.0.6
   Breakpoint: 768px (tablet/phone)
   Breakpoint: 480px (small phone)
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

	/* ── TOP BAR: stack title above notifications/sign-out ──────── */
	.trf-toolbar-top {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
		padding: 12px 16px 8px;
	}

	.trf-toolbar-top-right {
		width: 100%;
		justify-content: flex-start;
		gap: 10px;
		flex-wrap: wrap;
	}

	/* Keep sign-out fully visible, allow it to wrap */
	.trf-signout-link {
		white-space: normal;
		font-size: 13px;
		line-height: 1.3;
	}

	.trf-notif-btn { font-size: 13px; }

	/* ── TOOLBAR GRID: two rows, full-width tap targets ────────── */
	.trf-toolbar-grid {
		display: flex;
		flex-direction: column;
		gap: 8px;
		padding: 10px 16px 14px;
	}

	/* Search bar — full width */
	.trf-toolbar-grid .trf-search-wrap {
		width: 100%;
		grid-column: unset;
		grid-row: unset;
	}

	/* Every button and span in the grid: full width, easy tap size */
	.trf-toolbar-grid > button,
	.trf-toolbar-grid > span,
	.trf-toolbar-grid > div,
	.trf-toolbar-grid .trf-coming-soon-wrap {
		width: 100%;
		grid-column: unset !important;
		grid-row: unset !important;
	}

	/* Full-width buttons inside the coming-soon wrapper */
	.trf-toolbar-grid .trf-coming-soon-wrap button {
		width: 100%;
	}

	/* Export Contacts — full width */
	.trf-toolbar-grid #trf-export-btn {
		width: 100%;
		grid-column: unset;
		grid-row: unset;
	}

	/* Minimum tap height for all toolbar buttons */
	.trf-toolbar-grid > button,
	.trf-toolbar-grid .trf-coming-soon-wrap button {
		min-height: 44px;
		font-size: 14px;
	}

	/* ── PAGE TITLE — ensure it doesn't get squished ───────────── */
	.trf-page-title {
		font-size: clamp(20px, 5vw, 28px);
		white-space: normal;
		line-height: 1.2;
	}

	/* Ensure at least 16px padding on main app container */
	.trf-app { padding-left: 0; padding-right: 0; }

}

@media (max-width: 480px) {

	/* On very small phones, shrink the toolbar text further */
	.trf-notif-label { display: none; } /* show only the 📣 icon */
	.trf-toolbar-divider { display: none; }
	.trf-signout-link { font-size: 12px; }

	/* Collapse the title group slightly */
	.trf-page-title { font-size: 20px; }
	.trf-member-count { font-size: 11px; }

	/* Toolbar top: notifications and sign-out on same compact line */
	.trf-toolbar-top-right {
		gap: 6px;
	}

}

/* ── TAG DROPDOWN: DONE BUTTON + HINT ───────────────────────── */
.trf-tag-dropdown-done-wrap {
	padding: 6px 10px;
	border-bottom: 1px solid var(--trf-taupe);
	background: var(--trf-parchment);
	flex-shrink: 0; /* pinned just below search */
	order: -1; /* sits second, right after search */
}
.trf-tag-dropdown-done {
	width: 100%;
	background: var(--trf-brown);
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 8px 14px;
	font-family: var(--trf-sans);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background .2s;
}
.trf-tag-dropdown-done:hover { background: #5a3018; }
.trf-tag-dropdown-hint {
	font-size: 11px;
	color: var(--trf-muted-lt);
	font-style: italic;
	margin: 0 0 6px;
	line-height: 1.4;
}

/* ── TAG FIELD SPACING — separation from buttons above ──────── */
.trf-memory-modal-footer + .trf-field,
.trf-recipe-panel-footer + .trf-upload-progress + .trf-field,
.trf-recipe-panel-footer ~ .trf-field {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid var(--trf-tan);
}
