* {
	box-sizing: border-box;
}

:root {
	color-scheme: light;
	--ink: #1d2925;
	--muted: #7d8983;
	--line: #e8ebe5;
	--paper: #ffffff;
	--canvas: #f6f7f2;
	--green: #2e775f;
	--green-dark: #225d49;
	--green-pale: #e9f2ec;
	--coral: #df896c;
	--gold: #d7a348;
	font-family: "DM Sans", sans-serif;
	font-synthesis: none;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

body {
	min-width: 320px;
	min-height: 100vh;
	margin: 0;
	color: var(--ink);
	background-color: var(--canvas);
	background-image: radial-gradient(#dce3db 0.65px, transparent 0.65px);
	background-size: 15px 15px;
}

button,
a {
	font: inherit;
}

button {
	color: inherit;
}

button:focus-visible,
a:focus-visible {
	outline: 3px solid #8dbbaa;
	outline-offset: 3px;
}

.app-shell {
	width: min(1600px, 100%);
	min-height: 100vh;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 252px minmax(0, 1fr);
	background: var(--canvas);
	box-shadow: 0 0 60px #25342b0a;
}

.sidebar {
	position: relative;
	min-height: 100vh;
	padding: 28px 18px 20px;
	display: flex;
	flex-direction: column;
	background: #fff;
	border-right: 1px solid var(--line);
}

.brand {
	display: inline-flex;
	width: fit-content;
	align-items: center;
	gap: 10px;
	margin: 0 0 42px 4px;
	color: var(--ink);
	text-decoration: none;
	font-family: "Manrope", sans-serif;
	font-size: 20px;
	font-weight: 800;
}

.brand > span:last-child > span {
	color: var(--green);
}

.brand-mark,
.map-empty-mark {
	display: grid;
	width: 36px;
	height: 36px;
	place-items: center;
	color: #fff;
	background: var(--green);
	border-radius: 12px 12px 12px 4px;
}

.brand-mark svg,
.map-empty-mark svg {
	width: 22px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
}

.space-label,
.list-heading,
.eyebrow {
	color: #919b95;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 1.15px;
}

.space-label {
	margin: 0 0 10px 8px;
}

.space-switcher {
	min-height: 59px;
	padding: 8px;
	display: flex;
	align-items: center;
	gap: 10px;
	border: 1px solid var(--line);
	border-radius: 7px;
}

.space-avatar,
.profile-avatar,
.person-avatar {
	display: grid;
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	place-items: center;
	border-radius: 50%;
	font-size: 13px;
	font-weight: 700;
}

.space-avatar {
	color: #fff;
	background: #667d67;
}

.space-name,
.profile-row > span:nth-child(2) {
	min-width: 0;
	display: grid;
	gap: 2px;
	font-size: 12px;
	font-weight: 700;
}

.space-name small,
.profile-row small {
	color: var(--muted);
	font-size: 10px;
	font-weight: 400;
}

.chevron {
	margin-left: auto;
	color: var(--muted);
	font-size: 16px;
}

.list-heading {
	margin: 33px 6px 12px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.people-count {
	display: grid;
	min-width: 20px;
	height: 20px;
	place-items: center;
	color: #6b7771;
	background: #f1f3ef;
	border-radius: 50%;
	font-size: 10px;
	letter-spacing: 0;
}

.person-row {
	min-height: 57px;
	padding: 8px;
	display: flex;
	align-items: center;
	gap: 10px;
	border-radius: 7px;
}

.active-person {
	background: #f3f6f1;
}

.self-avatar {
	color: #566a5d;
	background: #dce8dd;
}

.person-details {
	min-width: 0;
	display: grid;
	gap: 4px;
}

.person-details strong,
.profile-row strong {
	font-size: 12px;
	font-weight: 600;
}

.person-details small {
	color: var(--muted);
	font-size: 10px;
}

.presence-dot,
.secure-dot,
.live-state-dot {
	width: 7px;
	height: 7px;
	flex: 0 0 auto;
	border-radius: 50%;
	background: #b6bdb8;
}

.presence-dot {
	margin-left: auto;
}

.is-sharing .presence-dot,
.is-sharing .secure-dot,
.is-sharing .live-state-dot {
	background: #50a578;
}

.empty-family {
	margin: 17px 9px;
	color: #8e9992;
	font-size: 11px;
	line-height: 1.65;
}

.empty-icon {
	display: grid;
	width: 22px;
	height: 22px;
	place-items: center;
	color: #738178;
	border: 1px dashed #b5c0b7;
	border-radius: 50%;
	font-size: 15px;
}

.empty-family p {
	max-width: 168px;
	margin: 9px 0 0;
}

.sidebar-bottom {
	margin-top: auto;
}

.privacy-card {
	padding: 13px 10px;
	display: flex;
	align-items: flex-start;
	gap: 9px;
	background: #f3f6f0;
	border-radius: 6px;
}

.privacy-icon {
	color: var(--green);
	font-size: 20px;
	line-height: 1;
}

.privacy-card strong {
	font-size: 11px;
}

.privacy-card p {
	margin: 5px 0 0;
	color: #76827a;
	font-size: 10px;
	line-height: 1.5;
}

.profile-row {
	margin-top: 17px;
	padding: 14px 2px 0;
	display: flex;
	align-items: center;
	gap: 9px;
	border-top: 1px solid var(--line);
}

.profile-avatar {
	color: #fff;
	background: #d78c70;
}

.more-dots {
	margin-left: auto;
	color: #7c8881;
	font-size: 20px;
	line-height: 1;
}

.main-content {
	min-width: 0;
	padding: 0 clamp(24px, 5vw, 72px) 25px;
}

.topbar {
	height: 68px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid #e8ebe5;
}

.breadcrumbs,
.topbar-right {
	display: flex;
	align-items: center;
}

.breadcrumbs {
	gap: 10px;
	color: #859088;
	font-size: 11px;
}

.breadcrumbs strong {
	color: #35433c;
	font-weight: 600;
}

.breadcrumb-divider {
	color: #b4bdb6;
}

.topbar-right {
	gap: 19px;
}

.secure-label {
	display: flex;
	align-items: center;
	gap: 7px;
	color: #69766d;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.8px;
}

.secure-dot {
	width: 6px;
	height: 6px;
}

.icon-button {
	width: 27px;
	height: 27px;
	display: grid;
	place-items: center;
	padding: 0;
	color: #69766d;
	background: transparent;
	border: 1px solid #dfe4dd;
	border-radius: 50%;
	cursor: pointer;
	font-size: 12px;
}

.page-heading {
	padding: 34px 0 24px;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 18px;
}

.eyebrow {
	margin: 0 0 8px;
}

h1,
h2,
p {
	margin-top: 0;
}

h1,
.dialog-mark + .eyebrow + h2 {
	font-family: "Manrope", sans-serif;
}

h1 {
	margin-bottom: 5px;
	font-size: clamp(29px, 3vw, 37px);
	font-weight: 700;
	line-height: 1.2;
}

.heading-period {
	color: var(--coral);
}

.subtitle {
	margin: 0;
	color: #78847c;
	font-size: 12px;
}

.heading-date {
	display: flex;
	align-items: center;
	gap: 7px;
	padding-bottom: 4px;
	color: #7c8881;
	font-size: 11px;
}

.date-icon {
	color: #a1aaa2;
	font-size: 15px;
}

.map-card {
	overflow: hidden;
	background: var(--paper);
	border: 1px solid #e8ebe5;
	border-radius: 7px;
	box-shadow: 0 6px 25px #283b2f08;
}

.map-toolbar {
	min-height: 72px;
	padding: 12px 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

.map-label,
.map-actions {
	display: flex;
	align-items: center;
}

.map-label {
	gap: 11px;
}

.map-label-icon {
	display: grid;
	width: 34px;
	height: 34px;
	place-items: center;
	color: var(--green);
	background: #edf4ee;
	border-radius: 6px;
	font-size: 22px;
}

.map-label > div {
	display: grid;
	gap: 4px;
}

.map-label strong {
	font-size: 12px;
	font-weight: 700;
}

.map-label > div > span {
	color: #87918a;
	font-size: 10px;
}

.map-actions {
	gap: 16px;
}

.live-state {
	display: flex;
	align-items: center;
	gap: 7px;
	color: #858f88;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.65px;
}

.live-state-dot {
	width: 6px;
	height: 6px;
}

.is-sharing .live-state-dot {
	box-shadow: 0 0 0 3px #50a57822;
	animation: breathe 2s ease-out infinite;
}

@keyframes breathe {
	50% { box-shadow: 0 0 0 6px #50a57808; }
}

.locate-button,
.dialog-done {
	min-height: 38px;
	padding: 0 13px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	color: #fff;
	background: var(--green);
	border: 0;
	border-radius: 5px;
	cursor: pointer;
	font-size: 11px;
	font-weight: 600;
	transition: background 150ms ease, transform 150ms ease;
}

.locate-button:hover,
.dialog-done:hover {
	background: var(--green-dark);
}

.locate-button:active {
	transform: translateY(1px);
}

.locate-button svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-width: 1.5;
}

.is-sharing .locate-button {
	color: #46534b;
	background: #eff2ee;
}

.is-sharing .locate-button:hover {
	background: #e5eae4;
}

.map-wrap {
	position: relative;
	height: clamp(320px, 43vw, 470px);
	isolation: isolate;
	background-color: #edf0e9;
	background-image: linear-gradient(30deg, transparent 48%, #dfe7dd 49%, #dfe7dd 50%, transparent 51%), linear-gradient(150deg, transparent 48%, #e0e7dc 49%, #e0e7dc 50%, transparent 51%);
	background-size: 60px 60px, 84px 84px;
}

#map {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: transparent;
}

.leaflet-container {
	font-family: "DM Sans", sans-serif;
}

.leaflet-control-attribution {
	font-size: 9px !important;
}

.map-empty {
	position: absolute;
	z-index: 2;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: #f5f6f0eF;
	text-align: center;
	transition: opacity 200ms ease, visibility 200ms ease;
}

.map-empty.is-hidden {
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
}

.map-empty-mark {
	width: 48px;
	height: 48px;
	margin-bottom: 14px;
	border-radius: 15px 15px 15px 5px;
	box-shadow: 0 6px 14px #2e775f24;
}

.map-empty-mark svg {
	width: 28px;
}

.map-empty > strong {
	margin-bottom: 6px;
	font-family: "Manrope", sans-serif;
	font-size: 17px;
	font-weight: 700;
}

.map-empty > span:not(.map-empty-mark) {
	color: #758179;
	font-size: 11px;
}

.map-empty button {
	margin-top: 16px;
	padding: 7px 0;
	color: var(--green-dark);
	background: transparent;
	border: 0;
	cursor: pointer;
	font-size: 11px;
	font-weight: 700;
}

.map-empty button span {
	margin-left: 4px;
}

.map-attribution-note {
	position: absolute;
	right: 7px;
	bottom: 5px;
	z-index: 3;
	padding: 2px 4px;
	color: #59645d;
	background: #ffffffd9;
	border-radius: 2px;
	font-size: 8px;
}

.map-footer {
	min-height: 68px;
	padding: 10px 20px;
	display: flex;
	align-items: center;
	gap: 17px;
}

.location-detail {
	display: flex;
	align-items: center;
	gap: 9px;
}

.detail-icon {
	color: #80988a;
	font-size: 20px;
}

.accuracy-icon {
	font-size: 17px;
}

.location-detail > span:last-child {
	display: grid;
	gap: 4px;
}

.location-detail small {
	color: #98a19b;
	font-size: 8px;
	font-weight: 700;
	letter-spacing: 0.6px;
}

.location-detail strong {
	color: #4a574f;
	font-size: 10px;
	font-weight: 600;
}

.footer-divider {
	width: 1px;
	height: 26px;
	background: var(--line);
}

.updated-at {
	margin-left: auto;
	color: #8b958e;
	font-size: 10px;
}

.bottom-grid {
	margin-top: 16px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.info-panel {
	min-height: 140px;
	padding: 17px 18px 12px;
	background: #fff;
	border: 1px solid #e8ebe5;
	border-radius: 6px;
}

.panel-title {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.panel-icon {
	display: grid;
	width: 29px;
	height: 29px;
	flex: 0 0 auto;
	place-items: center;
	border-radius: 6px;
	font-size: 20px;
}

.mint-icon {
	color: #3a8066;
	background: #edf5ee;
}

.coral-icon {
	color: #c97e61;
	background: #fbf0eb;
}

.panel-title h2 {
	margin: 1px 0 4px;
	font-size: 11px;
	font-weight: 700;
}

.panel-title p {
	margin: 0;
	color: #828d85;
	font-size: 10px;
	line-height: 1.5;
}

.sharing-row {
	margin: 16px 0 0 39px;
	padding-top: 10px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	border-top: 1px solid #f0f1ed;
}

.sharing-indicator {
	display: flex;
	align-items: center;
	gap: 6px;
	color: #707c74;
	font-size: 10px;
}

.sharing-indicator span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #b6bdb8;
}

.is-sharing .sharing-indicator span {
	background: #50a578;
}

.text-action,
.privacy-link {
	padding: 3px 0;
	color: var(--green-dark);
	background: transparent;
	border: 0;
	cursor: pointer;
	font-size: 10px;
	font-weight: 600;
	white-space: nowrap;
}

.text-action span,
.privacy-link span {
	margin-left: 3px;
}

.privacy-link {
	margin: 14px 0 0 39px;
}

.page-footer {
	padding: 20px 2px 0;
	display: flex;
	justify-content: space-between;
	gap: 12px;
	color: #99a19b;
	font-size: 9px;
}

.page-footer > span:first-child {
	color: #718077;
	font-weight: 600;
}

.footer-dot {
	padding: 0 3px;
	color: #c68e73;
}

.privacy-dialog {
	width: min(440px, calc(100% - 32px));
	padding: 30px;
	color: var(--ink);
	background: #fff;
	border: 1px solid #e7ebe4;
	border-radius: 9px;
	box-shadow: 0 20px 80px #1d292533;
}

.privacy-dialog::backdrop {
	background: #26332d70;
	backdrop-filter: blur(2px);
}

.privacy-dialog form:first-child {
	position: absolute;
	top: 10px;
	right: 12px;
}

.dialog-close {
	width: 28px;
	height: 28px;
	color: #77827a;
	background: #f4f6f2;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	font-size: 19px;
}

.dialog-mark {
	display: grid;
	width: 38px;
	height: 38px;
	margin-bottom: 19px;
	place-items: center;
	color: #be775c;
	background: #fbf0eb;
	border-radius: 8px;
	font-size: 22px;
}

.dialog-mark + .eyebrow {
	margin-bottom: 8px;
}

.dialog-mark + .eyebrow + h2 {
	margin-bottom: 12px;
	font-size: 21px;
}

.privacy-dialog p:not(.eyebrow) {
	color: #68756c;
	font-size: 12px;
	line-height: 1.7;
}

.dialog-done {
	min-width: 90px;
	margin-top: 8px;
}

.toast {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 10;
	max-width: min(360px, calc(100vw - 40px));
	padding: 12px 16px;
	color: #fff;
	background: #26362e;
	border-radius: 5px;
	box-shadow: 0 8px 30px #1d29252e;
	opacity: 0;
	pointer-events: none;
	transform: translateY(8px);
	transition: opacity 180ms ease, transform 180ms ease;
	font-size: 12px;
	line-height: 1.5;
}

.toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.user-location-marker {
	position: relative;
	width: 22px;
	height: 22px;
	border: 3px solid #fff;
	border-radius: 50%;
	background: #337d60;
	box-shadow: 0 1px 8px #183e2b80;
}

.user-location-marker::after {
	position: absolute;
	inset: -8px;
	border: 1px solid #337d6070;
	border-radius: 50%;
	content: "";
}

@media (min-width: 1500px) {
	.map-wrap {
		height: 490px;
	}
}

@media (max-width: 900px) {
	.app-shell {
		grid-template-columns: 215px minmax(0, 1fr);
	}

	.main-content {
		padding-right: 28px;
		padding-left: 28px;
	}

	.bottom-grid {
		grid-template-columns: 1fr;
	}

	.info-panel {
		min-height: 128px;
	}
}

@media (max-width: 650px) {
	.app-shell {
		display: block;
	}

	.sidebar {
		min-height: 0;
		padding: 12px 18px;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		border-right: 0;
		border-bottom: 1px solid var(--line);
	}

	.brand {
		margin: 0;
		font-size: 18px;
	}

	.brand-mark {
		width: 32px;
		height: 32px;
	}

	.space-label,
	.space-switcher,
	.list-heading,
	.person-row,
	.empty-family,
	.sidebar-bottom {
		display: none;
	}

	.main-content {
		padding: 0 16px 20px;
	}

	.topbar {
		height: 53px;
	}

	.secure-label {
		font-size: 8px;
	}

	.topbar-right {
		gap: 10px;
	}

	.page-heading {
		padding: 25px 0 18px;
	}

	.heading-date {
		display: none;
	}

	h1 {
		font-size: 29px;
	}

	.subtitle {
		max-width: 280px;
		font-size: 11px;
		line-height: 1.55;
	}

	.map-toolbar {
		min-height: 69px;
		padding: 10px 12px;
		gap: 8px;
	}

	.map-label {
		gap: 8px;
	}

	.map-label-icon {
		width: 30px;
		height: 30px;
	}

	.map-label > div > span {
		max-width: 142px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.map-actions {
		gap: 0;
	}

	.live-state {
		display: none;
	}

	.locate-button {
		min-height: 35px;
		padding: 0 9px;
		gap: 5px;
		font-size: 10px;
	}

	.locate-button svg {
		width: 14px;
		height: 14px;
	}

	.map-wrap {
		height: min(65vh, 430px);
		min-height: 300px;
	}

	.map-footer {
		min-height: 63px;
		padding: 9px 11px;
		gap: 10px;
	}

	.location-detail {
		gap: 6px;
	}

	.location-detail strong {
		max-width: 112px;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.updated-at {
		max-width: 80px;
		font-size: 9px;
		line-height: 1.35;
		text-align: right;
	}

	.bottom-grid {
		margin-top: 12px;
		gap: 10px;
	}

	.info-panel {
		min-height: 124px;
		padding: 14px;
	}

	.page-footer {
		padding-top: 17px;
		font-size: 8px;
	}
}

@media (max-width: 380px) {
	.main-content {
		padding-right: 12px;
		padding-left: 12px;
	}

	.map-label > div > span {
		max-width: 110px;
	}

	.locate-button {
		padding: 0 7px;
		font-size: 9px;
	}

	.page-footer > span:last-child {
		max-width: 130px;
		text-align: right;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}


/* --- GeoTrack finishing fixes --- */

/* Author styles must not accidentally reveal sections marked hidden in HTML. */
[hidden] {
    display: none !important;
}

.auth-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 18px;
    background:
        radial-gradient(circle at 12% 15%, #e4eee5 0, transparent 30%),
        radial-gradient(circle at 88% 82%, #f4e9df 0, transparent 28%),
        var(--canvas);
}

.auth-card {
    width: min(100%, 440px);
    padding: clamp(26px, 5vw, 42px);
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #e6ebe4;
    border-radius: 18px;
    box-shadow: 0 24px 70px #26372d12;
}

.auth-brand {
    margin: 0 0 38px;
}

.auth-card > .eyebrow {
    margin-bottom: 12px;
    color: var(--green);
}

.auth-card h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 6vw, 38px);
    letter-spacing: -1.1px;
    line-height: 1.15;
}

.auth-description {
    margin: 0;
    color: #78847c;
    font-size: 13px;
    line-height: 1.65;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin: 28px 0 22px;
    padding: 5px;
    background: #f2f5f0;
    border-radius: 9px;
}

.auth-tab {
    min-height: 40px;
    padding: 8px 12px;
    color: #748078;
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.auth-tab.is-active {
    color: var(--green-dark);
    background: #fff;
    box-shadow: 0 1px 4px #1d292510;
}

.auth-form {
    display: grid;
    gap: 16px;
}

.auth-form label,
.join-form label {
    display: grid;
    gap: 8px;
    color: #46534b;
    font-size: 11px;
    font-weight: 600;
}

.auth-form input,
.join-form input,
.space-switcher select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 0 13px;
    color: var(--ink);
    background: #fff;
    border: 1px solid #dfe6de;
    border-radius: 7px;
    outline: none;
    font: inherit;
    font-size: 12px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.auth-form input::placeholder,
.join-form input::placeholder {
    color: #a3ada5;
}

.auth-form input:focus,
.join-form input:focus,
.space-switcher select:focus {
    border-color: #77a58d;
    box-shadow: 0 0 0 3px #2e775f16;
}

.auth-submit {
    min-height: 46px;
    margin-top: 5px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    background: var(--green);
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    transition: background 150ms ease, transform 150ms ease;
}

.auth-submit:hover {
    background: var(--green-dark);
}

.auth-submit:active {
    transform: translateY(1px);
}

.auth-privacy {
    margin: 22px 0 0;
    padding-top: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #7b887f;
    border-top: 1px solid #edf0eb;
    font-size: 10px;
}

.optional-label {
    margin-left: 5px;
    color: #929d94;
    font-size: 9px;
    letter-spacing: .6px;
}

button,
select {
    font-family: inherit;
}

button:disabled {
    cursor: not-allowed;
    opacity: .6;
}

.space-switcher select {
    flex: 1;
    padding: 0;
    border: 0;
    background: transparent;
    font-weight: 600;
}

.add-family-button,
.topbar-action,
.copy-code-button {
    cursor: pointer;
}

.add-family-button {
    width: 100%;
    min-height: 40px;
    margin-top: 12px;
    padding: 0 10px;
    color: var(--green-dark);
    background: #f3f7f2;
    border: 1px dashed #cbd9cd;
    border-radius: 7px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
}

.add-family-button:hover {
    background: #eaf2eb;
}

.topbar-action {
    min-height: 32px;
    padding: 0 11px;
    color: #536158;
    background: #fff;
    border: 1px solid #e1e7df;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 600;
}

.topbar-action:hover {
    border-color: #b9cdbd;
    background: #f8faf7;
}

.privacy-dialog,
.family-dialog {
    position: fixed;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    max-height: min(85vh, 680px);
    overflow: auto;
}

.family-dialog {
    width: min(440px, calc(100% - 32px));
    padding: 30px;
    color: var(--ink);
    background: #fff;
    border: 1px solid #e7ebe4;
    border-radius: 9px;
    box-shadow: 0 20px 80px #1d292533;
}

.family-dialog::backdrop {
    background: #26332d70;
    backdrop-filter: blur(2px);
}

.family-dialog > p:not(.eyebrow) {
    color: #68756c;
    font-size: 12px;
    line-height: 1.7;
}

.family-dialog > form:first-child {
    position: absolute;
    top: 10px;
    right: 12px;
}

.dialog-separator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0 18px;
    color: #9aa49c;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .7px;
}

.dialog-separator::before,
.dialog-separator::after {
    height: 1px;
    flex: 1;
    background: #edf0eb;
    content: "";
}

.join-form > div {
    display: flex;
    gap: 8px;
    margin-top: 9px;
}

.join-form > div button {
    width: 46px;
    flex: 0 0 auto;
    color: #fff;
    background: var(--green);
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    font-size: 18px;
}

.invite-code-result {
    margin-top: 16px;
    padding: 14px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 5px 10px;
    background: #f2f7f1;
    border: 1px solid #dce9dc;
    border-radius: 8px;
}

.invite-code-result > span {
    color: var(--green-dark);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 3px;
}

.invite-code-result small {
    grid-column: 1 / -1;
    color: #77847a;
    font-size: 10px;
}

.copy-code-button {
    width: 34px;
    height: 34px;
    color: var(--green-dark);
    background: #fff;
    border: 1px solid #dce7dc;
    border-radius: 6px;
}

@media (max-width: 650px) {
    .auth-screen {
        padding: 18px 14px;
    }

    .auth-card {
        padding: 27px 22px;
        border-radius: 14px;
    }

    .auth-brand {
        margin-bottom: 30px;
    }

    .topbar-action {
        min-height: 30px;
        padding: 0 8px;
    }

    .page-footer {
        flex-wrap: wrap;
    }
}


/* --- GeoTrack desktop sign-in layout --- */
@media (min-width: 651px) {
    .auth-screen {
        min-height: 100vh;
        padding: 36px clamp(28px, 5vw, 72px);
        place-items: center;
        background:
            radial-gradient(circle at 8% 12%, #e4eee5 0, transparent 32%),
            radial-gradient(circle at 92% 88%, #f4e9df 0, transparent 30%),
            var(--canvas);
    }

    .auth-card {
        width: min(1120px, 100%);
        min-height: min(700px, calc(100vh - 72px));
        padding: clamp(44px, 6vw, 82px);
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(360px, 0.86fr);
        grid-template-areas:
            "brand tabs"
            "eyebrow tabs"
            "headline form"
            "description form"
            "privacy privacy";
        align-content: center;
        align-items: start;
        column-gap: clamp(48px, 7vw, 100px);
        row-gap: 0;
        border-radius: 20px;
    }

    .auth-brand {
        grid-area: brand;
        margin: 0 0 54px;
    }

    .auth-card > .eyebrow {
        grid-area: eyebrow;
        align-self: end;
        margin: 0 0 14px;
    }

    .auth-card h1 {
        grid-area: headline;
        align-self: start;
        margin: 0 0 14px;
        font-size: clamp(42px, 4.4vw, 60px);
        line-height: 1.12;
    }

    .auth-description {
        grid-area: description;
        max-width: 390px;
        font-size: 15px;
        line-height: 1.75;
    }

    .auth-tabs {
        grid-area: tabs;
        width: 100%;
        align-self: end;
        margin: 0 0 22px;
    }

    .auth-form {
        grid-area: form;
        width: 100%;
        align-self: start;
    }

    .auth-privacy {
        grid-area: privacy;
        margin-top: 52px;
    }
}

@media (min-width: 651px) and (max-height: 720px) {
    .auth-screen {
        padding-top: 20px;
        padding-bottom: 20px;
    }

    .auth-card {
        min-height: calc(100vh - 40px);
        padding-top: 34px;
        padding-bottom: 34px;
    }

    .auth-brand {
        margin-bottom: 30px;
    }

    .auth-privacy {
        margin-top: 28px;
    }
}

/* Keep the desktop dashboard spacious on wide laptop screens. */
@media (min-width: 1100px) {
    .app-shell {
        width: min(1800px, 100%);
        grid-template-columns: 270px minmax(0, 1fr);
    }

    .main-content {
        padding-right: clamp(36px, 5vw, 88px);
        padding-left: clamp(36px, 5vw, 88px);
    }

    .map-wrap {
        height: clamp(400px, 42vw, 620px);
    }
}

/* Tablet and phone: return the sign-in page to one column. */
@media (max-width: 650px) {
    .auth-screen {
        display: grid;
        place-items: center;
    }

    .auth-card {
        display: block;
        width: min(100%, 440px);
        min-height: 0;
    }
}
.more-dots {
    margin-left: auto;
    color: #7c8881;
    font-size: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.more-dots:hover {
    color: #c45b48;
}